当您收到带有onesignal的推送通知时,将自动打开应用程序 [英] Open the app automatically when you receive a push notification with onesignal

查看:85
本文介绍了当您收到带有onesignal的推送通知时,将自动打开应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在收到推送通知而无需任何用户操作的情况下在应用程序中打开活动. 可以使用onesignal或其他方式通过推送自动打开应用程序吗?

I would like to be able to open an activity in the application when a push notification is received without any user action. Is it possible to do with onesignal or some other way to open the app automatically using a push?

推荐答案

您可以简单地在FirebaseMessagingService.onMessageReceived内部启动家庭活动,但是如果当前正在运行应用程序,则不必这样做.您需要一种控制器,并检查

You can simply start your home activity inside FirebaseMessagingService.onMessageReceived But if application is currently running you don't have to do that. You need kind of controller and check is application in foreground

这篇关于当您收到带有onesignal的推送通知时,将自动打开应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆