I am setting global variables in a class which extends from Application. Just getting confused with the basics. The the following code is working but is it a right way to do it ?
public class GlobalMV extends Application{
private static final String TAG = "Global";
private String userid, pwd, name, station;
@Override public void onCreate ()
{
Thread.setDefaultUncaughtExceptionHandler(
new UncaughtExceptionHandler(){
@Override
public void uncaughtException(Thread arg0, Throwable arg1) {
Functions.CustomToastLong(getApplicationContext(), arg0.toString() + arg1.toString());
}
}
);
super.onCreate();
}
public GlobalMV(){
userid ="000000";
pwd="";
}
Is onCreate() and constructor both can be there ?