Tacs avatar image
Tacs asked ·

Android Notification Receiver not triggered

So im trying to send notifications to my android app.
I have everything done, i have a class extending AppNotification:

public class MyNotificationReceiver extends AppNotificationReceiver {
    final public static String NOTIFICATION_ACTION = "notif";
    final public static String NOTIFICATION_EXTRA_KEY = "extra_params";

    public MyNotificationReceiver() { }

    public void onReceive(Context context, AppNotification notification) {
        Helper.logMe("Notif: "+notification.toString());
        if (notification.appEvent.equals(NOTIFICATION_ACTION)) {
            Helper.logMe("Got it!");
            Intent intent = new Intent(context, Webby.class);
            intent.putExtra(NOTIFICATION_EXTRA_KEY, notification.payload);

I also have the manifest properly set:

<receiver android:name=".classes.MyNotificationReceiver"
                <action android:name="" />

On my Webby activity i have this:

protected void onNewIntent(Intent intent) {
    Helper.logMe("Done: "+intent.getStringExtra(MyNotificationReceiver.NOTIFICATION_EXTRA_KEY));

Im not getting logs when sending POST requests using!/no... (i get a 200 response code and an empty json string response body).
Is there some problem with the push server or im doing something wrong?

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

You can get a good idea if the push client thinks it's connected by doing adb logcat|grep -i push. If it looks like it's connected, you could try forcing a push message from some other source like creating / modifying an order on another device (to see if it's a problem w/ your usage or it's not working in general).

0 Likes 0 · ·

Hi @jeff
Im not really sure what you are saying... I created items in inventory using webapp and they are synced on my device
I've tried to adb logcat on android studio terminal then i tried to find "push" but it doesnt exist there, so i guess thats a problem?

0 Likes 0 · ·
Hello, I have the same problem. A few months ago the notifications were working OK, but now the notification is not triggered in the app. I created the app based on the notification example and also I tried with the notification itself now but it's not working.

This is the request:

And the Body:

{ "data": "0V8C221GZEA46", "event": "baykus_order"}

I don't know where else to check because everything seems to be ok.

0 Likes 0 · ·
Facing the same issue
0 Likes 0 · ·

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community