android push notification with parse doesen't work

Futcho

I Downloaded from the parse.com the blanck Android Project, then go to parse.com create the App to get the Application & Client ID KEY, put it on ParseApplication class, run the application it's work fine on my device but when I try to send a push notification I get it the messge .... No registered devices

So, whats wrong?

Any ideas?

public class ParseApplication extends Application {

@Override
public void onCreate() {
super.onCreate();

// Initialize Crash Reporting.
ParseCrashReporting.enable(this);

// Enable Local Datastore.
Parse.enableLocalDatastore(this);

// Add your initialization code here
Parse.initialize(this,"EVIZ5DUourBOfSWykYZIhy4HFgDC0W","HCmjXHOz3SbHnHLlyQVD4uqOnmXdzAy");
ParsePush.subscribeInBackground("", new SaveCallback() {

    @Override
    public void done(com.parse.ParseException e) {
        // TODO Auto-generated method stub
        if (e== null){
            //log.e;
        } else{
            //log.e;
        }

    }
}); 
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
// defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
  }
  }

Manifest File

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.miscore"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="21" />
<!-- Internet permission -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--
   NUEVO
-->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:protectionLevel="signature"
    android:name="com.example.miscore.permission.C2D_MESSAGE" />
<uses-permission android:name="com.example.miscore.permission.C2D_MESSAGE" />


<application
    android:name="com.example.database.BDApplication"
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".SplashScreen"
        android:label="@string/app_name"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".Inicio"
        android:label="@string/inicio"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name=".Configuracion"
        android:label="@string/title_config"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name=".TablaGeneral"
        android:label="@string/title_activity_tabla_general"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name=".Calendario"
        android:label="@string/title_activity_calendario"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name=".TablaGoleo"
        android:label="@string/title_activity_tabla_goleo"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name=".About"
        android:label="@string/title_activity_about"
        android:screenOrientation="portrait"
        android:theme="@style/TransparentTheme" >
    </activity>
    <activity
        android:name=".CondUso"
        android:label="@string/title_activity_cond_uso" >
    </activity>
    <activity
        android:name=".AvisoPriv"
        android:label="@string/title_activity_aviso_priv" >
    </activity>
    <activity
        android:name=".FirmaLega"
        android:label="@string/title_activity_firma_legal" >
    </activity>
    <!--
           NUEVO
    -->
    <service android:name="com.parse.PushService" />
    <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: Change "com.parse.tutorials.pushnotifications" to match your app's package name.
        -->
        <category android:name="com.example.miscore" />
      </intent-filter>
    </receiver>
    <receiver android:name="com.parse.ParsePushBroadcastReceiver" android:exported="false">
      <intent-filter>
        <action android:name="com.parse.push.intent.RECEIVE" />
        <action android:name="com.parse.push.intent.DELETE" />
        <action android:name="com.parse.push.intent.OPEN" />
      </intent-filter>
    </receiver>
</application>

Itai Spector

It might sound silly, but try uninstalling your app from your device, and then re-install. Try your code again, if that doesn't help, try do it like this:

ParseInstallation.getCurrentInstallation().put("nameOfColumnInParseInstallationClass", "some relevant data");
ParseInstallation.getCurrentInstallation().saveInBackground...

And then, uninstall and re-install again.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Parse Push notification works in Genymotion, but doesn't work in real phone

From Dev

Parse Push Notification just work in Emulator

From Dev

HTML tag regex doesen't work

From Dev

my form doesen't work right

From Dev

Changing text color in html doesen't work

From Dev

Android doesn't receive push notification from Parse Push when app is closed

From Dev

Parse Open push notification in different Activity Android

From Dev

How to change Parse push notification icon in android?

From Dev

Parse Push notification not sending from Android to Channel

From Dev

Error ~ parse.com push notification android?

From Dev

Parse Open push notification in different Activity Android

From Dev

Not receiving push notification on android with parse.com

From Dev

Android Parse Push Notification not working - "Outdated device"

From Dev

Android Parse Notification cannot receive notification if push form our server

From Dev

push notification doesn't work in grocer

From Dev

How to make push notification with GCM work on android?

From Dev

Android parse push notification and new GCM generate wrong device token and parse push notification not working

From Dev

Php ftp_connect doesen't work on AWS server

From Dev

Spring Integration http endpoint from child context doesen't work

From Dev

VTiger Scheduled workflow: "is empty" condition doesen't work

From Dev

Cordova/Phonegap Android Parse Push Notification not resuming app

From Dev

Custom Push Notification coming twice using Parse.com and Android

From Dev

Android, Push notification using parse.com, launches the app automatically

From Dev

Android: How to use Parse as an alternative GCM push notification provider?

From Dev

sending push notification to multiple users using Parse in android

From Dev

RuntimeException on android app with parse.com push notification

From Dev

sending push notification to multiple users using Parse in android

From Dev

Cordova/Phonegap Android Parse Push Notification not resuming app

From Dev

Custom Push Notification coming twice using Parse.com and Android

Related Related

  1. 1

    Parse Push notification works in Genymotion, but doesn't work in real phone

  2. 2

    Parse Push Notification just work in Emulator

  3. 3

    HTML tag regex doesen't work

  4. 4

    my form doesen't work right

  5. 5

    Changing text color in html doesen't work

  6. 6

    Android doesn't receive push notification from Parse Push when app is closed

  7. 7

    Parse Open push notification in different Activity Android

  8. 8

    How to change Parse push notification icon in android?

  9. 9

    Parse Push notification not sending from Android to Channel

  10. 10

    Error ~ parse.com push notification android?

  11. 11

    Parse Open push notification in different Activity Android

  12. 12

    Not receiving push notification on android with parse.com

  13. 13

    Android Parse Push Notification not working - "Outdated device"

  14. 14

    Android Parse Notification cannot receive notification if push form our server

  15. 15

    push notification doesn't work in grocer

  16. 16

    How to make push notification with GCM work on android?

  17. 17

    Android parse push notification and new GCM generate wrong device token and parse push notification not working

  18. 18

    Php ftp_connect doesen't work on AWS server

  19. 19

    Spring Integration http endpoint from child context doesen't work

  20. 20

    VTiger Scheduled workflow: "is empty" condition doesen't work

  21. 21

    Cordova/Phonegap Android Parse Push Notification not resuming app

  22. 22

    Custom Push Notification coming twice using Parse.com and Android

  23. 23

    Android, Push notification using parse.com, launches the app automatically

  24. 24

    Android: How to use Parse as an alternative GCM push notification provider?

  25. 25

    sending push notification to multiple users using Parse in android

  26. 26

    RuntimeException on android app with parse.com push notification

  27. 27

    sending push notification to multiple users using Parse in android

  28. 28

    Cordova/Phonegap Android Parse Push Notification not resuming app

  29. 29

    Custom Push Notification coming twice using Parse.com and Android

HotTag

Archive