So, we are developing a video calling functionality for Android wherein we launch the Video call screen(Activity) on receiving a Notification through FCM.
Currently, the Activity is getting launched successfully for the following manufacturers:
But we have encountered a case where it is not getting launched for Xiaomi Oreo and Pie devices when the App process is killed. When the App process is running already(foreground or background), we don't encounter any issue with Activity launch on Xiaomi
Code to be executed in onMessageReceived()
:
Intent intent = new Intent(MyFirebaseMessagingService.this, IncomingCallActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
Xiaomi just throws a log in response to the Activity launch code execution:
2019-12-06 13:00:32.223 12843-12843/com.healthassure I/Timeline: Timeline: Activity_launch_request time:322216169 intent:Intent { flg=0x10000000 cmp=com.healthassure/com.Activity.IncomingCallActivity }
That's it. The Activity never gets launched.
What could be the reason for this?
User contributions licensed under CC BY-SA 3.0