how can implement in-app purchases in application?
i want disable ads if user paid me.
i spend lot of hours figure how works looking tutorials. saw lectures on youtube that. read on google developer site:http://developer.android.com/google/play/billing/billing_admin.html saw example codes. so, understood concept
i know how:
1. create new product.
2. create test account testing.
3. publish application beta/alpha.
so,my question is:
should in code?
how manage correctly?
if user paid money removing ads how application know if show him ads or not?
do need save data locally manage sharedpreference or getting status purchases automatically?
happen if user replace device?
google remember account , purchases?
need basic example :(.
few methods make
"buy()"
,
"isowned()"
checking if current user has paid ..
help me please
first of implement in-app purchase in application, can follow this link.
when user purchased item successfully, success status sent google.
after purchasing successfully, store flag value in sharedpreferences
, sqlitedatabase
or in server database through webservices.
now whenever showing ads in application, check flag value have stored.
1. if flag shows user have purchased item, don't show ads.
2. if flag value shows user did not purchase show ads.
google remember account , purches?
google fetch purchases user's email id. can restore purchase user, whenever user uninstalls app , dont want user purchase item again, give them option of restore. restore give product , give success status.
Comments
Post a Comment