简体   繁体   English

适用于Android中单个设备的多个APP ID在Urban Airship下

[英]Multiple APP ID's Under Urban Airship for single device in Android

I worked with Urban Airship push notifications using Tags. 我使用Tags处理Urban Airship推送通知。 For every new installation UA mantain new App ID under audience.In my application I have two options for login: 1.Male 2.Female 对于每个新安装,UA都会在观众面前1.Male 2.Female新的App ID。在我的应用程序中,我有两种登录选项: 1.Male 2.Female

From UA I sended message by adding proper tag. 从UA我通过添加适当的标签发送消息。

Case1: 情况1:

  • At first installation, under audience my device registered with selected tag(I logged as Male) and APP ID. 首次安装时,在我的设备下,我的设备注册了所选标签(我记录为男性)和APP ID。

  • In this case everything works good. 在这种情况下,一切都很好。

Case2: 案例2:

  • If I removed the app from device and install again and logged as different User(Ex: female). 如果我从设备中删除了应用程序并再次安装并以不同的用户身份登录(例如:女性)。

  • Now under audience my device registered with Female Tag and new App ID. 现在,在观众席下,我的设备注册了女性标签和新的App ID。 (Now My device registered with new APP ID under UA) (现在我的设备在UA下注册了新的APP ID)

  • If I send push from UA by adding required Female Tag , push received to my device. 如果我通过添加所需的女性标签从UA发送推送,请将接收到我的设备。

  • But in few cases message from Male tag also received by device. 但在少数情况下,来自Male标签的消息也被设备接收。

Observation: 观察:

  • Now under UA ,my device having two APP ID's with two different tags. 现在在UA下,我的设备有两个APP ID和两个不同的标签。

  • May be , by that reason my device received both tag messages irrespective of selected Tags 可能是,由于这个原因,我的设备收到了两个标签消息,而不管选择的标签

Need solution: 需要解决方案

Why android maintain new APP ID for every new installation? 为什么android为每个新安装维护新的APP ID?

How to remove previous APP ID of my device from UA before new installation 如何在新安装之前从UA中删除我设备的先前APP ID

(OR) (要么)

How to override Previous APP ID with new APP ID 如何使用新的APP ID覆盖以前的APP ID

Note: 注意:

I installed application in my device with integrating push notification. 我通过集成推送通知在我的设备中安装了应用程序 Device registered with APID and keeps Active as True. 使用API​​D注册的设备并将Active保持为True。

After re-installation of App, new APID generated and shown Active as True. 重新安装App后,生成新的APID并将Active显示为True。 But, previous APID's status of Active still maintained as True. 但是,之前APID的Active状态仍然保持为True。 Why previous APID's Active status not changed to False. 为什么以前的APID的活动状态未更改为False。

In IOS, after new installation previous Device Token's status changed to inactive. 在IOS中,在新安装之后,先前的设备令牌状态变为非活动状态。 Why happen it in android only?? 为什么只在android中发生?

Thanks in advance.. 提前致谢..

Response from Urban Airship Support Team : Urban Airship Support Team的回复:

Android devices get a new APID whenever you uninstall and reinstall an app, just because of the way GCM works and how our system handles it. 每当您卸载并重新安装应用程序时,Android设备都会获得新的APID,这只是因为GCM的工作方式以及我们的系统如何处理它。 Our apologies if this is inconvenient for you, but yes, this is expected behavior. 如果这对您不方便我们表示歉意,但是,这是预期的行为。 Once you try to push to the old APID, our system will realize that the earlier install is no longer active, and should mark the old APID as inactive. 一旦您尝试推送到旧的APID,我们的系统将意识到早期安装不再处于活动状态,并应将旧的APID标记为非活动状态。 The new one will remain active. 新的将保持活跃。

If you uninstall and reinstall an app fast enough, you may experience behavior like you saw , where one last push to an old tag for the old APID gets through. 如果您足够快地卸载并重新安装应用程序,您可能会遇到如您所见的行为 ,其中最后一次推送旧标签的旧标签通过。 The old APID will then be marked inactive by our library if this occurs, and it should not happen again for that installation. 如果发生这种情况,旧的APID将被我们的库标记为非活动状态,并且不应该再次发生该安装。 We find that this is extremely rare in production and is only ever an issue during testing. 我们发现这在生产中非常罕见,并且在测试过程中只是一个问题。

If you want to manually deactivate the old APID that you know is no longer active, just push to it directly and GCM will give us feedback that it is no longer valid. 如果您想手动停用已知不再处于活动状态的旧APID,只需直接推送即可,GCM会向我们提供不再有效的反馈。 We will no longer attempt to push to it after that point. 在那之后我们将不再尝试推动它。

Finally, what version of our library are you using? 最后,您使用的是我们的库的哪个版本? Please make sure you are using the most recent version here: http://urbanairship.com/resources/developer-resources -- older versions did not handle this behavior as reliably. 请确保您使用的是最新版本: http//urbanairship.com/resources/developer-resources - 旧版本无法可靠地处理此行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM