我正在尝试将通知设置为广播接收器类..当手机重新启动时..
这是代码
public class OnBootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
aCtx=context.getApplicationContext();
String ns = aCtx.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager)getSystemService(ns);
}
}
我收到此错误“方法 getSystemService(String) 未定义为 OnBootReceiver 类型”
任何人请帮助:(