1
시스템 부팅이 완료되었지만 수신자가 실행되지 않았거나 LogCat에 아무런 아이디어가없는 것을 감지하려고하는 BroadcastReceiver가 있습니다. ?부팅시 android.intent.action.BOOT_COMPLETED가 실행되지 않습니다.
AndroidManifest를
<!-- SIM Card Receiver -->
<receiver android:name=".SIMChangeNotifierActivity" android:enabled="true" android:exported="false">
<intent-filter android:priority="1001">
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
브로드 캐스트 리시버에
public class SIMChangeNotifierActivity extends BroadcastReceiver {
public void onReceive(Context context, Intent intent)
{
if("android.intent.action.BOOT_COMPLETED".equals(intent.getAction()))
{
Log.e("TAG", "Boot completed");
}
}
이 BOOT_COMPLETED – nandeesh
에 대한 매니페스트에 권한을 추가? http://commonsware.com/blog/2011/07/05/boot-completed-regression.html – CommonsWare
BOOT_COMPLETED이 (가) 트릭을했습니다! 감사! – dythe