Hi
I've got a widget on the Android market called DigiClock widget, and after the last update i've been having some extremely rare and random problems on rooted Motorola Droids ( there may be other handsets with the problem, but the only responses i've had are from rooted droid users ). The problem occurs when an activity is launched that runs an AsyncTask that retrieves all the installed applications from the device while showing a ProgressDialog ( Horizontal style ). The applicable java code file can be found here:
If you wish to diff the changes made between a working and non-working version, that can be found here:
What seems to happen on the droid is: * Progress box pops up * Progress box dismisses before it's finished running * Empty list shows up
It seems like the AsyncTask that fetches the applications is getting killed. Is this possible?
Thanks, David
EDIT:
Found the problem, turns out that in Android 2.0 ( NOT 2.1 or 1.6 )
List packages = getPackageManager().getInstalledPackages(PackageManager.GET_ACTIVITIES);
crashes in my situation, but
List packages = getPackageManager().getInstalledPackages(0);
doesn't.