简体   繁体   English

从JAR通知APK

[英]Notifying APK from JAR

I have an APK, that imports a JAR which in-turn uses a JNI library. 我有一个APK,可以导入JAR,然后依次使用JNI库。 Once the library is done with a task, it calls back the JAR (reverse-JNI) and now I need to call back the APK as the last step in this entire chain of data flow. 库完成任务后,它会回调JAR(反向JNI),现在我需要回调APK作为整个数据流链中的最后一步。 Is there a standard way of doing this? 有这样做的标准方法吗? The JAR is a simple class (not based on activity) JAR是一个简单的类(不基于活动)

This is the forward path: APK -> JAR -> JNI (done and working) 这是前进的路径:APK-> JAR-> JNI(完成并正常工作)

This is the backward path: JNI -> JAR (working via reverse-JNI). 这是向后的路径:JNI-> JAR(通过反向JNI工作)。 Now, need this 现在,需要这个

JAR -> APK (the apk is activity based). JAR-> APK(apk基于活动)。 Would truly appreciate any feedback 非常感谢任何反馈

在jar中,创建一个侦听器并在APK中实现,然后在需要JNI-> JAR-> APK的APK中注册它,只需调用侦听器方法即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM