parse-server-modules / parse-server-onesignal-push-adapter

OneSignal push adapter for parse-server
MIT License
32 stars 28 forks source link

deviceToken is Empty - Installation class #14

Closed ghost closed 8 years ago

ghost commented 8 years ago

We are trying to set the deviceToken (Android app) in Installation class so then we can send push notifications using OneSignal as follows:

ParseInstallation installation = ParseInstallation.getCurrentInstallation(); installation.put("GCMSenderId",senderId); installation.put("pushType","gcm"); installation.put("deviceToken",token);

Once we try to save, we get an exception: Cannot modify deviceToken property of an _Installation object. android

Any advice on how/where to set the "deviceToken" in Installation class?

jamesthedove commented 8 years ago

Yeah. Same here. Device token is empty pushes are not delivered

jamesthedove commented 8 years ago

The deviceToken will be set automatically by parse-server. The issue I had was that I was changing the serverURL of my app between the localURL and the online server. All I did was to uninstall the app and install the new one and it started working.

flovilmart commented 8 years ago

This is unrelated to this adapter, please open on parse-server or on the Android-SDK repository