onActivityResult retrieve activity

Skip to first unread message

Michael Mellin

Nov 20, 2013, 3:40:59 AM11/20/13
to zx...@googlegroups.com

I begin to develop an Android app and in one, when the user click on a button, the initiateScan is called. But on onActivityResult, I can't retrieve the attributes of my previous activity.

Here my code :

Calling the initiate scan :
public void startingOperation(Tablette tab){
IntentIntegrator integrator = new IntentIntegrator(tab.acti);

tab is the class which is extended Activity, and acti is its private attribute which contain this activity.

In the onActivityResult method, i'm looking for to retrieve my attributes which i have store into my previous activity (tab.acti).

Thanks for your help

Sean Owen

Nov 20, 2013, 3:28:27 PM11/20/13
to zx...@googlegroups.com
Don't really understand this, but: it's not guaranteed that your same Activity object exists to handle the reply; Android can restart your Activity. It may happen to be the same object. If you need to persist state, persist it with Android's mechanisms and reload it when the activity is created.
Reply all
Reply to author
0 new messages