How to save an onActivityResult result?

listed in answer

How to save an onActivityResult result?
0 votes, 0.00 avg. rating (0% score)

ANSWER:

Usage of shared preferences is best fit for you, see here

Edit:

  • Added source below in response to your comment;

    private static final String PREFERENCES_CONTADORLIGA =  "ChangeThisTextWithSomethingYouPrefer";
    private static final String PREFERENCES_CONTADORLIGA_KEY = "ChangeThisTextWithSomethingYouPrefer";
    
    
    public void onCreate(Bundle savedInstanceState)
    
    
        // Restore preferences
        SharedPreferences settings = getSharedPreferences(PREFERENCES_CONTADORLIGA, Context.MODE_PRIVATE);
        contadorliga = settings.getInt(PREFERENCES_CONTADORLIGA_KEY, 0);
    
    
    
    
    protected void onDestroy() 
    
    
        super.onDestroy();
    
        // We need an Editor object to make preference changes.
        // All objects are from android.context.Context
        SharedPreferences settings = getSharedPreferences(PREFERENCES_CONTADORLIGA, Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = settings.edit();
        editor.putInt(PREFERENCES_CONTADORLIGA_KEY, contadorliga);
    
        // Commit the edits!
        editor.commit();
    
    

I hope this should work for you. Good Luck!

by Gökhan Barış Aker from http://stackoverflow.com/questions/10609935