Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with AsyncTask on rooted Droid
    text
    copied!<p>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:</p> <p><a href="http://code.google.com/p/android-digiclockwidget/source/browse/trunk/src/com/davidgoemans/simpleClockWidget/LauncherChooser.java" rel="nofollow noreferrer">http://code.google.com/p/android-digiclockwidget/source/browse/trunk/src/com/davidgoemans/simpleClockWidget/LauncherChooser.java</a></p> <p>If you wish to diff the changes made between a working and non-working version, that can be found here:</p> <p><a href="http://code.google.com/p/android-digiclockwidget/source/diff?spec=svn10&amp;old=7&amp;r=9&amp;format=side&amp;path=/trunk/src/com/davidgoemans/simpleClockWidget/LauncherChooser.java" rel="nofollow noreferrer">http://code.google.com/p/android-digiclockwidget/source/diff?spec=svn10&amp;old=7&amp;r=9&amp;format=side&amp;path=/trunk/src/com/davidgoemans/simpleClockWidget/LauncherChooser.java</a></p> <p>What seems to happen on the droid is: * Progress box pops up * Progress box dismisses before it's finished running * Empty list shows up</p> <p>It seems like the AsyncTask that fetches the applications is getting killed. Is this possible?</p> <p>Thanks, David</p> <p><strong>EDIT</strong>:</p> <p>Found the problem, turns out that in Android 2.0 ( NOT 2.1 or 1.6 )</p> <p>List packages = getPackageManager().getInstalledPackages(PackageManager.GET_ACTIVITIES);</p> <p>crashes in my situation, but</p> <p>List packages = getPackageManager().getInstalledPackages(0);</p> <p>doesn't.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload