删除广告与客栈的应用程序购买客栈、应用程序、广告

2023-09-08 15:56:41 作者:尐女杀人魔

我正在寻找一个小教程或交代如何,我可以在我的应用程序中删除的广告与旅馆应用程序内购买? 我会放一些广告与AdMob的在我的应用程序,但我也想,用户可以禁用广告的时候,他付出一点捐赠。你知道一个侧面或教程在那里我可以找到一个小小的一步一步交代做到这一点? 或者我需要发布两个版本我的应用程序?其中有广告的,一个没有广告的支付? 对于任何idears还是不错的解决方案?

i am searching for a little tutorial or an explaination for how i can remove advertisement in my application with inn-app-purchase? I will put some ad's with admob in my app but i also want, that the user can disable the ad's when he pay a little donation. Do you know a side or tutorial where i can find a little step by step explaination to do this? Or do i need to publish 2 versions of my app? One with ad's and one without ad's for paying? Any idears or good solutions for that?

感谢

推荐答案

因为如果用户刷新该应用程序的数据或卸载/重新安装您的应用程序,请不要使用共享preferences方法,其广告的地位将会丢失

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.

一对夫妇的想法:

如果您的应用程序有任何形式的基于网络的登录名或授权的,你可以标记用户为已购买了广告的免费版本通过更新网页数据库中的客户数据,然后禁用以下登录和验证在code广告。这具有以下用户新设备的额外的好处。 使用的几种方式来获得一个唯一的设备ID,并存储在一个Web服务器数据库之一。在启动时,查询数据库,以查看是否该设备是无广告。请参见 Android的唯一的设备ID 。该特定设备,虽然这仅仅工作。 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. 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. :)