There are multiple things you can use in this case:
- Shared Preferences
- static variables (not recommended)
More Related Contents:
- onActivityResult is not being called in Fragment
- How to define dimens.xml for every different screen size in android?
- onSaveInstanceState () and onRestoreInstanceState ()
- Android: Clear the back stack
- Removing an activity from the history stack
- How to prevent custom views from losing state across screen orientation changes
- Android activity over default lock screen
- Pass data from Activity to Service using an Intent
- How to check if an activity is the last one in the activity stack for an application?
- Android: Clear Activity Stack
- How to get hosting Activity from a view?
- How to cancel an Dialog themed like Activity when touched outside the window?
- android: how do i open another app from my app?
- Are parameters in strings.xml possible? [duplicate]
- Notify activity from service
- How can I pass values between Activities on Android?
- Concatenate multiple strings in XML?
- How open new activity clicking an item in listview?
- android:configChanges=”orientation” does not work with fragments
- How to detect if any of my activity is front-most and visible to user?
- Change word color in resource string
- Android checking whether the app is closed
- OnCreateView called multiple times / Working with ActionBar and Fragments
- Can i automatically send SMS (Without the user need to approve)
- Is there a faster way to decode html characters to a string than Html.fromHtml()?
- Android: startActivityForResult & setResult for a view class and an activity class
- Convert hex string to byte []
- How to have activity in Android with a close button at the top corner?
- What method is being called when I close an app
- Can you have two activities running at the same time?