I've noticed that every time I've deployed my app to my phone,it duplicates the installation in parse to receive push notifications. How can I avoid this from happening whenever I reinstall the app?
相关问题
- How does the setup bootstrapper detect if prerequi
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
After a week of research and try and error, I finally found a working solution. Basically, you need to do two things to achieve this:
ParseInstallation
. we will use ANDROID_ID.Installation
, check to see if its unique ID exist in an oldInstallation
. If it does, delete the old one.How To Do it:
In the
onCreate()
method of your Application:In your cloud code, add this:
And that's it!
Things you might want to know:
put("androidId", android_id);
for the first time, a new column namedandroidId
will be added to yourInstallation
table view in the Parse App Dashboard.Resources: [1], [2], [3]