On Feb 13, 5:36 am, Put_tiMe <[email protected]> wrote:
> I'm trying to send a parameter to an activity. But the problem is that in
> the activity's 'onCreate' callback, the 'Bundle' parameter is always null.
>
> Intent aintent = *new* Intent(android.content.Intent.*ACTION_VIEW*);
> *try
> *{
>
> aintent = new Intent(getApplicationContext(), AAA.*class);*
> aintent.putExtra(Intent.*EXTRA_TEXT*, *"whatever"*);
>
> startActivity(aintent);
>
> }
>
> @Override
>
> *public* *void* onCreate(Bundle savedInstanceState) {
>
> 'savedInstanceState' is always null
>

http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)

Try using getIntent() instead:  
http://developer.android.com/reference/android/app/Activity.html#getIntent()

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