I just developed an Android App which I´d like to distribute for free.
In order to be able to earn some money for my work, I´d like to add some adverts or notificati
I have used this approach:
Let's assume that in "My App" you will show ads, you can have somewhere a button "Remove Ads by donating" which takes the user to the market page for "My App Donate".
In My App you decide if you have to show or not an ad based on the fact that the package "My App Donate" is installed or not.
It sounds complicated, but it's super easy to implement. You can check if a package is installed with the following code:
public static boolean isPackageInstalled (final Context ctx, final String packageName) {
boolean result = false;
try {
final PackageManager pm = ctx.getPackageManager();
final PackageInfo pi = pm.getPackageInfo(packageName, 0);
if (pi != null && pi.applicationInfo.enabled)
result = true;
}
catch (final Throwable e) {
if (Dbg.IS_DEBUG) Dbg.debug("Package not installed: "+packageName);
}
return result;
}
ps. in-app billing is not so easy to integrate, moreover your app will be visible ONLY in the countries where in-app is supported. it's not worth it in your case.