使用应用内购买删除广告 [英] Removing Ad's with in-app-purchase

查看:26
本文介绍了使用应用内购买删除广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找有关如何通过应用内购买删除应用程序中的广告的教程或说明?

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

我会在我的应用中放置一些带有 ad-mob 的广告,但我也希望用户可以在支付一点捐款时禁用这些广告.你知道一个网站或教程,我可以在其中找到如何执行此操作的分步说明吗?

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?

或者我需要发布我的应用的 2 个版本吗?一个有广告,一个没有广告付费?

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

推荐答案

不要使用 SharedPreferences 方法,因为如果用户刷新应用数据或卸载/重新安装您的应用,他们的无广告状态将丢失.

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.

几个想法:

  1. 如果您的应用具有任何基于网络的登录或授权,您可以通过更新网络数据库的客户数据来标记用户购买了无广告版本,然后在登录和验证后禁用代码中的广告.这还有一个额外的好处,那就是跟随用户使用新设备.
  2. 使用多种方法之一获取唯一的设备 ID,并将其存储在网络服务器数据库中.启动时,查询数据库以查看设备是否无广告.请参阅 Android 唯一设备 ID.不过,这仅适用于该特定设备.
  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. :)

这篇关于使用应用内购买删除广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆