0

I am currently trying to use the android library android fu to help me with my first proper app.

I am trying to makea test project using the droid fu library but when ever i go to test the app it force closes.

I have used an example of the asynctask and when i test the app it loads and does what its meant to but when i replace it with the betterasynctask the app force closes.

You can download the source of the test app from http://androidapp.dino-digital.com/DroidFuTest.zip

Cœur
  • 37,241
  • 25
  • 195
  • 267
adamias
  • 77
  • 11
  • Can you show the stack trace? In eclipse look at the logcat window, or run adb logcat from the command line. – Cheryl Simon Sep 08 '10 at 18:22
  • Hi this is the what i get when i debug the app in eclipse (logcat window) http://androidapp.dino-digital.com/logcat.txt – adamias Sep 08 '10 at 18:46
  • Are you using BetterActivity? They're meant to be used together – Falmarri Sep 08 '10 at 19:05
  • Hi i am using the BetterDefaultActivity. I have done what hwrdprkns said and the example now works without a dialog. I would ideally like to have the progress dialog loading while doing something in the background like downloading xml – adamias Sep 08 '10 at 19:26

2 Answers2

0

This is caused by you not providing a valid resource pointer for your dialog. Right after you instantiate the task -- try calling the task.disableDialog(); method. It should work after that.

EDIT: Seeing as the user wants a custom dialog -- I'd point you to this link. Just create a new custom dialog(or just use the Android's helper methods for creating a dialog) and reference that ID from your code.

hwrdprkns
  • 7,525
  • 12
  • 48
  • 69
  • thanks that worked for that example but what would i do if i wanted the progressDialog while its doing an action like downloading an xml file in the background? – adamias Sep 08 '10 at 18:58
0

Even though hwrdprkns was correct as to disabling the dialog will make the app work to be able to get the progress dialog to work i add to the following to get the dialog to work.

Call both lines to set the dialog content

super.setProgressDialogTitleId(R.string.dialog_title);
super.setProgressDialogMsgId(R.string.dialog_message);

OR

define "droidfu_progress_dialog_title" and droidfu_progress_dialog_message in your strings.xml

Terrance
  • 11,764
  • 4
  • 54
  • 80
adamias
  • 77
  • 11