Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing Ad's with in-app-purchase

I'm searching for a tutorial or an explanation on how to remove advertisement in my application with in-app purchase?

I will put some ads with ad-mob in my app but I also want, that the user can disable the ads when he pays a little donation. Do you know a site or tutorial where I can find a step-by-step explanation how to do this?

Or do I need to publish 2 versions of my app? One with ads and one without ads for paying?

like image 865
Informatic0re Avatar asked Feb 17 '12 09:02

Informatic0re


People also ask

How to remove ads in-app purchase?

You can simply make a button to make in-app purchase in your application. And, once the user presses the button, starts the in-app process, and removes the ads. Make a flag. It can be in your shared preferences and can be marked true on successful in-app purchase.

How do I disable in-app purchases in Android Studio?

Go to your Google Play Developer Console -> Choose your app -> Click In-app Products -> Click on the in-app product and change it from active to inactive.

What does in-app purchases mean in App Store?

An in-app purchase is any additional purchase made within an app, like extra lives in a game. You can turn in-app purchases on or off on Apple and Android devices with just a few taps.

Are in-app purchases optional?

Many in-app purchases are optional, but they give users access to additional features that could potentially elevate their experience and engagement with the app. In-app purchases allow developers to offer the app for free in the App Store (for iOS) and Google Play (for Android).


2 Answers

Don't use the SharedPreferences method because if the user flushes the app data or uninstalls/reinstalls your app their ad-free status will be lost.

A couple of ideas:

  1. If your app has any kind of web based login or authorization, you can flag the user as having bought the ad free version by updating the web database's customer data and then disable ads in code following login and verification. This has the added benefit of following the user to new devices.
  2. Use one of the several ways to get a unique device id, and store that in a web server database. On startup, query the DB to see if the device is ad-free. See Android Unique Device ID. This will only work for that particular device though.

The two apps approach is simple enough to get the job done too. :)

like image 68
Maz Avatar answered Nov 03 '22 00:11

Maz


This presentation seems to explain an example and includes a link to source code at github: http://gotocon.com/dl/2011/GeekNights/Tjen_penge_p%C3%A5_Android_ARH.pdf . It stores the purchased upgrade at a sharedpreference.

However, I'm still looking for a more secure and robust solution that works out the use-case explained here: http://vlingo-en.custhelp.com/app/answers/detail/a_id/1785/~/moving-in-app-purchase-(ad-removal)-to-new-android-phone/p/180

like image 26
alexx Avatar answered Nov 03 '22 01:11

alexx