用android studio写的,在写好后,测试发现完全接收不到发来的广播,无法触发onReceive方法下面是代码

我写了一个广播接收者,用androidstudio写的,在写好后,测试发现完全接收不到发来的广播,无法触发onReceive()方法下面是代码接收者:packagecom... 我写了一个广播接收者,用android studio写的,在写好后,测试发现完全接收不到发来的广播,无法触发onReceive()方法下面是代码接收者:package com.example.mrz.broadcast;import android.content.BroadcastReceiver;import android.content.Context;import android.content.Intent;public class MyReceiver extends BroadcastReceiver {public MyReceiver() { }@Override public void onReceive(Context context, Intent intent) {// TODO: This method is called when the BroadcastReceiver is receiving // an Intent broadcast. System.out.println("12345678");throw new UnsupportedOperationException("Not yet implemented"); }}API是23 展开
 我来答
李滇华
2016-05-22 · TA获得超过360个赞
知道答主
回答量:703
采纳率:100%
帮助的人:98.5万
展开全部
我写了一个广播接收者,用android studio写的,在写好后,测试发现完全接收不到发来的广播,无法触发onReceive()方法下面是代码
接收者:

package com.example.mrz.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
我写了一个广播接收者,用android studio写的,在写好后,测试发现完全接收不到发来的广播,无法触发onReceive()方法下面是代码
接收者:

package com.example.mrz.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class MyReceiver extends BroadcastReceiver {
public MyReceiver() {
}

@Override
public void onReceive(Context context, Intent intent) {
// TODO: This method is called when the BroadcastReceiver is receiving
// an Intent broadcast.
System.out.println("12345678");
throw new UnsupportedOperationException("Not yet implemented");
} 我写了一个广播接收者,用android studio写的,在写好后,测试发现完全接收不到发来的广播,无法触发onReceive()方法下面是代码
接收者:

package com.example.mrz.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class MyReceiver extends BroadcastReceiver {
public MyReceiver() {
}

@Override
public void onReceive(Context context, Intent intent) {
// TODO: This method is called when the BroadcastReceiver is receiving
// an Intent broadcast.
System.out.println("12345678");
throw new UnsupportedOperationException("Not yet implemented");
}
}

API是23
}

API是23
public class MyReceiver extends BroadcastReceiver {
public MyReceiver() {
}

@Override
public void onReceive(Context context, Intent intent) {
// TODO: This method is called when the BroadcastReceiver is receiving
// an Intent broadcast.
System.out.println("12345678");
throw new UnsupportedOperationException("Not yet implemented");
}
}

API是23
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式