How to receive parse push notifiactions on an android device using parse.com

Ashwin S Ashok

How to intent from parse push notification. i f anybody implemented parse push please help.

Parse.initialize(Splash.this,"id","id");
ParseInstallation.getCurrentInstallation().saveInBackground();
PushService.setDefaultPushCallback(Splash.this, ParsePush.class);

implementing like this.

can't get any values in jsonData.

public class ParsePush extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        ParseInstallation.getCurrentInstallation().saveInBackground();
        Intent intent = getIntent();
        Bundle extras = intent.getExtras();
        String jsonData = extras.getString("com.parse.Data");
        System.out.println("Data Json : " + jsonData);
    }

}

need to implement an intent from the push notification (parse). that is need to show an activity on clicking the push.. please help.

Ashwin S Ashok

Use like this :

  public class Application extends android.app.Application {

  public Application() {
  }

  @Override
  public void onCreate() {
    super.onCreate();
    Parse.initialize(this, "YOUR_APP_ID", "YOUR_CLIENT_KEY");

    PushService.setDefaultPushCallback(this, MainActivity.class);
  }
}

//MainActivity.java - Activity you need to open when the notification is clicked.

In your Manifest file add this application.

<application    android:name="com.parse.tutorials.pushnotifications.Application"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.parse.tutorials.pushnotifications.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity> </application>

And add this line in your MainActivity class which you need to open when the notification is clicked.

Bundle mBundle = getIntent().getExtras();
if (mBundle != null) {
    String mData = mBundle.getString("com.parse.Data");
    System.out.println("DATA : xxxxx : " + mData);
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to register an Android device to a push channel with parse.com

From Dev

How to register an Android device to a push channel with parse.com

From Dev

Android Push Message to Device using parse

From Dev

I want to send push notification from one android device to another using my application by Parse.com.

From Dev

how to send push notification to a specific device without creating channels using parse.com?

From Dev

Android Parse Push Notification not working - "Outdated device"

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

Custom Push Notification coming twice using Parse.com and Android

From Dev

Getting the 114 error with Parse.com registering an Android Device for Push Notifications

From Dev

Getting the 114 error with Parse.com registering an Android Device for Push Notifications

From Dev

Parse.com Push on Android in Xamarin

From Dev

Error ~ parse.com push notification android?

From Dev

Parse.com Push on Android in Xamarin

From Dev

Not receiving push notification on android with parse.com

From Dev

Android Parse Notification cannot receive notification if push form our server

From Dev

Parse push notifications appear on Parse.com's Push Notif table but not on actual device

From Dev

Send push notification by using Parse from laravel web server to android device

From Dev

Parse.com : Sending Push notification from device?

From Dev

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

From Dev

Send push with parse to certain device?

From Dev

Android device doesnt receive push

From Dev

How to change Parse push notification icon in android?

From Dev

Parse Push notifications on Android

From Dev

Android Parse Push

From Dev

Parse Android Push Notifcations

From Dev

How to know if there is Internet when using Parse.com Android

From Dev

how to send push notification using phonegap and parse

From Dev

android Implement chatting through push notification using parse.com api

Related Related

  1. 1

    How to register an Android device to a push channel with parse.com

  2. 2

    How to register an Android device to a push channel with parse.com

  3. 3

    Android Push Message to Device using parse

  4. 4

    I want to send push notification from one android device to another using my application by Parse.com.

  5. 5

    how to send push notification to a specific device without creating channels using parse.com?

  6. 6

    Android Parse Push Notification not working - "Outdated device"

  7. 7

    Custom Push Notification coming twice using Parse.com and Android

  8. 8

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

  9. 9

    Custom Push Notification coming twice using Parse.com and Android

  10. 10

    Getting the 114 error with Parse.com registering an Android Device for Push Notifications

  11. 11

    Getting the 114 error with Parse.com registering an Android Device for Push Notifications

  12. 12

    Parse.com Push on Android in Xamarin

  13. 13

    Error ~ parse.com push notification android?

  14. 14

    Parse.com Push on Android in Xamarin

  15. 15

    Not receiving push notification on android with parse.com

  16. 16

    Android Parse Notification cannot receive notification if push form our server

  17. 17

    Parse push notifications appear on Parse.com's Push Notif table but not on actual device

  18. 18

    Send push notification by using Parse from laravel web server to android device

  19. 19

    Parse.com : Sending Push notification from device?

  20. 20

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

  21. 21

    Send push with parse to certain device?

  22. 22

    Android device doesnt receive push

  23. 23

    How to change Parse push notification icon in android?

  24. 24

    Parse Push notifications on Android

  25. 25

    Android Parse Push

  26. 26

    Parse Android Push Notifcations

  27. 27

    How to know if there is Internet when using Parse.com Android

  28. 28

    how to send push notification using phonegap and parse

  29. 29

    android Implement chatting through push notification using parse.com api

HotTag

Archive