适用于 Android 应用内计费的 Air Native 扩展

发布于 2024-12-14 07:51:28 字数 260 浏览 1 评论 0原文

我正在尝试设置本机扩展以通过空中应用程序处理应用内计费。

我可以向市场发送购买请求,但无法收到回复。

我已经追踪到创建的 AndroidManifest.xml 文件。为了在 Java 中执行此操作,您需要引用特定的类,但是当我通过 Flash 执行此操作时,我不知道如何引用这些 Java 类。

据我所知,Native 扩展只允许您从 Java 调用方法。有什么方法可以通过 Flash 在清单文件中引用这些特定的 Java 类吗?

谢谢!

I'm trying to set up native extensions to work with in-app billing through an air app.

I'm able to send purchase requests to the market but I'm not able to get a response back.

I've tracked it down to the AndroidManifest.xml file that gets created. In order to do it in Java you need to reference specific classes, but when I do it through Flash I don't know how to reference those Java classes.

As far as I know Native extensions only allow you to call methods from Java. Is there any way I would be able to reference those specific Java classes through Flash in the manifest file?

Thanks!

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

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

发布评论

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

评论(2

你げ笑在眉眼 2024-12-21 07:51:28

我不确定我是否完全理解你的问题,但这里有一些答案的要素:

-Native extensiosn 有 java 库的问题,它也可能是 aidl 文件的问题: 适用于 Android 的 AIR 3 本机扩展 - 我可以/如何包含3rd 方库?

-关于清单添加,您可以这样修改最终 apk 的清单:
转到 NAMEOFYOURAPP-app.xml

之后:

<!--The suppression of android.permission.INTERNET will prevent you from debugging.-->
                <uses-permission android:name="android.permission.INTERNET"/>

您可以添加权限

之后:

<![CDATA[
    <manifest android:installLocation="auto">

您可以添加活动和服务。

在你的情况下,而不是:

            <application android:enabled="true">
                <activity android:excludeFromRecents="false">
                    <intent-filter>
                        <action android:name="android.intent.action.MAIN"/>
                        <category android:name="android.intent.category.LAUNCHER"/>
                    </intent-filter>
                </activity>
            </application>

写:

                <application android:enabled="true">
                    <activity android:excludeFromRecents="false">
                        <intent-filter>
                            <action android:name="android.intent.action.MAIN"/>
                            <category android:name="android.intent.category.LAUNCHER"/>
                        </intent-filter>
                    </activity>

<service android:name="BillingService" />

<receiver android:name="BillingReceiver">
  <intent-filter>
    <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
    <action android:name="com.android.vending.billing.RESPONSE_CODE" />
    <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
  </intent-filter>
</receiver>

                </application>

但为了你的应用程序工作,你仍然需要修复一些 .jar 问题(如上所述)

I am not sure I understand your question fully, but here are some elements of answer:

-Native extensiosn have an issue with java libraries, it might also be a problem with aidl files : AIR 3 Native Extensions for Android - Can I/How to include 3rd party libraries?

-About the manifest additions, you can modify the manifest of the final apk this way :
Go to NAMEOFYOURAPP-app.xml

After :

<!--The suppression of android.permission.INTERNET will prevent you from debugging.-->
                <uses-permission android:name="android.permission.INTERNET"/>

You can add permissions

After :

<![CDATA[
    <manifest android:installLocation="auto">

You can add activities and services.

In your case, instead of :

            <application android:enabled="true">
                <activity android:excludeFromRecents="false">
                    <intent-filter>
                        <action android:name="android.intent.action.MAIN"/>
                        <category android:name="android.intent.category.LAUNCHER"/>
                    </intent-filter>
                </activity>
            </application>

Write :

                <application android:enabled="true">
                    <activity android:excludeFromRecents="false">
                        <intent-filter>
                            <action android:name="android.intent.action.MAIN"/>
                            <category android:name="android.intent.category.LAUNCHER"/>
                        </intent-filter>
                    </activity>

<service android:name="BillingService" />

<receiver android:name="BillingReceiver">
  <intent-filter>
    <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
    <action android:name="com.android.vending.billing.RESPONSE_CODE" />
    <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
  </intent-filter>
</receiver>

                </application>

But for your applicaiton to work, you still have to fix some .jar problems (as states above)

旧梦荧光笔 2024-12-21 07:51:28

您可以像引用本机 java 一样引用清单中的类。如果您遇到任何问题,请参阅可以将应用内付款的清单接收器移至 Java 代码吗?

You can have reference to the classes in manifest as you do for native java. please refer Can Manifest Receiver for In app payment be moved to Java code instead? if you come across any issue

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