Hi all,

I am stuck how to pass parameter from home widget to an activity..
I have used code how to pass parameter from an activity to other activity:

Bundle bundle = new Bundle();
bundle.putString("test", "test");
Intent intent = new Intent(context, Main.class);
intent.putExtras(bundle);
PendingIntent pendingIntentApplication = PendingIntent.getActivity(context,
0, intent, 0);
views.setOnClickPendingIntent(R.id.view, pendingIntentApplication);

and in Main class I have:

Bundle bundle = this.getIntent().getExtras();

System.out.println(bundle.getString("test"));

But this one prints null

Actually how to pass parameter from home widget to an activity? I think this
one couldn't work


Thanks,

Rendy

-- 
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

Reply via email to