5
5
6
6
//3- got o AndroidSDK/extra/google/play_billing/sample
7
7
// copy all files in util folder to your app util folder
8
- // add aidl file to your project with name IInAppBillingService.aidl
8
+ //chnage apk name of head all files
9
+ // add aidl folder and copy it content from other project
10
+
9
11
10
12
//4- add product in your play console
11
13
12
14
//5- add this code to your activity
13
15
14
16
//***************************Payment***************************
15
- private static final String TAG =
16
- "com.alrubaye.familyfinder" ;
17
+ private static final String TAG ="Your_packge_ID" ;
17
18
// test ITEM_SKU android.test.purchased
18
19
// test token mypurchasetoken
19
- static final String ITEM_SKU = "com.alrubaye.addmembers " ;
20
+ static final String ITEM_SKU = "android.test.purchased " ;
20
21
IabHelper mHelper ;
21
22
22
23
IabHelper .OnIabPurchaseFinishedListener mPurchaseFinishedListener
@@ -58,10 +59,7 @@ public void onConsumeFinished(Purchase purchase,
58
59
IabResult result ) {
59
60
60
61
if (result .isSuccess ()) {
61
- // clickButton.setEnabled(true);
62
- GlobalClass .AdditionUsers =GlobalClass .AdditionUsers +1 ;
63
- FileLoad fileLoad =new FileLoad (getApplicationContext ());
64
- fileLoad .SaveData ();
62
+ // purchuase is done
65
63
} else {
66
64
// handle error
67
65
}
@@ -83,7 +81,7 @@ void PayItem(String ITEM_SKU){
83
81
//***************************************************************
84
82
// 7- in oncreate() add this code
85
83
//In app purchase
86
- String base64EncodedPublicKey = "your_key"
84
+ String base64EncodedPublicKey = "your_API_key" ;
87
85
88
86
mHelper = new IabHelper (this , base64EncodedPublicKey );
89
87
0 commit comments