Back to project page android-checkers-app.
The source code is released under:
Apache License
If you think the Android project android-checkers-app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package edu.unlv.sudo.checkers; /* ww w . j a v a 2 s . c om*/ import android.app.Application; import android.content.ContentResolver; import android.content.Context; import android.provider.Settings; /** * This class keeps track of any global information used in the application. */ public class CheckersApplication extends Application { private static CheckersApplication instance; private static Context appContext; private static ContentResolver contentResolver; @Override public void onCreate() { super.onCreate(); instance = this; appContext = getApplicationContext(); contentResolver = getContentResolver(); } /** * @return the instance for this application. */ public static CheckersApplication getInstance(){ return instance; } /** * @return the application context. */ public static Context getAppContext() { return appContext; } /** * @return the unique identifier for this device. */ public static String getDeviceUid() { return Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID); } }