I have a problem with register processing - unregister my actions / services or something that I use during installation using airgel.
If I sign up from the onCreate () service and unregister in onDestroy (), when I uninstall the application, the device will be registered on the server side ... If I install the application again, it will register the device again, and you can repeat this until you get tired. And, of course, sending push to an alias specified by the user, messages will be received once for registration.
In addition, each time the application registers with aerogear, the deviceToken is different, which means that it is more associated with the generated hash for each installation than for the unique identifier for the pair (application, device).
So now the question is how to handle the whole cycle? and I mean the daily run and the question of whether the user decides to remove the application, they kill him and canβt unregister, and after a month decides that he really likes it, and he reinstalls this thing again. THX
Update
The problem grows when I test my application. If I register with two different users on the same device, I receive both user messages, and I need to twist the client implementation a bit.
aerogear database update
here is the installation log for two devices with three reinstallations:
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
source share