0

I want to set some Extras for the next startup of an activity. However, I want the user to start the activity, i don't want to start it programatically with startActivity();

It should also work if the target activity is currently killed.

Could you tell me how to do so?

Thanks

  • 1
    "I want the user to start the activity, i don't want to start it programatically with startActivity();" huh? – codeMagic Mar 10 '15 at 15:53
  • I want that these Extras are loaded automatically when the app is started by the user the next time :-) –  Mar 10 '15 at 16:10
  • Then you will need to store them in some type of [Persistent Storage](http://developer.android.com/guide/topics/data/data-storage.html) – codeMagic Mar 10 '15 at 16:11

1 Answers1

1

You might use SharedPreferences and store variables to non-volatile memory. Then read them in the onCreate() of your activity.

mach
  • 8,315
  • 3
  • 33
  • 51
  • Yes, i knew about this option before. However, I would prefer using intents or PendingIntents it seems cleaner to me. Is it possible to use this mechanism? –  Mar 10 '15 at 16:07