确保Android应用程序,从游戏商店安装 [英] Make sure the Android application was installed from Play-Store

查看:208
本文介绍了确保Android应用程序,从游戏商店安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发现了黑市的应用程序,这是谷歌播放商店的应用程序,而这些人需要支付的应用程序从播放商店,并让他们的用户下载并免费使用它裂口。

I've recently discovered the BlackMarket application, it is a rip of Google Play-Store apps, where these people take a paid app from the Play-Store and let their users download it and use it for free.

由于它在充电降压我的应用程序计划一个开发人员,这困扰着我,我想确保我的应用程序是通过播放商店安装,或任何商店,我赞成。

As a developer which plan on charging a buck for my app, this bothers me, and I would like to make sure that my application was installed via the Play-Store, or whatever store I approve of.

我想,以验证这种事情的唯一方法是通过运动跟踪,但由于谷歌Analytics(分析)V2,运动的跟踪与在瓶接收器完成。

I guess that the only way to verify this sort of thing is via the campaign tracking, but since Google analytics v2, the tracking of the campaign is done with in a receiver in the Jar.

有没有其他的方法来确定我的应用程序安装的起源? 有没有办法拦截活动跟踪数据?

Is there any other way to determine the origin of the installation of my app? Is there a way to intercept the campaign tracking data?

感谢。

推荐答案

检查此链接<一个href="http://developer.samsung.com/forum/thread/getinstallerpackagename-return-value-in-samsung-phones/77/177735"相对=nofollow>此处。然后

PackageManager pm = getPackageManager();
String installationSource = pm.getInstallerPackageName(getPackageName());

在从标记的安装,在 installationSource 将返回类似 com.google.android% com.android.vending%。然而,这种改变,你必须保持(支持)是在发生变化的 - 否则将返回null(从调试器)或其它的什么包名,从其他应用程序(不想要的:))

When installed from the marked, the installationSource will return something like com.google.android% or com.android.vending%. However this changes and you have to maintain (support) it in case of a change - otherwise it will return null (from debugger) or some other package name, from some other application (the undesired ones :))

这篇关于确保Android应用程序,从游戏商店安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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