确定如果用户安装的应用程序(AIR / AS3)应用程序、用户、AIR

2023-09-08 15:03:28 作者:沿途的風景邊走邊看

好了,所以我对手机游戏使用AIR和AS3的工作。这里的想法是,我想安装另一款游戏提供激励。

Ok, so I'm working on a mobile game using AIR and AS3. The idea here is that I want to provide an incentive for installing another game.

在换句话说: 用户点击按钮在游戏中A,他们带来的应用程序页面游戏B.用户安装游戏B,可以追溯到游戏,获得的奖励在游戏一个。

In other words: user taps button in game A, brings them to app page for game B. User installs game B, goes back to game A, get's reward in game A.

有没有一种方法来检测游戏B已安装?最有可能的途径就是,如果一个游戏时恢复安装游戏B是刚刚检测到,但我似乎无法找到这样的一种方式,使用AS3 / AIR。

Is there a way to detect that game B has been installed? The most likely way seems to be just detecting if game B is installed when game A resumes, but I can't seem to find a way of doing that using AS3/AIR.

我可能还需要做到这一点为Android和iOS,我以为会需要不同的方法。

I will likely also need to do this for both Android and iOS, which I assume will require different methodology.

推荐答案

有一对夫妇的方式来回答这个问题: 自定义URL方案: https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/AdvancedAppTricks/AdvancedAppTricks.html  (与其他应用程序部分的通信)

There are a couple ways to answer this: Custom URL Scheme: https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/AdvancedAppTricks/AdvancedAppTricks.html ( the Communicating with Other Apps section)

这需要您正试图向上销售的应用程序,并在事实上实现自定义URL方案,但它是实现一个简单的事情。一旦你的URL方案,您可以进行检查的方法:canOpenURL: 返回一个应用程序是否可以打开指定的URL资源。

This requires that the app you are attempting to up-sell does in fact implement a custom URL scheme, but it is a simple thing to implement. Once you have the URL Scheme, you can make a method that checks: canOpenURL: Returns whether an app can open a given URL resource.

(布尔)canOpenURL:(NSURL *)网址 (中的UIApplication) (BOOL)canOpenURL:(NSURL *)url (in UIApplication)

如果您想了解更多显著数据交换(共享登录,或一些这样的),你可以使用Keychain设施: https://developer.apple.com/library/mac/documentation/security/conceptual/keychainServConcepts/iPhoneTasks/iPhoneTasks.html

If you want more significant data exchange (shared login, or some such) you could use the Keychain facility: https://developer.apple.com/library/mac/documentation/security/conceptual/keychainServConcepts/iPhoneTasks/iPhoneTasks.html

 
精彩推荐
图片推荐