Any idea what I could try?

On Jan 18, 12:29 am, fhucho <fhu...@gmail.com> wrote:
> 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" /
>
>         </intent-filter>
> </reciever>
>
> But ChargingOnReceiver is not started when I put my G1 to charger
> (connect to my notebook via USB cable).
> Any help is much appreciated.
-- 
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

Reply via email to