Parse - Installation table not setting deviceToken nor pushType
Asked Answered
E

2

9

I had an app working on Parse, with the notifications working fine. I changed app packaging and I create a new app on Parse.

With the new app, deviceToken and pushType columns remain always empty on table _Installation, so pushes doesn't work even if sent from Parse web page, and a new entry is generated as application is launched.

I've updated parse keys on my java code and on my cloud code.

Someone has some idea what I may have missed or what may happen so the same code has different behaviour in different apps with equivalent configurations?

If I update one of the installation with pushType="gcm" and "deviceToken" the one I had in the other app, this device receives notifications.

Thank you

Eddyede answered 16/12, 2014 at 15:53 Comment(0)
M
8

okay, I had a similar issue. both those columns were empty. this is mainly due to the manifest issue. your permissions seem okay because you are getting the notification and also able to reg in the parse data base.

so the problem should be in the <receiver> tags there should only be 2 of them like mine.

<receiver android:name="com.parse.ParseBroadcastReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.USER_PRESENT" />
            </intent-filter>
        </receiver>
         <receiver android:name="com.parse.GcmBroadcastReceiver"
            android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

                <!--
                  IMPORTANT: If you change the package name of this sample app,
                  change "com.parse.tutorials.pushnotifications" in the lines
                  below to match the new package name.
                -->
                <category android:name="com.example.ifis" />
            </intent-filter>
        </receiver>

if you have any receiver like "com.google.android.gcm.GCMBroadcastReceiver" pls remove and also one <service android:name="com.parse.PushService" />

Mercymerdith answered 15/1, 2015 at 8:41 Comment(0)
G
0

Enable parse logging:

Parse.setLogLevel(Parse.LOG_LEVEL_VERBOSE);

In my case I was missing GCM permissions

<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="my.package.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="my.package.permission.C2D_MESSAGE" />
Gasoline answered 3/10, 2016 at 21:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.