Enable Billing Activity
Learn how to enable billing activity
First step of integrating Centili Android Library is adding CentiliLib.jar in your android project/lib/ folder. You need to add .jar file to project build path.
The payment library requires that c.mpayments.android.BillingActivity be declared in your app's AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company"
android:versionCode="1" android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="true">
<activity android:label="@string/app_name" android:name="LibExample">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="c.mpayments.android.BillingActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:hardwareAccelerated="true"
android:configChanges="keyboardHidden|orientation"/>
</application>
</manifest>
Permissions
Library requires the following permissions:
- INTERNET
- ACCESS_NETWORK_STATE
- SEND_SMS
- READ_SMS
- WRITE_SMS
- RECEIVE_SMS
- CHANGE_WIFI_STATE and
- CHANGE_NETWORK_STATE
so these must also be declared in the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company"
android:versionCode="1" android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.WRITE_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="true">
<activity android:label="@string/app_name" android:name="LibExample">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="c.mpayments.android.BillingActivity"
android:hardwareAccelerated="true"
android:configChanges="keyboardHidden|orientation"/>
</application>
</manifest>
Next step...
Updated over 1 year ago