anjlab / android-inapp-billing-v3 Goto Github PK
View Code? Open in Web Editor NEWA lightweight implementation of Android In-app Billing Version 3
License: Other
A lightweight implementation of Android In-app Billing Version 3
License: Other
First of all: Awesome library. Saved me a lot of time.
Not sure if that's possible, but I think so.
A Method to query all available items (sku's) in the play-store.
Hi, nice library & nice work! We use a design pattern where various billing functions are handled from within the Application singleton. Is there any reason you've chosen to initialize within an Activity context?
The workaround is to add a callback from the MainActivity to the Application and then implement BillingProcessor from the Application, but it's a hack. Any recommendations?
// Initialize android-inapp-billing-v3 from within the Main Activity onCreate() method
MyApplication myApp = (MyApplication)getApplication();
myApp.initBillingOnMainActivity(this);
sometimes if I don't consume the purchased consumable, the next time I'm doing
bp = new BillingProcessor(this, null, this);
I'm getting the following Exception:
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=2; index=2
at com.anjlab.android.iab.v3.BillingCache.load(BillingCache.java:57)
at com.anjlab.android.iab.v3.BillingCache.<init>(BillingCache.java:41)
at com.anjlab.android.iab.v3.BillingProcessor.<init>(BillingProcessor.java:93)
Hi,
we didn't get the correct errormessage from Google in the onBillingError method.
We tested it with a not exixting subscription. onBillingError gave us always the BILLING_ERROR_OTHER_ERROR = 110 back.
Shouldn't it be "Requested product is not available for purchase" ( ResponseCode=4) ?
Is it a bug?
Thx
Tom
I have my system setup like the example
bp = new BillingProcessor(this,PublicKey,new BillingProcessor.IBillingHandler()
{
@Override
public void onBillingError(int arg0, Throwable arg1) {
// TODO Auto-generated method stub
showToast("Billing Error");
dialog();
}
@Override
public void onBillingInitialized() {
// TODO Auto-generated method stub
showToast("Billing Intialized");
if(bp.loadOwnedPurchasesFromGoogle() == true)
{
showToast("Items Loaded");
}
}
@Override
public void onProductPurchased(String arg0) {
// TODO Auto-generated method stub
showToast("Product");
}
@Override
public void onPurchaseHistoryRestored() {
// TODO Auto-generated method stub
showToast("Restored");
if(bp.isPurchased("sku_upgrade"))
{
FV.setFullVersion(0);
showToast("Owned");
}else
{
FV.setFullVersion(1);
showToast("Not Owned");
}
}
});
}
The problem is bp.loadOwnedPurchasesFromGoogle is never calling onPurchaseHistoryRestored()
In example i have seen bp.purchase(PRODUCT_ID); for one product may i know how it works with multiple products.
Hi,
I have a issue with the billing library. I have an activity where you can purchase a product. The activity name is "InAppBillingActivity". That's worked very fine. You can purchase a product and if you start this screen again it tells you that you have purchased this product (like described in the example).
But normally you start this screen only one time. Only to buy the product.
Now I want to ask Google in my standard startscreen "MainActivity" if this product is purchased. The result of bp.isPurchased(PRODUCT_ID) iin the MainActivity is always "false". What do I wrong.????
Is it because I have different context's ? How can I solve this problem?
Thanks for your help
Tom
The InAppBillingActivity where you can buy the product:
bp = new BillingProcessor(this, LICENSE_KEY, new BillingProcessor.IBillingHandler() {
@Override
public void onProductPurchased(String productId) {
// Schreibe LoginInfos in DB, wer hat wann zuletzt WatchGEOFriends gestartet
new StoreInAppBillingData(InAppBillingActivity.this, productId, Defaults.PROGRAMMNAME,_sp.getSharedPrefs(InAppBillingActivity.this, Defaults.PROGRAMMNAME, "GCNickName", "")).execute();
_sp.saveSharedPrefs(InAppBillingActivity.this, Defaults.PROGRAMMNAME, "InAppProduct", Defaults.IN_APP_BILLING_PRODUCT_ID_1.toUpperCase());
updateTextViews();
}
@Override
public void onBillingError(int errorCode, Throwable error) {
}
@Override
public void onBillingInitialized() {
readyToPurchase = true;
updateTextViews();
}
@Override
public void onPurchaseHistoryRestored() {
for(String sku : bp.listOwnedProducts())
Log.d(LOG_TAG, "Owned Managed Product: " + sku);
updateTextViews();
}
});
In my MainActivity I have following Code to ask if the product is purchased:
bp = new BillingProcessor(this, LICENSE_KEY, new BillingProcessor.IBillingHandler() {
@Override
public void onProductPurchased(String productId) {
}
@Override
public void onBillingError(int errorCode, Throwable error) {
}
@Override
public void onBillingInitialized() {
if(bp.isPurchased(PRODUCT_ID))
{
adView.setVisibility(View.GONE);
}
else
{
// Look up the AdView as a resource and load a request.
adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
}
}
Thanks for your work.
Is it possible on glance to use openIAB and this lib together?
Using inapp-billing version 1.0
compile 'com.anjlab.android.iab.v3:library:1.0.+@aar'
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2061984, result=0, data=null} to activity {com.utopia.musicoff/com.utopia.musicoff.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.deliverResults(ActivityThread.java:3368)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3411)
at android.app.ActivityThread.access$1300(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5050)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.lang.NullPointerException
at com.anjlab.android.iab.v3.BillingProcessor.handleActivityResult(BillingProcessor.java:297)
at com.utopia.musicoff.activities.BaseBillingActivity.onActivityResult(BaseBillingActivity.java:107)
at android.app.Activity.dispatchActivityResult(Activity.java:5423)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3364)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3411)
at android.app.ActivityThread.access$1300(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5050)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(NativeStart.java)
Hi,
This library is very helpful to me. Thanks ๐
But i am facing one issue. Purchase dialog is showing with correct products and price and all.
After buying product m nt getting callback in (i m following the same code which u have submitted callback in IBillingHandler at the time of creating instance of the BillingProcessor)
(1)At first time when user is purchasing product
int response = bundle.getInt(Constants.RESPONSE_CODE); in billing processor responce = BILLING_RESPONSE_RESULT_OK & invoking startIntentSenderForResult but m not getting any callback like IBillingHandler#onProductPurchased or IBillingHandler#onBillingError
(2)And Second time if user try to purchase same product its showing ALREADY OWN
So what can be the issue from my side that its not giving callback at first attempt ..
Thanks
Was working when i left a day ago, came back today, nothing but this, every other app works
Add an option to verify purchase signature, the same way as Google's IabHelper does.
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms flg=0x80000 pkg=com.android.vending }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1675)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1467)
at android.app.Activity._logged_startActivityForResult(Activity.java:3467)
at android.app.Activity.startActivityForResult(Activity.java:3460)
at android.app.Activity._logged_startActivityForResult(Activity.java:3420)
at android.app.Activity.startActivityForResult(Activity.java:3414)
at android.support.v4.app.FragmentActivity.startActivityForResult(SourceFile:840)
at android.app.Activity._logged_startActivity(Activity.java:3702)
at android.app.Activity.startActivity(Activity.java:3691)
at android.app.Activity._logged_startActivity(Activity.java:3662)
at android.app.Activity.startActivity(Activity.java:3656)
at com.google.android.gms.dynamic.a$5.onClick(Unknown Source)
at android.view.View.performClick(View.java:4647)
at android.view.ViewRootImpl.performClickHelper(ViewRootImpl.java:910)
at android.view.ViewRootImpl.performClick(ViewRootImpl.java:919)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3385)
at android.os.Handler.dispatchMessage(Handler.java:122)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5105)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
SDK affected
4.2.2
37%
4.4.2
27%
4.1.2
14%
4.1.1
11%
4.4.3
8%
4.0.4
3%
4.3
3%
Spent about an hour trying to fix why it wouldn't compile until I found the "Multiple Dex declarations" and after google-Fu, i found the issue was having the aidl file installed. This library already has it.
Was tracking down a bunch of funky errors that didn't make sense...
Thought it might help the next soul with this issue.
Cheers
First i want to say this library is GREAT, thank you very much for it!
I just have one problem, when the user makes the payment he has to delete the app and install it again in order to get
bp.isPurchased(product_id) == TRUE
is there something i have to delete or modify to get "bp.isPurchased(product_id)" to TRUE without reinstalling the app?
java.lang.NullPointerException
at com.anjlab.android.iab.v3.BillingBase.getPreferencesBaseKey(BillingBase.java:37)
at com.anjlab.android.iab.v3.BillingProcessor.isPurchaseHistoryRestored(BillingProcessor.java:352)
at com.anjlab.android.iab.v3.BillingProcessor.access$100(BillingProcessor.java:38)
at com.anjlab.android.iab.v3.BillingProcessor$1.onServiceConnected(BillingProcessor.java:78)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1049)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1066)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4028)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(NativeStart.java)
?
Im using in a Fragment, and i get this error Activity Result Fragment Index Out Of range so in success purchase does not trigger, if the user "click" again it triggers but not after "buying"
Fantastic library, extremely useful, however how might i go about extending it to consume purchases?
How to set developerPayload with your library? It's very important security feature but i can't find the way to use it in README, is it missing from your library?
my build.gradle
contains the following
repositories {
mavenCentral()
}
dependencies {
compile 'com.anjlab.android.iab.v3:library:1.0.13'
...
but I'm always getting failed to find com.anjlab.android.iab.v3:library:1.0.13
. It also doesn't work with compile 'com.anjlab.android.iab.v3:library:1.0.+@aar'
Hello!
Great work, thank you!
I get a little problem with it, when I want to send data of the purchase to my own server. There is no method which return INAPP_PURCHASE_DATA and INAPP_DATA_SIGNATURE content. May be add it as a parameter of onProductPurchased()? Or as a separate methods...
At now I just save it in a onActivityResult() and than use it in a onProductPurchased():
private Intent mData;
@Override
public void onProductPurchased(String productId) {
if(mData!=null) {
mData.getStringExtra("INAPP_PURCHASE_DATA");
mData.getStringExtra("INAPP_DATA_SIGNATURE");
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
mData=data;
if (!bp.handleActivityResult(requestCode, resultCode, data)) super.onActivityResult(requestCode, resultCode, data);
}
But I think, that is not is a best way.
Hi, after reading this:
http://stackoverflow.com/questions/15762370/does-google-play-in-app-billing-version-3-support-refunds
And this:
http://blog.blundell-apps.com/simple-inapp-billing-payment-v3/
I came to the conclusion that there is a way to understand if an order is purchased or refunded, since i am refunding quite often and i dont want those user to still be "pro" forever, is there any way to get this state with this library (which i love btw)?
Thanks!
How can i check if a subscription is expired?
When I call isSubscribed() it always return true, even if user has deleted the subscription.
I'm not sure if this is suppose to be supported but when opening the Google Play window the app originally pauses. Might be an issue with threads.
Do you have an suggestions on using the app with threads if this is the case?
Hi There,
Thank you for your work on this library. While testing this library, I found an error - cachedSubscriptions cache has no data if the subscription is successful. only purchased product is cached via cachedProducts.put(productId, purchaseToken);
Thanks,
Daniel
I couldn't find a way to get the skuDetails
Frontpage README talks about "Merchant Key" and then in the code snippet it's "License Key". Developer console offers per-app License Key's and Google Wallet offers Merchant Key. Which one is it? Maybe you could also add info on where to get it to the README.
The TransactionDetails should be able to return the raw json object which you're using in it's constructor.
This is mandatory for validating the purchase from an own server. So if a user buys something, gplay returns smth, this library checks if it is valid or not. If I want to inform our server that, the user purchased something, I need the raw json object, to verify the purchase again. Otherwise, users could recreate the request to our server and get whatever he wanted to have, without the playstore at all.
So if you could add a method to the transaction details, that return the JsonObject, which you're using to parse the details out of it.
Everything works as it should when I compile and run my apk, but once I generate the signed apk and run that I always get the following error when I initialize the BillingProcessor:
java.lang.NullPointerException
at re.getPreferencesBaseKey(SourceFile:36)
at rf.c(SourceFile:41)
at rf.d(SourceFile:45)
at rf.<init>(SourceFile:37)
at com.anjlab.android.iab.v3.BillingProcessor.<init>(SourceFile:88)
at net.steamcrafted.craftable2.app.act.MainActivity.setupAds(SourceFile:325)
at net.steamcrafted.craftable2.app.act.MainActivity.onCreate(SourceFile:207)
at android.app.Activity.performCreate(Activity.java:5241)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
at android.app.ActivityThread.access$800(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5081)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
at dalvik.system.NativeStart.main(Native Method)
I`m trying to buy android.test.purchased (test product from google). And get error 102.
Here is my code:
@OverRide
public void onBillingInitialized() {
billingProcessor.consumePurchase("android.test.purchased");
billingProcessor.purchase(this, "android.test.purchased");
}
@Override
public void onProductPurchased(String productId, TransactionDetails details) {
Toast.makeText(this, "onProductPurchased", Toast.LENGTH_LONG).show();
}
@Override
public void onBillingError(int errorCode, Throwable error) {
Toast.makeText(this, "Error code = " + errorCode, Toast.LENGTH_LONG).show();
}
I just implemented this library and uploaded my app. Crashlytics is now reporting issues:
Device: SM-N910F (Note 4)
Android: 4.4.4
Rooted: No
Device: C6603
Android: 4.4.4
Rooted: No
java.lang.NullPointerException
at com.anjlab.android.iab.v3.BillingProcessor$1.onServiceConnected(SourceFile:84)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1105)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1122)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5748)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(NativeStart.java)
How could this happen even though line 83 checks if (eventHandler != null) ?
Btw. I'm using ProGuard (DexGuard) and I initialize the BIllingProcessor in onCreate of the MainAcitivity like this:
bp = new BillingProcessor(this, keyString, new BillingProcessor.IBillingHandler() {
@Override
public void onProductPurchased(String productId, TransactionDetails details) {
...
After checking if Google Play Services is available and creating an instance of BillingProcessor some users are reporting that the UI never loads.
The only way this could happen is if "onBillingInitialized" is never called. Is this possible?
Thanks
Any way to test purchases using android.test.purchased
with this library? Any mock security verifier? As playstore returns empty RESPONSE_INAPP_SIGNATURE
.
public void onCreate(Bundle savedInstanceState) {
...
bp = new BillingProcessor(this, license_key, null);
...
// If i try to check directly in the onCreate method it doesn't work
// Is like the bp object is not initialized or something
if (bp.isPurchased(product_id)) {. }
...
// However if i try to do it in a button inside
// the onCreate method it works perfectly!
btn = (Button) findViewById(R.id.btn);
btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// This works!!
if (bp.isPurchased(product_id)) { }
}
});
...
}
I know i should use threads, etc, but this should work, doesn't it? I mean even using it on the onCreate method the main thread should stop on the "bp = new BillingProcessor(this, license_key, null);" until it gets initialized and then continue with the code...
I did some testing:
Do you have any idea? What should I do to deal with this situation? Thanks
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2061984, result=0, data=null} to activity {com.lovelyhq.android.lovelydocs/com.lovelyhq.android.lovelydocs.controllers.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.deliverResults(ActivityThread.java:3351)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3394)
at android.app.ActivityThread.access$1300(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.anjlab.android.iab.v3.BillingProcessor.boolean handleActivityResult(int,int,android.content.Intent)(:234)
at com.lovelyhq.android.lovelydocs.controllers.MainActivity.void onActivityResult(int,int,android.content.Intent)(:527)
at android.app.Activity.dispatchActivityResult(Activity.java:5423)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3347)
... 11 more
Is there a reason BillingProcessor calls for an Activity rather than a Context? I am trying to implement this library in a support library of my own, and find I have no Activities to pass in. https://github.com/anjlab/android-inapp-billing-v3/blob/master/library/src/com/anjlab/android/iab/v3/BillingProcessor.java#L88
Hey, thank you developing that useful library.
I've problem with loadOwnedPurchasesFromGoogle function. Consider that user has paid app with in-app billing and I've save that user has bought app and unlock all the features. On every loading of app i check loadOwnedPurchasesFromGoogle and isPurchased both but if the user cancels his payment loadOwnedPurchasesFromGoogle and isPurchased still returns true? What's the main problem?
in MainActivity
bp = new BillingProcessor((Activity) context,
context.getString(R.string.key),
new IBillingHandler() {
@Override
public void onPurchaseHistoryRestored() {
}
@Override
public void onProductPurchased(String productId, TransactionDetails details) {
android.util.Log.d("onProductPurchased: ", productId);
}
@Override
public void onBillingInitialized() {
boolean loadOwnedPurchasesFromGoogle = bp.loadOwnedPurchasesFromGoogle();
if (loadOwnedPurchasesFromGoogle) {
if (bp.isPurchased(Constants.PRODUCT_ID)) {
Toast.makeText(context, "Product is already purchased", Toast.LENGTH_LONG).show();
PreferenceHelper.setProVersion(context, true);
}else PreferenceHelper.setProVersion(context, false);
}
}
@Override
public void onBillingError(int errorCode, Throwable error) {
android.util.Log.d("onBillingError: ", Integer.toString(errorCode));
}
});
Wouldn't it be nice to extend the Method "onProductPurchased(String sku)" to "onProductPurchased(String sku, String transactionID)"?
My case:
You buy ingame credits in my app.
Theory:
So I purchase an item, wait for "onProductPurchased" and tell my server that the user gets 100 credits more. After that I consume that item, to let the user buy that item again.
Usecase:
When the user buys the item, I get "onProductPurchased" and now the connection is lost. In that case I can wait till the connection is there again, check if the user has some unconsumed items, tell my server to add the credits and then consume them.
My server does not know, if the user got those credits already, cause there's no unique identifier. So in theory, he could stop the app (however he'll do that) before consuming (and after he got he credits from my server). Then restart the app get coins for free, because I will check for not consumed items and tell my server to give him more credits.
If the user repeats that, it would be a big cheat.
If I would have the transactionID I would use this as unique identifier and I could ignore these requests and consume the item.
Get my point?
Bug found in Android 2.3.6, Samsung Galaxy S2 mini GT-S6500D after BillingProcessor initialization. I was unable to reproduce it on other devices.
01-05 14:36:56.859: E/AndroidRuntime(16059): FATAL EXCEPTION: main
01-05 14:36:56.859: E/AndroidRuntime(16059): java.lang.NullPointerException
01-05 14:36:56.859: E/AndroidRuntime(16059): at com.anjlab.android.iab.v3.BillingBase.getPreferencesBaseKey(BillingBase.java:37)
01-05 14:36:56.859: E/AndroidRuntime(16059): at com.anjlab.android.iab.v3.BillingProcessor.isPurchaseHistoryRestored(BillingProcessor.java:352)
01-05 14:36:56.859: E/AndroidRuntime(16059): at com.anjlab.android.iab.v3.BillingProcessor.access$100(BillingProcessor.java:38)
01-05 14:36:56.859: E/AndroidRuntime(16059): at com.anjlab.android.iab.v3.BillingProcessor$1.onServiceConnected(BillingProcessor.java:78)
01-05 14:36:56.859: E/AndroidRuntime(16059): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1064)
01-05 14:36:56.859: E/AndroidRuntime(16059): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1081)
01-05 14:36:56.859: E/AndroidRuntime(16059): at android.os.Handler.handleCallback(Handler.java:587)
01-05 14:36:56.859: E/AndroidRuntime(16059): at android.os.Handler.dispatchMessage(Handler.java:92)
01-05 14:36:56.859: E/AndroidRuntime(16059): at android.os.Looper.loop(Looper.java:130)
01-05 14:36:56.859: E/AndroidRuntime(16059): at android.app.ActivityThread.main(ActivityThread.java:3768)
01-05 14:36:56.859: E/AndroidRuntime(16059): at java.lang.reflect.Method.invokeNative(Native Method)
01-05 14:36:56.859: E/AndroidRuntime(16059): at java.lang.reflect.Method.invoke(Method.java:507)
01-05 14:36:56.859: E/AndroidRuntime(16059): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
01-05 14:36:56.859: E/AndroidRuntime(16059): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
01-05 14:36:56.859: E/AndroidRuntime(16059): at dalvik.system.NativeStart.main(Native Method)
BTW. Great library, thanks for developing it ;-).
I think it may have been a problem with the original IAB v3 code? Are you aware of this?
If an item is already owned the dialog is never shown and on purchase complete is fired every time.
I only change
bp.verifyPurchasesWithLicenseKey("MY_KEY");
I get MY_KEY from SERVICES & APIS => YOUR LICENSE KEY FOR THIS APPLICATION
But i always got alert "Billing was not init yet".
Hello there,
what's the licence? Can you add a licence file to the repo? :)
Cheers.
i want to get price of items to show on shop ui, so, how to? plz.
Here the error in the logs :
java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.android.vending.billing.InAppBillingService.BIND }
With the L preview released on 17th October
Library are working perfectly, but is not protected from the application of freedom app
Please explain to me how I can protect the application from hacker
Thank you
Hello, I asked this on stackoverflow also, any ideas why it can happen?
I am getting "Authentication is required. You need to sign in to your Google Account."
I have uploaded a Alpha apk to play and added the required items to the developer account.
I have tried this on two different devices, both only with one google account setup.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.