部署导入我的类的 AIDL

发布于 2024-10-02 07:22:00 字数 160 浏览 1 评论 0原文

我必须让其他开发人员能够连接到我的服务,但我的 AIDL 导入了我的类。 我不想给他们服务的源代码,只是 APK 和某种存根文件(java、jar?)。 我怎样才能给他们一些东西——“粘合剂”——让他们使用我的 AIDL 中的类并使用服务 akp 而无需获取服务的来源?

感谢您的任何提示!

I have to make other developers to be able to connect to my service, but my AIDL imports my classes.
I don't want to give them the source code of the service, just the APK and some kind of a stub file (java, jar?).
How can I give them something - "the glue" - which makes them to use the classes in my AIDL and using the service akp without getting the sources of the service?

Thanks for any hints!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

感情洁癖 2024-10-09 07:22:00

我必须让其他开发人员能够连接到我的服务,但我的 AIDL 导入我的类

如果“我的类”是指您自己的实现 Parcelable 的类,请从您的 API 中删除它们。

恕我直言,唯一稳定的远程服务 API 是那些完全依赖于操作系统提供和管理的东西的 API。这意味着您必须坚持使用 Android 提供的原语、列表/映射和 Parcelable 类(例如,BundlePendingIntent)。

否则,您必须将源代码发送到您的 Parcelable 类,然后在您决定更改这些类实现时处理兼容性问题。

但是,如果“我的课程”指的是其他内容,您可能希望编辑您的问题并进一步解释您的意思。例如,您可以发布 AIDL 文件。

I have to make other developers to be able to connect to my service, but my AIDL imports my classes

If by "my classes" you mean your own classes that implement Parcelable, get rid of them from your API.

IMHO, the only stable remote service APIs are ones that depend solely on things supplied and managed by the operating system. That means you stick to primitives, lists/maps, and Parcelable classes supplied by Android (e.g., Bundle, PendingIntent).

Otherwise, you have to ship the source code to your Parcelable classes, then deal with compatibility issues should you ever decide to change those class implementations.

If, however, "my classes" refers to something else, you may wish to edit your question and explain a bit further what you mean. For example, you might post the AIDL file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文