2

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!

MRJP
  • 43
  • 4
  • Were you able to ship in-app billing? I am facing lot of issues with build. Can you share your build script? – Gopinath Nov 29 '11 at 14:30

2 Answers2

0

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

Community
  • 1
  • 1
0

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)

Community
  • 1
  • 1
Taiko
  • 1,351
  • 1
  • 19
  • 35
  • How would I add a service that is declared in the native Java code? Specifically, the BillingService and BillingReceiver – MRJP Nov 09 '11 at 19:01