I want to create a class for some value such that changes to it is reflected across all the classes.
For example:
If I create a class
public class CheckForAlreadyLoggedIn extends Application {
public int getState(){ return state; }
public void Setstate(int s) { state = s; }
private static int state;
}
I want to set and get the value in other different classes in android studio. I am thinking is there a possibility to achieve this situation in android studio, with the help of creating the global object for that class and use it everywhere freely?
help me to resolve this issue....
thanks in advance..........