Android Tutorial Android InApp Purchase Tutorial + Source Code

Beja

Expert
Licensed User
Longtime User
Hi Ilan,
Thanks for this great tutorial.. I have a question and not quite sure if it relates to this thread.
I have and app that controls an electronic device.. I will provide the app for free but sell the device.. Is the device considered in-app purchase?
Thanks.
 

aeric

Expert
Licensed User
Longtime User
In-app purchase only for digital products such as games upgrade or unlock premium features.
 

ilan

Expert
Licensed User
Longtime User

hmmm....thats a good question. i guess it could count as an inapp purchase but i am not sure. so the user purchase the hardware through the app and gets a coupon or somthing like that and you will send him the hardware?

i am not sure google allow such stuff and also why should you split the earning with google? you pay 30% for each inapp purchase i guess you should do it in a different way then using google services for that. maybe through paypal or something like that. so user hit the purchase button and enters all his information you open the relevant paypal link and you send him the hardware after the purchase. i think its simpler like that and you keep 100% of the purchase amount.
 
Last edited:

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
Hi @ilan, thanks for this tutorial.

Please help with these questions:

1) A login required?

2) If the user buy an item on a device it will be available on other device with same account?

3) Imagine the following scenario:

The player wins 5 coins per level. Now he has 125 coins and buy a coins pack (100 coins) now he has 225 coins. On game the player buy a new background color (spends 200 coins). After buy it the player cancels the purchase on play store. What happens? How to deal with it?

Okay many questions sorry. thank you for your time.
 
Last edited:

ilan

Expert
Licensed User
Longtime User
Hi EME,

1) A login required?
do you mean when the user performs the purchase? if yes then, as far as i know, yes but maybe he can also set it settings auto login. i am not sure anyway it has nothing to do with the library it is androids problem.

2) If the user buys an item on a device it will be available on another device with the same account?

YES. the reason for that is if he changes a device then why should he purchase again the item? i can understand why it is possible but again this is a google thing. we cannot control it and even if we can (there is a possibility) i am not sure we are allowed to block another device with the same account.


to tell you the truth i am not making to much money from in-app purchases. the big money is in ads. but what i know is that if someone wants to steal from you or another user its quite simple anyway. today you can almost download any PAID app for free. very little googling and you will see but you can still see that a lot of people buy apps. so don't bother too much about the 10-15% of the users that will try to get free stuff from google play, care more about the other 85%. most people don't see a big deal in purchasing an app. especially when they really like it they want to support the developer so he can update the app and make it better. don't forget we are talking here about few $ (most time 0.99$).

anyway, when you make the check for an in-app purchase you also ask for the HASBEENPURCHASED status. and i think if the user cancels the item it will change to false.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…