是否可以知道通用应用程序用户拥有哪个平台版本?
Is possible to know which platform version of universal app user has?
我想开发在我的应用程序安装中同步用户特定数据的服务。例如,我在我的应用程序中购买了应用程序内消耗品,可以说是游戏积分。我需要在应用程序的移动版和桌面版之间共享这些积分。但是如果用户只有手机版或者只有桌面版,为了同步而存储历史购买记录是一种资源浪费。当前信用额度应该足够了。
也许不是很好的例子,但应该作为说明。那么有可能知道用户是否有两个平台版本或者他只有 mobile/desktop 版本?是否有任何合适的 API 我想从同步服务或应用程序中获取信息?
感谢您的回答
So is possible to know if user has both platform versions or he has only mobile/desktop version?
官方没有现成的API可以直接满足你的全部需求,你可以自己搞定。使用 AnalyticsVersionInfo
class to get the type of device the application is running on, especially the AnalyticsVersionInfo.DeviceFamily
属性。
对于不同的平台,您可以决定如何同步您的记录。
我想开发在我的应用程序安装中同步用户特定数据的服务。例如,我在我的应用程序中购买了应用程序内消耗品,可以说是游戏积分。我需要在应用程序的移动版和桌面版之间共享这些积分。但是如果用户只有手机版或者只有桌面版,为了同步而存储历史购买记录是一种资源浪费。当前信用额度应该足够了。
也许不是很好的例子,但应该作为说明。那么有可能知道用户是否有两个平台版本或者他只有 mobile/desktop 版本?是否有任何合适的 API 我想从同步服务或应用程序中获取信息?
感谢您的回答
So is possible to know if user has both platform versions or he has only mobile/desktop version?
官方没有现成的API可以直接满足你的全部需求,你可以自己搞定。使用 AnalyticsVersionInfo
class to get the type of device the application is running on, especially the AnalyticsVersionInfo.DeviceFamily
属性。
对于不同的平台,您可以决定如何同步您的记录。