Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Manually Build IAP Extension

Deqing Huang edited this page Jul 1, 2014 · 1 revision

Most likely you need to following all steps below to build an IAP extension for the first time.

1. Generate Java class from AIDL

aidl -p/path/to/android-<version>/framework.aidl /path/to/iap/com/android/vending/billing/IInAppBillingService.aidl

2. Build AIDL related Java class

cd /path/to/xwalk-extensions/iap/util
javac -d . *.java -classpath /path/to/out/Debug/lib.java/xwalk_app_runtime_client_java.jar:/path/to/android-<version>/android.jar -sourcepath ../

3. Copy to the IAP path

/// (TODO) Maybe it is better to separate source code and binary code
cd /path/to/xwalk-extensions/iap
cp -R util/org/xwalk/extensions/iap/util org/xwalk/extensions/iap/
cp -R util/com/android/vending/billing com/android/vending/

4. Build IAP plugin

javac -d . iap.java -classpath /path/to/xwalk/src/out/Debug/lib.java/xwalk_app_runtime_client_java.jar:/path/to/android-<version>/android.jar:.
jar cvf iap.jar org com

5. Package IAP plugin with your application

cd /path/to/xwalk/out/Debug/xwalk_app_template
python make_apk.py --name=iap --package=org.xwalk.extensions.iap --permissions=iap --extensions="/path/to/iap" --arch=x86 --manifest=/path/to/yourapp/manifest.json