Skip to content
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

Notification don't work on android 12 when app close from background after change flag to PendingIntent.FLAG_IMMUTABLE notification appear but when click on button app does'nt open #51

Closed
AmirhosseinShk opened this issue May 10, 2022 · 5 comments

Comments

@AmirhosseinShk
Copy link

AmirhosseinShk commented May 10, 2022

We are use connectycube_flutter_call_kit 2.0.2 on android 10 and it's working fine but when we switch to android 12 when app is close with homePage button or back button notification don't work but after change all "PendingIntent.FLAG_UPDATE_CURRENT" to "PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UPDATE_CURRENT" in NotificationManager.kt file this issue fix and notification work but when click on buttons for example accept for incoming call , its did'nt work and do nothing but in android 10 open app and working fine.

this is my log here :
D/FLTFireMsgReceiver(19693): broadcast received for message
W/FirebaseMessaging(19693): Unable to log event: analytics library is missing
D/NotificationsManager(19693): customRingtone
D/NotificationsManager(19693): ringtone 2 content://settings/system/ringtone
W/FlutterJNI(19693): FlutterJNI.loadLibrary called more than once
W/FlutterJNI(19693): FlutterJNI.prefetchDefaultFontManager called more than once
I/ResourceExtractor(19693): Found extracted resources res_timestamp-55-1652177938650
W/FlutterJNI(19693): FlutterJNI.init called more than once
I/FLTFireBGExecutor(19693): Creating background FlutterEngine instance.
I/FLTFireMsgService(19693): Service has not yet started, messages will be queued.
D/DeviceInfoPlugin(19693): Use TaskQueues.
D/PathProviderPlugin(19693): Use TaskQueues.
I/EventReceiver(19693): NotificationReceiver onReceive Call ACCEPT, callId: 1652179602368
D/ConnectycubeFlutterCallKitPlugin(19693): callEventMap: {caller_name=IrancellMan, user_info={"uid":"0:bfe1a3aa-ed7f-46c4-aeebdea","callEventJson":"{"1":"1652179600520-65i90815h5","2":0,"3":"1652179600520","4":"0","5":1}"}, caller_id=123456789, session_id=1652179602368, call_opponents=1, call_type=0}
W/FlutterJNI(19693): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: connectycube_flutter_call_kit.callEventChannel. Response ID: 321
D/FLTFireMsgReceiver(19693): broadcast received for message
W/ConnectycubeFlutterBgPerformingService(19693): A background message could not be handled in Dart as no onBackgroundMessage handler has been registered.

@rezadevelopers2
Copy link

سلام راه حلی براش پیدا کردی؟ من هم همین مشکل رو دارم

@TatankaConCube
Copy link
Contributor

@AmirhosseinShk @rezadevelopers2 we made some fixes in the new version 2.0.3, please try it.

Pay attention, if you need to start the app by clicking the Accept button, you should provide the permission SYSTEM_ALERT_WINDOW first. You can use the plugin permission_handler for requesting needed permissions.

@AmirhosseinShk
Copy link
Author

@TatankaConCube yeah! its work fine, tnx alot for ur great job

@AmirhosseinShk
Copy link
Author

@TatankaConCube I have another problem related to this issue and its about get SYSTEM_ALERT_WINDOW permission when my app on background and didn't receive permission request and get error :
Unhandled Exception: PlatformException(PermissionHandler.PermissionManager, Unable to detect current Android Activity., null)

are u have any idea for this problem can be helpful? please share with me.

@TatankaConCube
Copy link
Contributor

@TatankaConCube I have another problem related to this issue and its about get SYSTEM_ALERT_WINDOW permission when my app on background and didn't receive permission request and get error :
Unhandled Exception: PlatformException(PermissionHandler.PermissionManager, Unable to detect current Android Activity., null)

are u have any idea for this problem can be helpful? please share with me.

@AmirhosseinShk please create the new ticket for this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants