I implemented the firebase chat app and even implemented the notification I want to ignore the notification only in the chat activity because the notification rings in the chat activity!
I think Firebase Messaging Service can set it up, but I don't know how, so I'm asking you a question Please give us a good answer!
android firebase
ActivityManager activityManager = (ActivityManager) getSystemService (ACTIVITY_SERVICE);
List info = activityManager.getRunningTasks(1);
String activity = info.get(0).topActivity.getClassName();
You can bring one of the best activities with this. I think you can conditionally divide it so that you can call the Noti generation function only when it is not the same as the name of the activity in the chat window.
<uses-permission android:name="android.permission.GET_TASKS"/>
You need to give the above authority to manifest. Although it has been deprecated, this permission setting is not required in the latest version, and it needs to be added in the old version because it needs to be setIt's more
578 Understanding How to Configure Google API Key
918 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.