I created a class that extends the application to store the variables that I want to get from several actions.
public class MyApplication extends Application
{
private String fbId, firstName;
private long expires;
@Override
public void onCreate()
{
super.onCreate();
}
public String getFbId()
{
return fbId;
}
public void setFbId(String fbId)
{
this.fbId = fbId;
}
public String getFirstName()
{
return firstName;
}
public void setFirstName(String firstName)
{
this.firstName = firstName;
}
I can access these variables and set these variables when I first run the application. As soon as I leave and restart the application, it will set my values to zero, any suggestions as to why this could happen?
source
share