<receiver
android:name="com.orcatracker.functions.BootService">
<intent-filter >
<action
android:name="android.intent.action.BOOT_COMPLETED">
</action>
</intent-filter>
</receiver>
如何在应用启动时启动接收器?我在manifest.xml中使用了以下权限
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
答案 0 :(得分:-1)
以下代码用于调用BROADDCAST RECEIVER:
Intent intent = new Intent(this,BootCompletedIntentReceiver.class);
sendBroadcast(intent);// this line is use to start broadcast.