39 lines
694 B
Java
39 lines
694 B
Java
|
|
package com.tianrun.sipcall;
|
||
|
|
|
||
|
|
import android.content.Context;
|
||
|
|
import android.util.Log;
|
||
|
|
|
||
|
|
import androidx.multidex.MultiDexApplication;
|
||
|
|
|
||
|
|
|
||
|
|
public class App extends MultiDexApplication {
|
||
|
|
|
||
|
|
public static String TAG = "ApplicationAPP";
|
||
|
|
private static App sInstance;
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public void onCreate() {
|
||
|
|
super.onCreate();
|
||
|
|
sInstance = this;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static App getInstance() {
|
||
|
|
return sInstance;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static Context getContext() {
|
||
|
|
return sInstance;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static String getRString(int resid) {
|
||
|
|
return sInstance.getString(resid);
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public void onTerminate() {
|
||
|
|
super.onTerminate();
|
||
|
|
Log.e(TAG, "Application终止");
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|