找到你要的答案

Q:Unregister android client from aerogear unified push server

Q:注销Android客户端从aerogear统一推送服务器

I´m facing a problem on handling the register-unregister my activities/services or whatever I use from an aerogear installation.

If I register from a service onCreate() and unregister in onDestroy(), when I uninstall the application, the device keeps registered on server side... If I install the application again, it registers the device again and you can repeat this until you get tired. And, of course, sending a push to the alias given by the user, the messages will arrive once per registration.

Also, each time the application registers to aerogear, the deviceToken is different, meaning that it´s got more to do with a generated hash for each installation than for a unique identifier for the pair (app, device).

So, now the question, how to handle the whole cycle? and I mean, the daily run and the issue about if the user decides to uninstall the app, it gets killed and could not unregister and one month later decides he liked it so much that ends up reinstalling the thing again. thx.

update

The problem grows as I go testing my application. If I log with two different users in the same device, then I get both user messages and I've got to twist a little bit more the client implementation.

update with aerogear database data

here´s the installation log for two devices with three reinstalls:


id  alias   deviceToken deviceType  enabled operatingSystem osVersion   platform    variantID
0dd99505-bba9-45e9-bfbf-38621bd41c3d    568b347a5df69915000pig@gmail.com    APA91bG9XSPpwbFenw0UETFLRxr2XoFw-HlH5yZpPgoCIVZLnv0QSqCx5iKqqhJ-tWF5CRISbydv6ItWZKxklD8OPtfxvuq1ekQEI3XkbFajsmGIJ3yjUIC0MGw3v2ITVd6byVtZLsI9uTfiDXyeNrXTxprzVxr9ng  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
0ee3619f-0eb4-4139-b1fa-fe3403eb380c    1c24c6e05b58738f000edu@gmail.com    APA91bFrNknt7d57dFR5DagE4Nf1bCVyB93Jl1xU5_qELwYn5JmjYUpXrLE10yC6beZdUgae0ZgtKXgLI4LI-E_ROAFEI4xi-ZPhuE8UZB6K05L_mIWSk7kt32D7S9G2clw3WG51zvcQmaeg8xsG_VW-rnwfKZQVcg  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
107d4dac-fbcf-4f82-9135-702b83d06f7f    568b347a5df69915000pig@gmail.com    APA91bEaN4AMJPZgML931rO4AdrMudfTmGVmYPqqARVLX1RxIfyYB46fGxlSK0w7g3qnU2d_cVOBi907TFIMoxBaOe3bvKI8DqsacrXMmT-DjhFoFRS2z4QCec9u0aRPm-EB9UwhfMrE3RrctdxDdNCQ0douuppYVQ  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
161474b6-067d-4b54-a750-e21a9896814e    1c24c6e05b58738f000edu@gmail.com    APA91bGFE6cxLcxPDoRmv-HEIpA2jQndccrCryuR3q5BN4PG3EyHxISFoMCIwaPPXX8BIinrJOvNCbwpIrVOKw_mSv5TcLZnSgonR1grpiRkJ0mmwbFCme2CrwoMpkLkVUP7ZjwnYsr0HR3MKzmJLakrnlN-eMKr-g  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
a5cddabe-1c00-4369-b4cc-f6c5da8f8740    568b347a5df69915000pig@gmail.com    APA91bGmFT7NCpfb1q4WHFK2wmQCQdMtW9ulQLiZYwrt9oyU4mqv9gCBN959pCw_wKy2zHw-JBU0p5SCzdpKN5l8i7uqPWk24ORHKE1Vf6rRUINkIRJheKVT6V6Wk38WQ7Rw1AgrqYXZN7WUImVSgd5cqq_p8lLISg  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
f7514716-68d9-4d00-837a-f1f9da503151    1c24c6e05b58738f000edu@gmail.com    APA91bHTFJE7-nz_KB4aa2RUcEnFTVB0IzQZ-ZffPTujLWgi60xTMUeAet6YoUZJnXKnhBOSdAPgoaLDW18PWnwKXtc2MXxKjMYQQENNDdOxKQIV4fnMrAFWfwD_VT6x5XOJUWdQovGUwXiMX9SshCDvZJ4QnM1x_w  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc

我´我面临一个问题处理登记注销我的活动/服务或什么,我从一个aerogear安装使用。

如果我从一个服务oncreate()登记和注销在ondestroy(),当我卸载应用程序,该装置保持在服务器端注册…如果我再次安装应用程序,它再次注册设备,你可以重复这个直到你累了。当然,发送一个推送给用户的别名,消息将到达每注册一次。

另外,每次应用程序注册的aerogear,该设备令牌是不同的,这意味着它´有更多地与生成的哈希为每个安装比对的唯一标识符(APP,装置)。

So, now the question, how to handle the whole cycle? and I mean, the daily run and the issue about if the user decides to uninstall the app, it gets killed and could not unregister and one month later decides he liked it so much that ends up reinstalling the thing again. thx.

更新

当我测试我的应用程序时,问题越来越严重。如果我在同一个设备中使用两个不同的用户登录,那么我将得到两个用户消息,并且我必须稍微扭曲客户端实现。

更新 with aerogear database data

这里´的安装日志两设备与三重新安装:


id  alias   deviceToken deviceType  enabled operatingSystem osVersion   platform    variantID
0dd99505-bba9-45e9-bfbf-38621bd41c3d    568b347a5df69915000pig@gmail.com    APA91bG9XSPpwbFenw0UETFLRxr2XoFw-HlH5yZpPgoCIVZLnv0QSqCx5iKqqhJ-tWF5CRISbydv6ItWZKxklD8OPtfxvuq1ekQEI3XkbFajsmGIJ3yjUIC0MGw3v2ITVd6byVtZLsI9uTfiDXyeNrXTxprzVxr9ng  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
0ee3619f-0eb4-4139-b1fa-fe3403eb380c    1c24c6e05b58738f000edu@gmail.com    APA91bFrNknt7d57dFR5DagE4Nf1bCVyB93Jl1xU5_qELwYn5JmjYUpXrLE10yC6beZdUgae0ZgtKXgLI4LI-E_ROAFEI4xi-ZPhuE8UZB6K05L_mIWSk7kt32D7S9G2clw3WG51zvcQmaeg8xsG_VW-rnwfKZQVcg  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
107d4dac-fbcf-4f82-9135-702b83d06f7f    568b347a5df69915000pig@gmail.com    APA91bEaN4AMJPZgML931rO4AdrMudfTmGVmYPqqARVLX1RxIfyYB46fGxlSK0w7g3qnU2d_cVOBi907TFIMoxBaOe3bvKI8DqsacrXMmT-DjhFoFRS2z4QCec9u0aRPm-EB9UwhfMrE3RrctdxDdNCQ0douuppYVQ  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
161474b6-067d-4b54-a750-e21a9896814e    1c24c6e05b58738f000edu@gmail.com    APA91bGFE6cxLcxPDoRmv-HEIpA2jQndccrCryuR3q5BN4PG3EyHxISFoMCIwaPPXX8BIinrJOvNCbwpIrVOKw_mSv5TcLZnSgonR1grpiRkJ0mmwbFCme2CrwoMpkLkVUP7ZjwnYsr0HR3MKzmJLakrnlN-eMKr-g  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
a5cddabe-1c00-4369-b4cc-f6c5da8f8740    568b347a5df69915000pig@gmail.com    APA91bGmFT7NCpfb1q4WHFK2wmQCQdMtW9ulQLiZYwrt9oyU4mqv9gCBN959pCw_wKy2zHw-JBU0p5SCzdpKN5l8i7uqPWk24ORHKE1Vf6rRUINkIRJheKVT6V6Wk38WQ7Rw1AgrqYXZN7WUImVSgd5cqq_p8lLISg  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
f7514716-68d9-4d00-837a-f1f9da503151    1c24c6e05b58738f000edu@gmail.com    APA91bHTFJE7-nz_KB4aa2RUcEnFTVB0IzQZ-ZffPTujLWgi60xTMUeAet6YoUZJnXKnhBOSdAPgoaLDW18PWnwKXtc2MXxKjMYQQENNDdOxKQIV4fnMrAFWfwD_VT6x5XOJUWdQovGUwXiMX9SshCDvZJ4QnM1x_w  ANDROID 1   android 4.4.4   android 4ae83272-5db7-41f6-879d-c907a39bd3fc
answer1: 回答1:

I think the first problem was a UnifiedPush server bug, but it's already fixed.

About your update when you register a device on UPS the UPS don't know about your users, so you will need to send some information with your message and control it on your client.

我想第一个问题是一个unifiedpush服务器的bug,但它已经固定。

About your 更新 when you register a device on UPS the UPS don't know about your users, so you will need to send some information with your message and control it on your client.

android  service  install  push  aerogear