Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Push campaign not received #35

Open
DinaMMorad opened this issue May 14, 2023 · 6 comments
Open

Push campaign not received #35

DinaMMorad opened this issue May 14, 2023 · 6 comments
Assignees

Comments

@DinaMMorad
Copy link

when I send push campaign to test device token it works but when I start campaign I don't receive the notification

@poting-oath
Copy link
Collaborator

@DinaMMorad Android 12 & 13 changed many Notification policies. These may be the reasons why you did not receive the notification on devices that run on newer Android platforms.

Flurry SDK 14.2.0 resolved these issues on these newer Android platforms. Please upgrade Flurry SDK to see whether it resolves your issues or not.

https://developer.yahoo.com/flurry/docs/releasenotes/android/
Android SDK Release Notes
Version 14.2.0 - 03/14/2023

  • Fix for Flurry Push notification not shown on the Android 13 and above devices.
  • Fix for clicking on Flurry Push notification does not bring back apps to foreground on the Android 12 and above devices.
  • A couple minor bug fixes.

All add the post notification permission to the manifest file: (required by Android 13)
uses-permission android:name=”android.permission.POST_NOTIFICATIONS”

@DinaMMorad
Copy link
Author

DinaMMorad commented May 17, 2023

@poting-oath I'm using version 14.2.0 and I've got POST_NOTIFICATIONS permission but didn't receive notification on android 13 device although I received it with android 10 device

@DinaMMorad
Copy link
Author

DinaMMorad commented May 21, 2023

@poting-oath also I added user property and sent notification to it but didn't receive that notification I wanted to target all users using english language with a notification I sent notification but all devices that has this userproperty didn't receive this notification

@poting-oath
Copy link
Collaborator

@DinaMMorad Though the Android developer docs say "recommended" to add POST_NOTIFICATIONS permission for Android 13 and above devices. As I found, it is actually "required" to add this permission! Please do add the following post notification permission to the manifest file:

uses-permission android:name=”android.permission.POST_NOTIFICATIONS”

And in your app, do use ActivityCompat.requestPermissions to request the permission if ContextCompat.checkSelfPermission returns PackageManager.PERMISSION_DENIED.
Examples codes,

    private static List<String> PERMISSIONS;
    static {
        PERMISSIONS = new ArrayList<>();
        PERMISSIONS.add(Manifest.permission.ACCESS_FINE_LOCATION);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
            PERMISSIONS.add(Manifest.permission.POST_NOTIFICATIONS);
        }
    }
...
    for (String permission : PERMISSIONS) {
        if (ContextCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_DENIED) {
            // Simply request permissions if one of them is missing
            ActivityCompat.requestPermissions(this, PERMISSIONS.toArray(new String[0]), PERMISSION_REQUEST);
            break;
        }
    }

@raghuriyaz
Copy link

@DinaMMorad @poting-oath I'm seeing the same issue. push notification works with test device token but if I start a campaign, it is not received. Did you find any solution?

@poting-oath
Copy link
Collaborator

@raghuriyaz Do you add permission ”android.permission.POST_NOTIFICATIONS” to your app? And ask users to allow the permission by ActivityCompat.requestPermissions?

@poting-oath poting-oath self-assigned this Jul 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants