Android Parse Push Notifications need to change the Parse app - android

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.

Related

Firebase FCM, multiple apps in the same firebase project

I have a Firebase project in which I registered multiple apps.
now I want to add push notification, and I want to be able to distinguish which app should wake up by the push notification.
in the google-services.json file, I see that all the apps have the same value for the current key in api key section, I understand it is because I registered the apps in the same Firebase project.
I also read about the SERVER_KEY, and saw that there is an option to add SERVER KEY. can I add multiple server keys and use them in my server, in order to send the push notification for the correct app?
or is there any other solution that allows me to keep the apps registered in the same Firebase project but distinguish which app should wake up by the push notification?
Yes, You can use multiple apps within the same project, you can use the firebase data structure to distinguish between apps:
(Use it as using channels)
https://www.firebase.com/docs/web/guide/structuring-data.html
With that said, from my experience, this is not recommended. At iOS platform, when multiple apps on the same device shared the same firebase keys, it caused some strange behavior for me, so my advice would be to open a new project per app (Pretty sure that is the documentary best practice too) Android worked fine.

OneSignal creating multiple user records for each app installation

I shifted from parse.com to oneSignal for push notification service.
I integrated the SDK into my android app and it is able to create a user record in oneSignal, when the application is installed.
But when I uninstall and re-install my android app, a new user record is created in oneSignal, resulting in duplicate user records.
How do I over come this issue of duplication? I want only one user record even if the user reinstalls my application.
In parse.com I use to check at the parse cloud code for duplicates before inserting new records .. any thing similar at oneSignal ?
OneSignal's SDK does its best to try to prevent duplicate user records from being created. This is mainly done by checking the users' Advertising Identifier, basically a unique ID that remains the same between different times the application is installed.
However, some Android users have opted-out of allowing apps to see their Advertising ID. In these cases it is not possible for OneSignal to know that a user has re-installed the app, and a duplicate user record will be created.
When OneSignal next attempts to send a notification to the previous user record, Google's GCM servers notify OneSignal's system that the user has a newer push token. At this point OneSignal will then disable the old user record so that future notifications are not sent to it. OneSignal's SDK will also make sure not to ever display the same notification twice on a device.
you have to do it this way before you create a new user check if the the user is already present using this api idsAvailable in android
https://documentation.onesignal.com/docs/android-native-sdk
and the same one for server can be found here
https://documentation.onesignal.com/reference

Updating Parse Installation for app with parse class deleted

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.

PushNotification Phonegap in Android

I'm using this plugin (https://github.com/phonegap-build/PushPlugin) to send notifications to my users using my android app. Well, so far it's ok.
I have the following questions:
Every time the user opens my app I need to generate a new "RegID"? Or,is not necessary?
Because I'm saving the "RegID" in the database, for later make a shipping notification with PHP to the user's device.
What if every time open the app necessary generate a new "RegID" need to update my database alright?
Somebody can help?
No, you don't have to generate a new Registration ID in each launch of your app. You should only generate it the first time your app is launched (and it's also recommended by Google to generate it again when a new version of your app is installed).
Even when you request Google for a new Registration ID, you might get in response the same registration ID you already had, in which case make sure you don't duplicate that Registration ID in your DB.

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

Categories

Resources