Hi, I want to do something after the the phone is put into charger. So I created ChargingOnReciever:
public class ChargingOnReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { context.startActivity(someActivity); } } and I put this into manifest: <reciever android:name="ChargingOnReceiver"> <intent-filter> <action android:name="android.intent.action.ACTION_POWER_CONNECTED" /> <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" /> </intent-filter> </reciever>
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en