Search code examples
android-annotations

Will @Extra automatically restore data when app process was killed?


For example,app was not visible in the background,system need memory for other app and kill the app process,then user restart the app.Will the @Extra annotation restore the data automatically?


Solution

  • No. Extra is for extracting the extras from the Intents coming to your Activity. To save and restore fields you should use @InstanceState. You can annotate the same field which you already has @Extra.

    BTW AndroidAnnotations is just a wrapper, so these concepts are coming from core Android.