I have 3 apps, that im now looking to merge into single one. Each app had its own set of IAB items. The new merged app will have all the IAB items aswell, however is it possible to tell if user has purchased given IAB item in the previous app so I can enable it in the new merge-app without paying again? Im looking for a solution different than handling sending the data to my own server, and downloading it in the new app etc. Ideally Google Play internally. Is this possible? Thanks
Is this possible?
No, You have to handle this with the help of your server. Google does not take care of what items you have bought from other app, if same item is available in different app then it would be consider a new different.
Simply, I guess that you have information of users who have bought items from your 3 apps, you can call web service, if user had bought then give all services to user otherwise ask for to pay.
Each app has its own product list. You cannot sell items that appear on another app's product list.
Google is not provding any way to do so.
Related
I have an app that has in-app purchases where users can purchase set of videos and there are ten of these sets. Now, before they do this they have to sign up for this app using their personal e-mail (not necessarily their phone's primary e-mail).
Since they have to log in this app, I was planning that they get the right to open the app and the set of videos they purchased from whatever device they use.
Problem:
After thinking about this and since this app is only directed towards local audience, I am afraid that users will pass their accounts to each other and my customer number will decrease.
Solution I thought about:
I will put a message when the users buy the set of videos that says: "These videos will only be viewed from the device you download it on". Which means I will use certain flags to ensure that an account will download them once. So that if someone is to share an account s/he won't be able to download because they where already downloaded.
Question:
If I do like this then if the user uninstalls this app, s/he will lose all the videos they purchased. Thus, if they install it again, they will have to buy the set of videos again. I am not sure if professional apps let the users have what they purchased back if they reinstalled the app or not.
So, is there a way that I can still use the solution that I thought about and still have my users regain what they bought before they uninstalled the app? Or do you have a completely different suggestion that can solve my problem.
Account sharing is a big topic. Daily business for Netflix and Amazon.
I'm not a big fan of your solution because of all the restrictions. I would suggest following approach:
User signs up in your App
You create a unique ID on the device (GUID - https://developer.android.com/training/articles/user-data-ids)
You store this data on the database plus the GUID on the device
You can now verify that the user has valid access.
I would suggest adding another field like max_guids=2. So that if the user looses the device he can still access his data (yes, this also means 1 single device sharing is possible, therefore you can detect irregularity with login sessions and ban the user).
Sounds better?
I have been searching how to generate redeem code for in app purchase in Android but no luck. I guess there is nothing like that. I developed an android app and I sell an item in the app. I want to give a code some users to buy the item with that code instead of paying. Is this possible ? Even if there is another ways to do ?
Thank you for replies.
There is no built-in mechanism for what you want to achieve on Google Play; you will have to build this yourself.
You should treat the content you want to offer independently from any in-app purchases and offer an in-app purchase and code input to unlock the content.
Keep in mind you will not be able to benefit from restored purchases when a user has used a code to unlock the content. So if the user clears the data on the app, their unlocked content will be gone unless you keep a server-side record of the content the user has unlocked.
I am adding iab to my application this days but after reading all the docs at google and doing some tests I have a doubt. When should I init the service? Is it a good time to do it at application initialization? Should I init the system every time the user wants to buy a product?
How do you handle this?
Cheers.
Okay so it's time for a full-flavoured answer I guess.
You bind to/unbind from the IAB service when you need to perform a transaction or retrieve information/are finished. No need to worry about performance there because this is a local service which does not necessarily connect to Google servers when you bind to it (only exception: a purchase, but that'll take some time anyway); it follows a different strategy to decide when to go online.
It's a good idea to sync your app's internal idea of what the user owns with the idea of IAB, as tjPark rightly says. Whether that's at the startup of your app or only after the user makes a couple of choices depends on your app. If you need to know for your splash screen what IAB items the user owns, then do it in your splash screen Activity. If it's only becoming relevant later, it makes more sense to query the IAB service later.
You should also carefully think of a consumption strategy which suits your need if your IAB items can be consumed.
Always be aware that IAB V3 uses caching extensively so even synchronizing your app with the IAB service does not necessarily get you the latest information. E.g. when a user buys an in-app product on device 1 and wants to use it on device 2, there will be a delay until it shows up. Or if you cancel a transaction in Google Checkout/Wallet and the device is offline, you also won't know immediately.
Don't use Google example code without refining it to achieve product maturity.
Know that IAB service responses can be subject to re-play attacks because you cannot provide a nonce with your request.
Know that if you don't have a server-side validation then your whole IAB code could be replaced by dummy code which simply returns positive responses.
http://developer.android.com/google/play/billing/api.html,
from above, Google said that
When your application starts or user logs in, it's good practice to check with Google Play to determine what items are owned by the user. To query the user's in-app purchases, send a getPurchases request. If the request is successful, Google Play returns a Bundle containing a list of product IDs of the purchased items, a list of the individual purchase details, and a list of the signatures for the purchases.
Checking on every init would give more protection for your products I guess
I have multiple items in my app. I have two devices. If I buy item on first of these devices and then try to buy on another one the same item, i can't.(Google play intent shows message - Item already owned! And then it crashes....:-( ) Items in google play are marked as "managed per user account". And I do not have any problem with buying items.
Another problem is, if I try RESTORE TRANSACTION ACTION - I got result_developer_error ( which is partly weird....):D
These issues tested on Android 2.2,4.1
My question is:
Is there any possibility to allow to buy this item multiple times without need that the item is marked as "unmanaged"? (I mean on different devices by the phrase multiple times)
If there is possibility? Can it be done without server side where the info will be stored?
I know that the simpliest solution is to change product_type - But then I will loose the chance for restore transaction action....
I followed google api on implementing the in-apps
http://developer.android.com/google/play/billing/billing_overview.html
note: implemented v2 in - apps
Managed items are tied to your account. So if you buy on a different device with the same Google account, you will get the 'already owned' error. If you use unmanaged items, you can buy the item as many times as you want. In this case you might need to track item state on your own server, if required. If you are using a test account to test this, restore transactions doesn't really work. Should work with a published app though.
In-app billing v3 handles this differently and should be slightly easier to manage. If this is for a new implementation, consider switching (or at least evaluating) v3. Not clear how stable (or not) it is though, since it is pretty new.
I have finally solved this issue by implementing new v3 in app billing. It's quite simple to implement version3 and it supports checking for transactions in very very better way. If I could i would send plus one to google for version3. If you are lookng for solution for this issue use this site "Google in app billing version 3"
I folloed this tutorial to implement in-app in my application:
http://blog.blundell-apps.com/simple-inapp-billing-payment/
The user can now purchase my item (com.myitem) with in-app system. After that, I set in a Shared Preference that the user has been purchased the item.
The problem is if the user uninstalla and reinstall the app.
So the question is: how can I check if the user has been already purchased the item?
I know that I should use restore BillingHelper.restoreTransactionInformation(...) on RESTORE_TRANSACTION...but where, and how?
I checked Dungeon example, but it seems to hard and complex to unterstand. There's a simple way to do that?
Thank you
Using RESTORE_TRANSACTION is the only way if you use managed purchases. If you use unmanagaed purchases, you can store the purchase state on your own server, but that is hardly simpler. There is nothing complex about RESTORE_TRANSACTIONS: you just fire the command and you get notified with transaction information that is in the exact same format as what you get when you first purchase an item. You should process it in the exact same way, and chances are you already have the code for that in your app. Testing this is somewhat harder, because it doesn't really work with test accounts, and you need a live app. Go over the official documentation again to understand how it works.