简体   繁体   中英

Android push doesn't work for one Parse.com app, while working for another

I have an Android application with two Parse.com environments: dev and prod . The codebase is exactly the same: all the configurations in the Android Manifest file, and the code to subscribe to the push are the same.

But for some reason when I do a push it works for the dev , and doesn't for the prod .

This is what I'm doing: I'm going to the Push tab on the site, and click Send Push . Then I select Segment > Android > MyNewAndroidCannel. It says This will be sent to 1739 devices. Then I put in my message and send the push - but the Pushes Sent count is 0.

If I do the same in the dev environment everything works fine.

Any idea why would that happen? I can copy all my configuration entries and code to this question but it seems pointless since I know they work / don't work based on something in the definition of the app on Parse.com .

When I look at the Parse.com app's Push settings they look exactly the same for both the dev and prod environments.

EDIT: adding info. In my dev app the deviceToken is populated for Android installations, but in the prod app it is not. In the security for the dev I have the Delete and Add Fields options enabled, but in the prod they are disabled . Is this the problem? Is it safe to allow updating and deleting for the installations?

It seems like the problem was that I disabled the Add fields on the installation object and - I guess - when Parse changed the Android push mechanism they also added a requirement for a pushType field.

So the pushType was rejected by the installation security, the deviceToken wasn't populated, and the push failed. Once I added the pushType column to the installation the pushes started working again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM