Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

米家推送无效 #27

Open
hudson-s opened this issue Mar 14, 2019 · 4 comments
Open

米家推送无效 #27

hudson-s opened this issue Mar 14, 2019 · 4 comments

Comments

@hudson-s
Copy link

按照demo 方式进行处理



<uses-permission

android:name="com.xiaomi.permission.AUTH_SERVICE" />

public static final String PUSH_MESSAGE = "com.xiaomi.push.message";
public static final String PUSH_COMMAND = "com.xiaomi.push.command";
public void registerPush() {
    IntentFilter filter = new IntentFilter();
    filter.addAction(PUSH_COMMAND);
    filter.addAction(PUSH_MESSAGE);
    registerReceiver(mReceiver, filter);
}

MJPushBroadcastReceiver mReceiver = new MJPushBroadcastReceiver() ;
@hudson-s
Copy link
Author



1 similar comment
@hudson-s
Copy link
Author



@M201370367
Copy link
Contributor

上面是全局的一个接受广播设定,接受消息前提是注册消息,可以使用接口MiotManager.getDeviceManipulator().addPropertyChangedListener。
当然,也可以在接口中添加监听器来监听状态的改变。

@hudson-s
Copy link
Author

多谢帮助解决,现在有个问题是 如果点击通知栏拉不起来主进程跳转activity跳转不过去这个应该怎么办

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants