0

I setup up a Parse Server on my Windows 10 machine and created a simple app,using Xamarin and Visual Studio 15 that connects to the parse server. I then wanted to create a push notification to send messages to Android devices via the Parse Dashboard.

I followed the following tutorials: https://github.com/ParsePlatform/Parse-Server/wiki/Push

https://developer.xamarin.com/guides/android/application_fundamentals/notifications/remote_notifications_in_android/

After following these tutorials, setting everything up as per: github ParsePlatform =>Parse-Server =>wiki Push I then tested it by first running my app on visual studio, with the Android device connected to the windows machine, going onto my local Parse Dashboard, going to "Push" and "send a new push". It saved the message but did not send it to my Android device. It also did not report any errors in the log files.

Now I am unsure what the problem could be. Can anyone please advise or offer suggestions to fix this problem? My Android Manifest file looks identical to the one in the tutorial, except with my package name and sender ID filled in. My OnCreate() just has the one line of code:

ParsePush.ParsePushNotificationReceived += ParsePush.DefaultParsePushNotificationReceivedHandler;

Any small help help will be greatly appreciated!

Joseph
  • 5,793
  • 4
  • 34
  • 41
Prish
  • 1
  • How are you sending the push notifications? Are you sending them through the Parse Dashboard or from the mobile app? Do you see devices registered in the Dashboard on Parse, Also when you send if you are using the Dashboard what is the status of the sent messages, does the dashboard show that the message has been send and to how many devices? – Joseph Oct 24 '16 at 07:39
  • I am sending the messages through the Dashboard. I do not see any registered devices in the Dashboard, how can I add these devices? I just select Android devices when creating a message, but no specific devices. Yes, the Dashboard shows the messages has been sent but shows no successful deliveries. – Prish Oct 24 '16 at 08:38
  • you should be able to see a new class called Installation and should show the registered devices, to register a device, put the following code after initializing the ParseClient, ParseInstallation.CurrentInstallation.SaveAsync(); That line should register the device with Parse. If that line runs and you don't the device then the error is somewhere else. – Joseph Oct 24 '16 at 08:43
  • Oh by the way push notification won't work on an emulator, you need to use a real device or the emulator needs to have Google Play services installed – Joseph Oct 24 '16 at 09:05
  • I am using a real device and I have google play installed on the device. – Prish Oct 24 '16 at 09:22
  • Hi, just an update, I see the class called Installation on the Dashboard, and shows one registered Android device. I also added the line ParseInstallation.CurrentInstallation.SaveAsync(); but unfortunately, I still don't get the notification that I send through the Dashboard on the device. – Prish Oct 24 '16 at 09:32
  • Try add these lines after your ParseClient.Initialize line, ParseInstallation.CurrentInstallation.SaveAsync(); ParsePush.ParsePushNotificationReceived += (object sender, ParsePushNotificationEventArgs e) => { Log.Debug(TAG, "****************Push Received****************"); Log.Debug(TAG, "****************Push Received****************"); Log.Debug(TAG, "****************Push Received****************"); Log.Debug(TAG, "****************Push Received****************"); Log.Debug(TAG, "****************Push Received****************"); }; – Joseph Oct 24 '16 at 09:37
  • Thanks, I can see the errors now: – Prish Oct 24 '16 at 10:28
  • message: 'at least one ID field (deviceToken, installationId) must be specified in this operation' } Can I use this solution:http://stackoverflow.com/questions/23815445/at-least-one-id-field-installationid-devicetoken-must-be-specified-in-this-op – Prish Oct 24 '16 at 10:28
  • May i ask something? you use Firebase Cloud Messaging to send push notifications? is there any other way to send push notifications from parse without using other platform than parse? – CDrosos Mar 10 '18 at 17:39

0 Answers0