The name for the Extra changed. It's now:
pkg

so it would be:
i.putExtra("pkg", mAppContextPackageName);

On 11 Jun., 22:56, Bo <wang.b.fr...@gmail.com> wrote:
> Hi All,
>
> I was using this method to show users the installed app details page
>
> Intent i = new Intent(Intent.ACTION_VIEW);
> i.setClassName("com.android.settings",
>     "com.android.settings.InstalledAppDetails");
> i.putExtra("com.android.settings.ApplicationPkgName",
>     mAppContextPackageName);
> // start new activity to display the information
> startActivity(i);
>
> It works fine until 2.2, which gives me a NPE
>
> 06-11 22:50:46.443: ERROR/AndroidRuntime(4797): Caused by:
> java.lang.NullPointerException
>
> 06-11 22:50:46.443: ERROR/AndroidRuntime(4797): at
> com.android.settings.InstalledAppDetails.onResume(InstalledAppDetails.java:
> 398)
>
> 06-11 22:50:46.443: ERROR/AndroidRuntime(4797): at
> android.app.Instrumentation.callActivityOnResume(Instrumentation.java:
> 1149)
>
> 06-11 22:50:46.443: ERROR/AndroidRuntime(4797): at
> android.app.Activity.performResume(Activity.java:3823)
>
> 06-11 22:50:46.443: ERROR/AndroidRuntime(4797): at
> android.app.ActivityThread.performResumeActivity(ActivityThread.java:
> 3118)
>
> The 2.2 source is not opened yet, so it's hard for me to figure out
> what's happening around line 398 of InstalledAppDetails.java
>
> Does anyone have a solution for this?
>
> Thank you in advance :)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to