android - 从 Android 中的前台服务调用 Unity 函数
问题描述
我想知道现在这是否可能。我希望能够在我的android应用程序中使用unitysendmessage,而它处于后台状态或者更好的是仍然在后台运行更新功能(仅在此服务处于活动状态时)
我确实有一个单独的前台服务在某个实例中运行,假设 30 秒后我需要杀死应用程序或将其带到前台,我对 android 开发非常陌生,并且仍然对意图的想法和活动,
运行此代码段:
Intent notificationIntent = new Intent(this, myActivity.getClass());
startActivity(notificationIntent);
似乎只是在打开应用程序(在这种情况下是基于统一的应用程序)时再次启动后台服务。
这里的任何帮助将不胜感激
解决方案
推荐阅读
- java - 在 JOOQ 的选择中使用 UNNEST
- flutter - Flutter:将字符串与点运算符一起使用
- java - 如何从动态标题/文本中仅提取数字?
- java - 如何从具有特定属性的 ArrayList 中打印一个或多个对象?
- mysql - MySQL 工作台:将表列复制到目标列将数据附加到目标列的底部而不是顶部。为什么?
- r - 从 ggplot2 中删除零线
- php - 尝试用 axios 发送数据报错 404 not found laravel/vue
- typescript - 如何在 TypeScript 中使用 date-fns?
- eclipse-plugin - 如何在自定义的 Eclipse 中安装自己编写的插件?
- flutter - 数值未显示在颤振图表上