Riki1200 / azure_notification_hub_new

Flutter support for using Azure Notification Hun Plugin in iOS and Android apps.
Other
0 stars 0 forks source link

Cannot get notifications on Android app #4

Open ewaradomska opened 4 months ago

ewaradomska commented 4 months ago

Hello, I configured my Android exactly as you propose. Added all needed permissions to my AndroidManifest:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

and meta-data with my Azure credentials (outside my activity tag):

 <meta-data 
                android:name="NotificationHubName"
                android:value="" />
 <meta-data 
                android:name="NotificationHubConnectionString"
                android:value="Endpoint=" />

I don't see any errors, I get token from the plugin side (I assume I get it as I can see log "onToken" from configure() method, so in theory my device should be registered to Azure hub). My app is configured with Firebase - getting notifications from FB with any problems, all my credentials from FCM v1 are properly added to my Azure account.

Unfortunately there is no notifications when I try to send tests to my Android devices (Hub shows 0 passed, 0 failed, so probably it doesn't even see my device somehow). No notifications on real device in debug mode, no notification on real device in release mode. Have you any idea what I'm missing here?

ewaradomska commented 4 months ago

Looks like my problem is connected with new HTTP v1 API. Plugin is registering device to legacy API (GCM) which will be removed in June 2024. Do you think it will be possible for you to add registration to FCM v1 on plugin side? In the other way it would just stop working for Android in June :(

Riki1200 commented 1 month ago

Will update mate