first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.nbee.echolink.broadcast;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.nbee.echolink.service.MonitorService;
|
||||
|
||||
public class BootCompletedReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
||||
// 启动您的服务或活动
|
||||
Intent serviceIntent = new Intent(context, MonitorService.class);
|
||||
context.startService(serviceIntent);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user