Back to project page cube-sdk.
The source code is released under:
Apache License
If you think the Android project cube-sdk 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 in.srain.cube; /*from ww w . j a v a 2 s . c o m*/ import android.app.Application; import android.content.Context; import android.provider.Settings; import android.util.DisplayMetrics; import android.view.WindowManager; import in.srain.cube.util.LocalDisplay; import in.srain.cube.util.NetworkStatusManager; public class Cube { private static Cube instance; private Application mApplication; public static void onCreate(Application app) { instance = new Cube(app); } private Cube(Application application) { mApplication = application; // local display LocalDisplay.init(application); // network status NetworkStatusManager.init(application); } public static Cube getInstance() { return instance; } public Context getContext() { return mApplication; } public String getAndroidId() { String id = Settings.Secure.getString(mApplication.getContentResolver(), Settings.Secure.ANDROID_ID); return id; } }