I am using global variables in the following class:
public class VariablesOpcion_HassMovil extends Application {
private String cuenta=null;
public String getCuenta(){
return this.cuenta;
}
public void setCuenta(String Cuenta){
this.cuenta=Cuenta;
}
}
and in Oncreate
I have the following:
VariablesOpcion_HassMovil variables = (VariablesOpcion_HassMovil) getApplication();
variables.setCuenta("encargado");
My problem is that variable
I need to use not only in OnCreate
and I have tried to put it out to use it in any side of the activity but it marks me error, how could I do it?