是否可以通过 NDK 提供应用内计费?
我正在考虑使用 Gingerbread 的 NativeApplication
通过 NDK 创建游戏。我还希望能够使用 Google 向开发人员提供的新应用内计费 API。我知道它还不是最终确定的 API,但我还没有看到通过 NDK 与其交互的示例。
有谁知道如何通过 NDK 使用应用内计费,或者我应该考虑启动另一个使用 Java API 的 Activity 吗?
I'm looking in to creating a game through the NDK using a NativeApplication
for Gingerbread. I also want to be able to use the new in-app billing API Google is providing to developers though. I know it's not a finalized API just yet but I haven't seen an example of interacting with it through the NDK.
Does anyone have an idea of how it could be possible to use the in-app billing through the NDK or should I look into launching another Activity that uses the Java API?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应用内计费API是一个Binder接口。当您发出购买请求时,市场应用程序将接管并在您的应用程序之上显示一个(部分透明)活动,从而呈现购买对话框。
如果您想通过 NDK 访问它,我的建议是使用 JNI 与我们提供的示例代码建立桥梁。我不相信您可以从 NDK 访问 Binder。
The in-app billing API is a Binder interface. When you make a purchase request, the Market application takes over and displays a (partially transparent) activity on top of yours, which renders the purchase dialog.
If you want to access this through the NDK, my advice would be to make a bridge to the sample code we provide using JNI. I don't believe you have access to the Binder from the NDK.