Maddy Sharma
Maddy Sharma

Reputation: 4956

how to receive notification data from push.io

I have an application in which i used push notification. i am using the api provided by push.io. I follow the below link for the configuration : step-by-step push tutorial

code working fine on emulator and I receive notifications. I click the notification and my splash screen becomes in scene. But when I am using real device, then It shows below error as received notification and crashed:

FATAL EXCEPTION: main java.lang.NoSuchMethodError: android.app.Notification$Builder.build at com.pushio.manager.PushIOGCMIntentService$1.onReceive(PushIOGCMIntentService.java:237) at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)

Here is the code for receiver :

 @Override
    public void onReceive(Context context, Intent intent) {
        Log.i("calling...", "onReceive()");

        this.ctx = context;

    //  Log.i("receiving message", "message received");
        Log.i(logTag, "Received intent: " + intent.toString());

        String action = intent.getAction();
        Log.i("action: ", action);
.
.
.
}

Upvotes: 1

Views: 757

Answers (1)

PushIO_Support
PushIO_Support

Reputation: 21

Push IO Support member here.

Our apologies for any inconvenience. We had released an Android build in late September that contained some APIs affecting some 2.3 - 4.2 devices, which is why your push implementation was working in the emulator but not on your actual device.

The fixed build was added around October 7th: https://github.com/pushio/PushIOManager_Android. Deleting the previous framework and replacing it with the newest build (2.10.3) should remove that error and result in the notification showing up on your device.

If you still continue to see errors or have any other questions related to push, feel free to reach out to our support channel at [email protected] - we typically get back within 24 hours during the weekdays (often sooner!).

Again, sorry for any inconvenience and thanks for using our service!

Regards,

  • Push IO Support Team

Upvotes: 2

Related Questions