Back to project page powerstats.
The source code is released under:
GNU General Public License
If you think the Android project powerstats 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 com.znasibov.powerstats; /*from w w w . ja va 2s . c o m*/ import android.app.Application; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; import net.danlew.android.joda.JodaTimeAndroid; public class PowerStatsApplication extends Application { private static Context context; @Override public void onCreate() { super.onCreate(); PowerStatsApplication.context = getApplicationContext(); UserPreferences.init(getAppContext()); JodaTimeAndroid.init(this); startService(new Intent(getApplicationContext(), PowerStatsLoggerService.class)); } public static Context getAppContext() { return PowerStatsApplication.context; } }