eggheadgames / android-in-app-payments Goto Github PK
View Code? Open in Web Editor NEWSupport Android Google Play and Amazon in-app billing (IAP) payments with one API
License: MIT License
Support Android Google Play and Amazon in-app billing (IAP) payments with one API
License: MIT License
At the moment it is not possible to tell if something was purchased or restored.
Please add a way for the API to indicate which it is so that analytics can tell the difference, plus possibly useful in the future.
Let's get the full lint, PMD and SpotBugs (FindBugs) checking running, like we do on our other projects.
Apparently the AIDL we’re using now is deprecated. We should update:
Migration guide:
https://developer.android.com/google/play/billing/migrate
Main docs:
https://developer.android.com/google/play/billing/billing_library_overview
The Amazon API that returns products can only handle requests for a maximum of 100 products at a time. We need to fix that somehow.
Here is the relevant Amazon documentation:
https://s3-us-west-1.amazonaws.com/devportal-reference-docs/iap/API-Reference/index.html
Look for PurchasingService.getProductData
, where it says:
skus - Set of SKUs. If the size of the set is greater than 100, an IllegalArgumentException is thrown.
Hi,
Are you planning to upgrade Google Play Billing Library to newest version 4.0.0?
Google contacted us (Egghead Games) warning that our "family friendly" app status is in jeopardy because:
We have detected the use of Amazon SDK
This turns out to be because this library is being used, and it always includes the Amazon file libs/in-app-purchasing-2.0.76
regardless of whether it is an APK built for Google Play or Amazon app stores.
The solution adopted is to use the Android flavor
mechanism to build this aar
so that the app can choose the correct flavor at build time. Details are in the README.md file.
This is (will be) fixed in version 3.0.0 of the library.
FYI, here is the full version of the Google notification email (after querying them for details):
During review, we found that your app (removed name of app) violates the policy: Families Ads Program
We have detected that your app includes non-certified ad SDKs and/or SDKs that are not approved for use in child-directed services. Any SDKs used in the app must be appropriate for use in child-directed services. Additionally, apps that solely target children must not contain any SDKs that are not approved for use in child-directed services, including ads SDKs. Apps in the Designed for Families program must only use ad SDKs that have certified their compliance with the Families Ads Program.
You can read through the Families Policy Requirements, Designed for Families Requirements, and Ads and Monetization policy for more information.
We have detected the use of Amazon SDK, which is not allowed in apps that are in the Families program. An ad SDK is not allowed if it has not self-certified its compliance with Play’s Families Ads Program (certified ad SDKs), or it is non-COPPA compliant per its own public documentation. Please note, the status of SDKs often changes and it is your responsibility to review documentation of all SDKs used in your app to ensure compliance with Families policies
Hi,
Your library seems great thanks for it, but is there a way to know a product is NOT owned ?
We know only when is it owned with the onProductRestored or onSubscriptionRestored callback, but we don't know when it is not owned.
A least a callback notifying when products or subscriptions lookup is finished would be great.
Please tell me is there is a way to do something similar.
Thanks !
A suggestion from #10: Callbacks on the main thread, like onPricesUpdated
Hi,
My apps is currently using version 2.0.0. Do i need to update to 3.0.0?
I checked releases, but not found any critical issues.
Thank you for very good IAP Lib!
A Google Play customer reports that if she purchases on one device and then tries to refresh her 2nd device (using the same Play account), that the new purchase doesn't register for 1-2 days.
However, if she tries to purchase the same volume on the 2nd device, it says: "You already own this". However, our library doesn't handle this and unlock the volume.
Is there something we can do about this, or are we at the mercy of Google?
I've just started using this library for my app, and couldn't for the life of me figure out why I wasn't getting any responses from the server.
After debugging through the code, it turns out you guys are expecting a rot-13 encoded key in the init method. It might be a good idea to document that somewhere.
Nice work on the lib btw!
How can I get my subscription details so that I can show that to the user.
Let's update to the latest (Sep 1, 2016) SDK 2.0.76 from our current version of 2.0.61.
According to the release notes, https://developer.amazon.com/docs/in-app-purchasing/iap-whats-new.html, the only change is:
Products returned by the
getProductData
API now include a Coins reward amount, an optional field that surfaces the amount of Amazon Coins a customer will be rewarded after purchasing that product
This shouldn't affect us (except perhaps we ignore that extra value?) because we don't do anything with Coins rewards.
We should update the library to use this new link from Google:
On Android, open the Google Play Store, then tap Menu > Subscriptions.
On a computer, go to play.google.com, then in the left menu click My
subscriptions.
On either Android or a computer, use the URL
http://play.google.com/store/account/subscriptions to open the user's list
of subscriptions.
For active subscriptions, use the deep-link
http://play.google.com/store/account/subscriptions?package=samplePackage&sku=sampleSKU
with your package and SKU name to directly open the page to manage the
user's specific subscription. Learn more about the manage subscription
deep-link by checking out our documentation for subscription-specific
features.
Action required
Please update the instructions in your app or website to reflect this
change. If you are currently deep-linking to
http://play.google.com/store/account/ to manage subscriptions, please be
sure to update your instructions to one of the recommended options listed
above.
Ah, it looks like this is in the IAP library, here:
I.e. this code:
@Override
public void unsubscribe(Activity activity, String sku, int id) {
try {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://play.google.com/store/account"));
activity.startActivity(intent);
activity.finish();
} catch (Exception e) {
e.printStackTrace();
}
}
So we need to replace the URL there I think...
I'm pretty curious about why you deal this way with the string key for google in app. I'm getting 'InvalidKeySpecException', an example project with the library would help.
Per discussion in #10, it would be nice to have an init
function for Amazon that does not require a key, e.g. something like:
public static void init(boolean enableLogging) {
init(null, enableLogging)
}
public static void init(String key, boolean enableLogging) {
if(key!=null){
billingService.init(key);
}
billingService.enableDebugLogging(enableLogging);
}
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.