laito / droidstack

Automatically exported from code.google.com/p/droidstack
0 stars 0 forks source link

NPE when launching questions-all Intent #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start Activity using Intent with the questions/all URI (the example in the 
introduction here http://code.google.com/p/droidstack/wiki/Intents

What is the expected output? What do you see instead?
Expect DroidStack to launch.  NPE QuestionsActivity.onCreate line 113 at the 
StackWrapper init.

What version of the product are you using? On what operating system?
1.0-11a, Gingerbread 2.3.2

Please provide any additional information below.

I am launching from a Widget. Planning to launch DroidStack if the widget is 
clicked, otherwise launch via the browser. My code is below.

Intent droidstack = new Intent(Intent.ACTION_VIEW, 
Uri.parse("droidstack://questions/all"));
List<ResolveInfo> list = 
getPackageManager().queryIntentActivities(droidstack,PackageManager.MATCH_DEFAUL
T_ONLY);
if (list.size() != 0) {
    PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, droidstack, 0);
    updateViews.setOnClickPendingIntent(R.id.widget, pendingIntent);
}

Original issue reported on code.google.com by novaho...@gmail.com on 9 Mar 2011 at 2:05

Attachments:

GoogleCodeExporter commented 9 years ago
The problem is that you are not adding the endpoint parameter (so it doesn't 
know which SE site to use).

1. The "View all questions" example on the same page is accurate and shows the 
adding of the endpoint
2. I have corrected the example in the introduction, thanks :)

Marked as invalid since it was not actually a problem with droidstack.

Original comment by felix.og...@gmail.com on 9 Mar 2011 at 8:54

GoogleCodeExporter commented 9 years ago
yeah. I did notice that. Figured you still might want to fix the npe though.

Original comment by novaho...@gmail.com on 9 Mar 2011 at 12:20