27 lines
516 B
Java
27 lines
516 B
Java
|
package com.police.policedatasystem;
|
||
|
|
||
|
import android.app.Application;
|
||
|
import android.os.Handler;
|
||
|
|
||
|
|
||
|
public class MyApplication extends Application {
|
||
|
private static MyApplication instance;
|
||
|
private static Handler handler;
|
||
|
|
||
|
|
||
|
public static MyApplication getInstance() {
|
||
|
return instance;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void onCreate() {
|
||
|
super.onCreate();
|
||
|
handler = new Handler();
|
||
|
instance = this;
|
||
|
}
|
||
|
|
||
|
public static Handler getHandler() {
|
||
|
return handler;
|
||
|
}
|
||
|
}
|