Мне нужно записать данные в файл, когда система не перезагружается при полной загрузке.Я использую широковещательный приемник "android.intent.action.REBOOT". Ниже приведен мой код и файлы манифеста
public class broadcastreceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
Log.i("LOG_TAG","rebooted");
}
файл манифеста:
<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>
, но я не могу написать дажелоги при перезагрузке.примечание: я не хочу использовать Bootcompleted action в широковещательном приемнике