Albert wrote:
> Hi,
>
> Can someone see what I am doing wrong here, when I try to get the
> extras I sent on my intent it always returns null
>
> Intent activityIntent = new Intent(context, TopImage.class);
> activityIntent.putStringArrayListExtra("com.mobile.dev.LIST",
> mStringList); //mStringList is not null for sure
>
> //
> "com.mobile.dev.LIST" my package prefix+keyname
> then to extract the data:
>
> //this is done in onCreate()
> ArrayList<String> t = new ArrayList<String>();
> t = getIntent().getStringArrayListExtra("com.mobile.dev.LIST"); // it
> is always returns null, I get an null pointer exception as soon as I
> use t.
>
> The intent is sent from a widget which launches the activity from
> which i am trying to get this Extra...
If you are wrapping this in a PendingIntent, that may be the source of
your difficulty. Make sure your previous PendingIntent is canceled
before creating a new one with a new extra.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Android Training in US: 8-12 February 2010: http://bignerdranch.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en