Describe your issue in as much detail as possible.
My deviceId field on parse-server is blank. I've tried putting the token in manually using code however this field is read only so am unable to fix it. The GCMSenderId field is also blank so am having to manually inject this code via code because the AndroidManifest.xml field doesnt populate this field server side
Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.
deviceToken and GCMSenderId fields in the dashboard are supposed to be populated with the relevant info
The field remain blank
Server
Database
Because guides dont leave a relevant log to find out what the issue is (installation gets saved) , trying to modify the value manually yields the below:
E/AndroidRuntime: FATAL EXCEPTION: pool-4-thread-1
Process: , PID: 3140
java.lang.IllegalArgumentException: Cannot modify deviceToken property of an _Installation object.
code:
private void sendRegistrationToServer(String token) {
if(token != null) {
final String fcmSenderId = "token";
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
installation.put("GCMSenderId", fcmSenderId);
installation.put("deviceToken", token);
installation.saveInBackground();
Log.e(LOG_TAG, "Information saved! We're good fam");
//lets hope everything saved
} else {
Log.e(LOG_TAG, "failed man");
}
}
managed to resolve
Can you share how you resolved this?
If anyone is still facing this problem, please find solution here:
Attached library is having deviceToken editable.
Most helpful comment
Can you share how you resolved this?