I need to trigger a broadcast receiver  when it starts to reboot/
reboots not when boot_completed .
i not able to trigger the broadcast receiver.
below is my code
public class broadcastreceiver extends BroadcastReceiver{
 @Override
 public void onReceive(Context context, Intent intent) {
 Log.i("LOG_TAG","rebooted");
}
manifest file
<application android:icon="@drawable/icon" android:label="@string/
app_name">
<activity android:name=".broadcast"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="com.example.broadcastreceiver.broadcastreceiver"
android:enabled="true"
android:exported="true"
android:permission="android.permission.REBOOT">
<intent-filter>
<action android:name="android.intent.action.REBOOT" />
</intent-filter>
</receiver>
</application>

i need to write in to file some data  when phone starts rebooting.

thanks to all in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to