Android examples for Hardware:Battery
get Battery Status
//package com.java2s; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; public class Main { private static Intent getBatteryStatus(Context context) { IntentFilter filter = new IntentFilter( Intent.ACTION_BATTERY_CHANGED); return context.registerReceiver(null, filter); }// ww w . j a v a2 s . c o m }