Updating Parse Installation for app with parse class deleted - android

I created an app and integrated Parse Notification. Due to a glitch, there were unnecessary notification being sent to all users. To stop this immediately, I deleted the installation class after applying filter, but realized that it deleted all my parse installation from Core.
Basically, there are no devices on my parse console now and no notifications are being sent at all.
I wish to provide an app update where I can get the parse to register the devices again.
Can someone please advise how I can do this.

It is quite a big mistake to delete the installation class instead of preventing Push notifications in the Cloud or even deleting the Push certificates. When a user registers his device with Parse backend for the first time, the SDK generates a unique installationId and caches it locally on the device. As far as I know, this will prevent your users to register again (even if you send a new app update) with the backend UNLESS they delete the whole app and reinstall it to get rid of that cached id.

Related

Android uninstall notification

Is there any way to send notification when user uninstall app. If user uninstall the app the app owner should get the notification that the following user has been uninstalled the appp. Is it possible?
It's not possible from app itself (barring case if there other apps from same author which can check)
But I think there is usable but complex workaround.
App can register for push notifications (either via GCM or FCM). Server side part of part should store app token for this purpose.
If, after some time, server side part send push and get NotRegistered instead (see https://developers.google.com/cloud-messaging/http#error_codes ) this mean app was uninstalled.
edit:
it's possible using hacky way from native code, per Roland's answer in Is it possible to detect Android app uninstall?
The method is based on the fact that the first thing android does when uninstalling your app is deleting your data file. So you could use a file watcher to detect the deletion. Also you need to write this in native code. If you write your code in java, your app will be uninstalled before it could execute any code. please see this demo : https://github.com/sevenler/Uninstall_Statics
Actually answer is no, but you can use one hack way to find out currently app is available in user device or uninstalled.
Registered your app with GCM,and send daily one notification to user, in which day user did not receive notification then you can assume app is uninstall.
I don't know this way is good or not, just i explain may be you can achieve your requirement !

Android Parse Push Notifications need to change the Parse app

I have just implemented Parse Push notifications in my apps and everything is working just fine. However, before release I need to migrate the apps to different Parse apps for various reasons. But when I change the keys to the new Parse apps my devices don't receive the pushes from the new Parse app until I uninstall and re-install the app. This is a problem for our existing users in the field, who in general will be installing updates without uninstalling first.
Is there any way to delete the cached registration associated with the old Parse app before initializing with the new? I assume that would take care of the problem.
Christine
My mistake. Since the apps in the field are not currently registered for Parse Push Notifications switching to a new Parse app is not a problem for us. It is only if an app is already registered for Push Notifications that changing to a new Parse app requires uninstallation and re-installation before it will receive notifications from the new Parse app.

Parse push notification android device token not saved in some cases

I am using parse as my app back-end service provider. My app has really important feature of Push notification.
Parse is not saving the device token in some cases. Mostly when user is installing the app from America/Los_Angeles region.
Is this Parse.com sdk integration problem or Google is not sending device token in some region? How can i fix this issue?
I've just ran a quick check on our Parse backend and found that there are also missing device tokens in our database, too.
I think you should not send push notifications based on device token, but based on user on that device.
To do that, first add a new field in Installations table called user. If your app requires explicit login from user, then when user logs in, update the installation with that user's ID. If it is implicit (registers upon installation so App is ready to go as soon as user opens the app), then just associate that user in the same manner on app install.
In the end, you are most likely to want to send your notifications to your user rather than a specific device. This also makes data transferring a lot easier.
This issue was sometimes observed due to failure to get the token from Google. You should check the device token availability, if you don't get it, you should try it again after some time from your app.

android parse push notification device registered multiple times

i am using parse push notification to send push notifications to users of my app. I have added the code suggested in
Android Parse Push notification device registration only one time on one device
on every unistall and then a fresh install causes my device to get registered again, bt the on updating the app simply(without uninstalling it first), the object gets updated with the help of code suggested in the link above. How do i update the same user if he/she installs the app after unistalling or atleast remove his data from my parse data

Duplicate GCM messages from Uniqush

I am using Uniqush to send GCM messages to an app I'm developing, and so far this is working well. However, for obvious reasons I am uninstalling and reinstalling the app as I develop, and it's re-registering for GCM with each new install.
I understand GCM is supposed to handle this automatically:
http://developer.android.com/guide/google/gcm/adv.html#unreg
if a message can't be delivered to a device, it sends an error to the server, which handles it. Unfortunately (even after sending a test push message while the app wasn't installed) I am getting duplicate messages to my device.
Is this a failure in Uniqush, my program, GCM, or some combination of the three?
If notifications are sent to a device while it has the app uninstalled, eventually the duplicates clear.
Given your description, I am unable to reproduce your situation. Here are the steps to try to reproduce it:
Install the test app on my phone and push notification to it using uniqush. Correct. Uniqush's log shows it is successfully delivered and my phone shows the correct result.
Uninstall the test app.
push another notification again using uniqush. Uniqush's log shows the message saying the user is unsubscribed the service: [Unsubscribe][Info] 2012/12/21 19:18:08 [UnsubscribeRequest] RequestId=3992a14e4987e94e3ce16bb7394ee06d2d9e7231 Success
DeliveryPoint=gcm:47e6551857be173b1418e56b63dbdb8cd58c94a2
Then push one more notification to the device, uniqush says it cannot find the device (because it has already been removed.)
Check the database using redis-cli, the device's information is no longer stored. It is successfully unsubscribed.
However, I did found some problem: if you check the error message returned from uniqush from HTTP, then you will see Success on the second notification. I have already fixed this bug in next release. It will be online soon. (If you are interested in that, check the .deb package )
In fact, uniqush is designed to be able to handle such situation so that the user don't need to care about unsubscription, device token/registration id update, etc.
If you have any future question, please feel free to comment or contact me.

Categories

Resources