Extensiones nativas de Air para la facturación integrada en la aplicación de Android

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?

¡Gracias!

preguntado el 08 de noviembre de 11 a las 15:11

Were you able to ship in-app billing? I am facing lot of issues with build. Can you share your build script? -

2 Respuestas

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 : Extensiones nativas de AIR 3 para Android: ¿puedo / cómo incluir bibliotecas de terceros?

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

Después :

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

Puedes agregar permisos

Después :

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

Puede agregar actividades y servicios.

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>

Escribir :

                <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)

contestado el 23 de mayo de 17 a las 14:05

How would I add a service that is declared in the native Java code? Specifically, the BillingService and BillingReceiver - MRJP

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

contestado el 23 de mayo de 17 a las 15:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.