How Can I Dynamically Open Application With Flutter And OpenSignal When Notified? - android

I'm building a Flutter application using OpenSignal.
When I press the accept or reject button, I want the application to perform the relevant action without opening the application, and when I press the notification without pressing any key, I want the application to open.
I added <meta-data android:name="com.onesignal.NotificationOpened.DEFAULT" android:value="DISABLE" /> to my manifest file but this time app does not open at all when press notification.
How can i do this? Thanks.

Related

Android Open Activity Multiple Times from Notification

When clicking my notification, it opens the activity once and works fine, but then the notification remains in the message tray and doesn't open anything again.
Is there a way to set up the notification to open the activity every time the user clicks on it? Or is this not feasible with Android?
Thanks!
try to put launch mode to activity which you are trying to open from notification.Link will provide description about launch mode
<activity
android:name=".SingleTaskActivity"
android:label="singleTask launchMode"
android:launchMode="singleTask">
Helpful link for Launch mode

when I minimize the app, the app is not showing in task manager

I have developed android app its working fine but when I minimize the app, the app is not showing in task manager
after opening the app press on home button app need to be displayed in taskmanger running apps to resume app
My guess is, may be in your Manifest file, in the launcher activity you have defined this tag, if you want to see your app in the recent list, just remove this tag.
android:excludeFromRecents="true"
Check carefully if you accidently added below line in your manifest and remove it if it is there:
<activity android:name=".MainActivity"
android:excludeFromRecents="true" //<----

How to exit from application which is setted as home app at manifest

I setted my android app as Home in android manifest with following code. But i want to exit from this app when i want but it reopens itself. Is it possible to exit from application and prevent auto re-open until i want to open manually or pressing home button myself. Is it possible to do this.
<category android:name="android.intent.category.HOME" />
that isn't possible. by pressing the home button all applications using "android.intent.category.HOME" will be displayed to choose from. when the user pick one to always be picked for home button, then the behaviour you descriped will happen. so the only choice you/or rather the user of your application has, is to noch set an application to always open when asked to do so.

removing application from recents in android 4.2.2

I want to remove app from the recents. I have used android:excludeFromRecents="true" in manifest file.
So, whenever i click on home button, app is not present in recent list.
But when i open app, and click on recents, app will be part of recent apps list and it is accessible.
Is there any way to remove (or restrict app being part of recents) app when user click on recent when app was open.

After downloading an app, "The requested item could not be found on this device" error

When downloading my app from Market, when I tap on the Open button to try to run it, a toaster message says: "The requested item could not be found on this device and so could not be launched." But in fact, it's downloaded alright and its icon shows in app screen, if I tap on the icon, it runs fine. But this message is really annoying and is a turn off for many users.
Does anybody have any idea? Thanks in advance!
EDIT: In this app, I have two launcher icons, launching two different activities. Could this be the cause? I mean, when the user clicks the Open button from Market program, which activity would be launch? The first one???
Turned out it's this:
In my app's manifest file, there used to be two launcher activities. That is, two activities with a category like this:
<category android:name="android.intent.category.LAUNCHER" />
This is not a mistake, it was intentional. Two activities launch different functionality of the app. I then changed one of them. I remove its LAUNCHER attribute and use CREATE_SHORTCUT instead:
<action android:name="android.intent.action.CREATE_SHORTCUT" />
Of course there is more to just the above, but the point is: Don't use more than one Launcher activities, or when the user clicks the Open button from Market app, it doesn't know which activity to launch. User Android's Shortcuts facility. (That is, long-press on any empty spot on Home screen, select Shortcuts from the pop-up menu. That's the Shortcuts I meant.)

Categories

Resources