I have a database with one row of data that will be used across a number of activities. I need to be able to keep the row id available in all activites so I can read and wri
Another way is to create a application class which is available for all activities. To do that, you have to extend you Manifest with
and create a new Class
public class MyApplication extends Application {
public int rowId = 0;
}
inside the activities, you can access the rowId by
int mRowId = ((MyApplication) getApplicationContext()).rowId;