-
-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Android SDK 31 #277
base: master
Are you sure you want to change the base?
Conversation
Activity with intent need to have exported mentioned explicitly https://developer.android.com/guide/topics/manifest/activity-element#exported
Support for Android SDK 31 - specify an explicit value for android:exported
This pull request is really important to get merged, as at some point android 31 will become a mandatory target. My only question is, considering the plugin is using intents, should exported be set to true or false? From my understanding it should be true. Why false? |
Yes, it should be true(Copy paste error), I have updated it. |
Updated FCM and BOM versions
Made all the changes suggested by marutifh . |
I have a forked the plugin and made some changes to it, please use that and
check if that works.
…On Sun, 13 Nov 2022 at 5:39 PM, manojsachdeva ***@***.***> wrote:
Made all the changes suggested by marutifh <https://github.com/marutifh> .
Build goes successful but Notifications stop getting received. Please
suggest.
—
Reply to this email directly, view it on GitHub
<#277 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABF25NAVSMP7CNXXEI4P6MTWIDLBHANCNFSM5LOQ225A>
.
You are receiving this because you authored the thread.Message ID:
<andrehtissot/cordova-plugin-fcm-with-dependecy-updated/pull/277/c1312715455
@github.com>
|
I have the same problem that the device stop getting notifications (after using [email protected] api level 32)
anyone can help? == update == == update2 == |
Oh I got exactly the same output (about FLAG_IMMUTABLE, only use FLAG_MUTABLE). This became blocker now for releasing new versions as 31 is required in store @marutifh any chance to help with that? |
I think on Android I used this method to get the notification on Tap of
notification.
https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated#fcmgetinitialpushpayload
Please check if that helps.
…On Wed, 23 Nov 2022 at 6:43 AM, Michał Króliczek ***@***.***> wrote:
Oh I got exactly the same output (about FLAG_IMMUTABLE, only use
FLAG_MUTABLE). This became blocker now for releasing new versions as 31 is
required in store
—
Reply to this email directly, view it on GitHub
<#277 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABF25NGM2ODKNCLBG6YWTK3WJVVULANCNFSM5LOQ225A>
.
You are receiving this because you authored the thread.Message ID:
<andrehtissot/cordova-plugin-fcm-with-dependecy-updated/pull/277/c1324426559
@github.com>
|
Hi @marutifh . Sorry but we are not on the same page... Link you just gave me is about getting payload in app already. The problem is after chanding target sdk to 31 you will see no notification at all (when your app is not used at the moment, background mode). It is not possible to tap something that is not showing up. It was working till sdk 30. Many pepole report it. Explicitly specified exported=true/false is fixed and app is building, but it is throwing expections instead of showing push notification. (excatly like 3 comments above:#277 (comment)) I see exception comes from @nicepeter Did you try to use newer firebase sdk? This is old and probably that the reason for problem. FCM plugin does not use Intents directly. @marutifh What shoud I do to use newest Firebase SDK? I tried to install plugin with newest bom version and in package.json I do have:
|
After changing ANDROID_FCM_VERSION to 23.1.0 (newest available) the plugin has compilation errors unfortunatelly:
I think plugin needs to use newer Firebase SDK which is not possible due compilation errors |
In my fork, I have updated to latest Firebase SDK. Please check that and
the previously mentioned link is needed to read the notifications received
in background mode.
…On Wed, 23 Nov 2022 at 2:50 PM, Michał Króliczek ***@***.***> wrote:
After changing ANDROID_FCM_VERSION to 23.1.0 (newest available) the plugin
has compilation errors unfortunatelly:
^ symbol: class FirebaseInstanceId location: package
com.google.firebase.iid
D:\dev\projects\parking-mobile-2\cordova_android\platforms\android\app\src\main\java\com\gae\scaffolder\plugin\FCMPlugin.java:13:
error: cannot find symbol import com.google.firebase.iid.InstanceIdResult;
^ symbol: class InstanceIdResult location: package com.google.firebase.iid
D:\dev\projects\parking-mobile-2\cordova_android\platforms\android\app\src\main\java\com\gae\scaffolder\plugin\FCMPlugin.java:182:
error: cannot find symbol
FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(new
OnCompleteListener<InstanceIdResult>() { ^ symbol: class InstanceIdResult
location: class FCMPlugin
D:\dev\projects\parking-mobile-2\cordova_android\platforms\android\app\src\main\java\com\gae\scaffolder\plugin\FCMPlugin.java:184:
error: cannot find symbol public void onComplete(Task<InstanceIdResult>
task) { ^ symbol: class InstanceIdResult
D:\dev\projects\parking-mobile-2\cordova_android\platforms\android\app\src\main\java\com\gae\scaffolder\plugin\FCMPlugin.java:182:
error: cannot find symbol
FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(new
OnCompleteListener<InstanceIdResult>() { ^ symbol: variable
FirebaseInstanceId location: class FCMPlugin
D:\dev\projects\parking-mobile-2\cordova_android\platforms\android\app\src\main\java\com\gae\scaffolder\plugin\FCMPlugin.java:204:
error: cannot find symbol
FirebaseInstanceId.getInstance().getInstanceId().addOnFailureListener(new
OnFailureListener() { ^ symbol: variable FirebaseInstanceId location: class
FCMPlugin
D:\dev\projects\parking-mobile-2\cordova_android\platforms\android\app\src\main\java\com\gae\scaffolder\plugin\FCMPlugin.java:227:
error: cannot find symbol
FirebaseInstanceId.getInstance().deleteInstanceId(); ^
I think plugin needs to use newer Firebase SDK which is not possible due
compilation errors
—
Reply to this email directly, view it on GitHub
<#277 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABF25NENZLXAQH4J53UHMSDWJXOWPANCNFSM5LOQ225A>
.
You are receiving this because you were mentioned.Message ID:
<andrehtissot/cordova-plugin-fcm-with-dependecy-updated/pull/277/c1324757280
@github.com>
|
Ok now I got everything working! Thank you so much! @marutifh you should officialy keep going with this plugin as author dropped it and seems you know how it works ;) BTW I do have another problem with it. It works fine until in my config.xml I add So I just need to add android:allowBackup="false". After doing this and running cordova prepare for android it says: Any ideas why it reports conflict with such 'edit-config' |
Glad to see it's working. I also tried to upgrade firebase messaging lib to 23.1.0, got it compiled but notification not showing. == update == == update2 == |
Thanks @marutifh your fork works like a charm on Android 12, API 31 |
@4sh Thanks for your fork (https://github.com/4sh/cordova-plugin-fcm-with-dependecy-updated).
|
Here is the working SDK 33 (Android 13) fork: https://github.com/inrobin/cordova-plugin-fcm-with-dependecy-updated It contains updates from https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated and https://github.com/4sh/cordova-plugin-fcm-with-dependecy-updated Please fork it for further development. |
SDK 33 Updates
…t caller to get stuck
Handle grantPermission for API versions <33
return true in grantPermission if app already hasPermission to preven…
Hi,
When we set target SDK to 31, it gives a compile time error, so added fix for this.
Error observed
Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for
android:exportedwhen the corresponding component has an intent filter defined. See https://developer.android. com/guide/topics/manifest/activity-element#exported for details.