广播接收器不在android中工作

时间:2017-01-15 02:36:06

标签: android broadcastreceiver android-broadcastreceiver

我也在尝试系统广播和自定义。他们似乎都没有发布表示成功的祝酒信息。似乎有一个明显的错误,我无法发现。提前谢谢!

清单: -

 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.

        Toast.makeText(context,"Receved",Toast.LENGTH_LONG).show();
        System.out.println("Receved");

        //throw new UnsupportedOperationException("Not yet implemented");
    }
    }

MyReceiver: -

{{1}}

0 个答案:

没有答案