摘要:
使用之前的一些准备:https://developers.google.com/maps/documentation/android/start#get_an_android_certificate_and_the_google_maps_api_key(官网的详细教程)Creating a new Android application that uses the Google Maps Android API v2 requires several steps. Many of the steps outlined in this section will only have to be 阅读全文
摘要:
使用动态注册监听系统广播(电池的广播)当电池时间改变的时候系统将发出广播,使用 下面的来注册(不能在manifest中声明)来监听到变化,做出相应的变化IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_BATTERY_CHANGED); registerReceiver(receiver, filter); 1 public class BatteryReceiverDemo extends Activity { 2 public static final String TAG = "B. 阅读全文