Force close when trying to use BetterAsyncTask in droid-fu Android

704 Views Asked by At

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

2

There are 2 best solutions below

0
On BEST ANSWER

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

1
On

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.