Skip to content

Commit 50c22ea

Browse files
author
hussienalrubaye
committed
purchuase
1 parent c283d02 commit 50c22ea

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

in app purchase.java

+7-9
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@
55

66
//3- got o AndroidSDK/extra/google/play_billing/sample
77
// 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+
911

1012
//4- add product in your play console
1113

1214
//5- add this code to your activity
1315

1416
//***************************Payment***************************
15-
private static final String TAG =
16-
"com.alrubaye.familyfinder";
17+
private static final String TAG ="Your_packge_ID";
1718
// test ITEM_SKU android.test.purchased
1819
// test token mypurchasetoken
19-
static final String ITEM_SKU = "com.alrubaye.addmembers";
20+
static final String ITEM_SKU = "android.test.purchased";
2021
IabHelper mHelper;
2122

2223
IabHelper.OnIabPurchaseFinishedListener mPurchaseFinishedListener
@@ -58,10 +59,7 @@ public void onConsumeFinished(Purchase purchase,
5859
IabResult result) {
5960

6061
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
6563
} else {
6664
// handle error
6765
}
@@ -83,7 +81,7 @@ void PayItem(String ITEM_SKU){
8381
//***************************************************************
8482
// 7- in oncreate() add this code
8583
//In app purchase
86-
String base64EncodedPublicKey = "your_key"
84+
String base64EncodedPublicKey = "your_API_key" ;
8785

8886
mHelper = new IabHelper(this, base64EncodedPublicKey);
8987

0 commit comments

Comments
 (0)