如何添加本机代码以反应本机(EXPO)
我想从背景运行任务中将我的Expo应用程序带到前景,这是我在互联网上找到的唯一可以执行此操作的第三方软件包是 react-native-invoke-app ,但它不适用于Expo托管应用程序。
我认为我可以做到这三种方法,但我不知道如何实施其中的任何一个:
如何通过使用expo config插件?
如何复制其本机Java代码,该代码将应用程序带入我的Expo应用程序中?也许构建自定义开发客户
- nofollow noreferrer “>自定义开发客户我可以用来从背景运行任务中将博览会应用程序带到前景的方法?请参阅我的另一个问题关于此事
我将感谢任何形式的帮助
I want to bring my expo app to the foreground from a background running task, the only third-party package I found on the internet that can do this is react-native-invoke-app but it does not work with expo managed apps.
There are three ways I think I can do this but I do not know how to implement any of them:
How can I make this package compatible with expo by utilizing expo config plugin?
How can I copy their native java code that involves bringing the app to the foreground into my expo app? and perhaps build a custom dev clients
Is there any other method that I can use to bring an expo app to the foreground from a background running task? please see my other question on this matter
I will appreciate any form of assistance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的用例是什么?答案的一部分取决于您要做什么。
看起来像是通过推送通知可以通过推送通知来使用React-Native-invoke-App软件包,因此我将尝试利用推送通知。例如,您可以安排使用此软件包重复通知: https:https:/// github.com/expo/expo/tree/main/packages/expo-notifications
或设置firebase发送推送基于某些服务器逻辑,云功能或API请求的通知(您可以使用React-Native-background-fetch触发它们)。
您也可以使用深层链接,但这取决于您的用例。
据我所知,没有推动通知或深层链接,就无法将应用程序迫使应用程序进入前景。
What's your use-case? A bit part of the answer depends on what you're trying to do.
It looks like the react-native-invoke-app package works through push notifications, so I would try making use of push notifications. For example, you could schedule repeating notifications with this package: https://github.com/expo/expo/tree/main/packages/expo-notifications
Or set up Firebase to send the push notifications based on some server logic, cloud functions, or API requests (which you could trigger with react-native-background-fetch).
You could also make use of a deep link, but it depends on your use case.
As far as I know, there's no way to force an app into the foreground without a push notification or a deep link.