如何在 MonoDroid 中使用应用内结算?

发布于 2024-12-19 15:49:32 字数 604 浏览 2 评论 0原文

我正在开发一个 Android 应用程序,需要使用应用内计费。我在 Visual Studio 中使用 Monodroid,我的经验是 C#,我对 Java 不太熟悉。

我的问题是:

1)如何在 Visual Studio 中引用 IMarketBillingService.aidl?是不是和 Eclipse 中一样,必须放在 src\com\android\vending\billing 文件夹中?另外,它是否需要是 .aidl 文件,或者我可以为其创建 ac# 接口类吗?

2) 有谁知道c# 中的Android 应用内计费教程/示例吗?我已查看示例并阅读了此处的所有文档。

由于没有任何 Java 经验,跟随示例有点困难。我已经到处搜索,但没有找到任何有关 MonoDroid 应用内计费的文档,因此任何帮助/链接将不胜感激!

谢谢!

编辑:还有一个问题:是否可以通过 MonoDroid 使用应用内结算?

I am developing an Android application that will need to make use of In-app billing. I am using Monodroid in Visual Studio and my experience is in C#, I am not very familiar with Java.

My questions are:

1) How do I reference the IMarketBillingService.aidl in Visual Studio? Is it the same as in Eclipse where you have to put it in the src\com\android\vending\billing folder? Also, does it need to be a .aidl file or can I just create a c# interface class for it?

2) Does anyone know of any Android in-app billing tutorials/examples in c#? I have looked at the sample and have read all of the documentation here.

Not having any experience in Java makes it a little difficult to follow the sample. I have searched everywhere and have not found any documentation on in-app billing with MonoDroid, so any help/links would be much appreciated!

Thanks!

EDIT: One more question: Is it even possible to use in-app billing with MonoDroid?

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

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

发布评论

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

评论(2

梦回旧景 2024-12-26 15:49:32

Android SDK 工具将为暴露的远程服务生成一个代理类安卓市场。如果 MonoDroid 有类似的工具,您需要了解如何使用它并生成必要的文件。如果没有,一种方法是使用标准 SDK 工具在 Java 中生成一个,然后手动将其移植到 C#。如果您不熟悉 Java,您应该花一些时间参加速成课程。语法与 C# 没有太大不同,因此应该相对容易理解。

拥有代理后,您应该能够从 C# 连接到计费服务。

您可能会在官方 MonoDroid 论坛、邮件列表等上获得更好的答案。

The Android SDK tools will generate a proxy class for the remote service exposed by the Android market. If MonoDroid has a similar tool, you need to find out how to use it and generate the necessary files. If not, one way would be to generate one in Java using the standard SDK tools, and then manually port it to C#. If you are not familiar with Java, you should take some time for a crash course. Syntax is not that different from C#, so it should be relatively easy to follow.

Once you have the proxy, you should be able to connect to the billing service from C#.

You might get better answers on official MonoDroid forums, mailing lists, etc.

狼性发作 2024-12-26 15:49:32

我正在尝试将该库转换为 C#:

https://github.com /jmawebtech/MonoGame-StarterKits/tree/master/Android/InAppBilling

欢迎签入代码或提供建议。

I am trying to translate that library into C#:

https://github.com/jmawebtech/MonoGame-StarterKits/tree/master/Android/InAppBilling

Feel free to check in code or provide suggestions.

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