Open app without relaunching it

md_sgf

Member
I would like to open an app within macrodroid, just like when i tap the app icon in apps drawer, or on home screen.
That is, when i use Launch Application, or Launch Shortcut, the app (notes app) is relaunched, and i lose any edits i have done.
But when i tap the app drawer icon, the app comes to foreground, but is not relaunched.
 

Endercraft

Moderator (& bug finder :D)
I would like to open an app within macrodroid, just like when i tap the app icon in apps drawer, or on home screen.
That is, when i use Launch Application, or Launch Shortcut, the app (notes app) is relaunched, and i lose any edits i have done.
But when i tap the app drawer icon, the app comes to foreground, but is not relaunched.
Using the 'Exclude from Recents' option should work. Using 'Force New' will not really restart the app but bring you to the first screen that would appear if it did start.
 

md_sgf

Member
Yep, what i mean is it's like it has been stopped & relaunched.

Nope, tried all 4 iterations, and still returns to main screen.

That first screen is MainActivity i believe? When i try using Launch Shortcut (using eg Shortcut Maker), i only see one item - (app).MainActivity.

How does Android open the app? Why doesn't app return to main screen when i tap app icon on home screen?
 

MacroDroidDev

Administrator
Staff member
Well the way it should work is that Force New will always cause the app to launch as if launch from scratch (e.g. after a reboot).

Without this option MacroDroid should just try to launch the app's main intent (as the launcher does), so the app should usually return to wherever you were previously (but may depend on the app). This certainly works ok for many apps, but maybe there is some specific behaviour in the particular app that prevents this.

What is the other app?
 

md_sgf

Member
Here's all the activities for One UI Home, that I found via Shortcut Maker.

I WONDER could be be possible to use one of these activities, and pass it a parameter like I do on Windows? (the parameter would be "Treepad" or the package name "su.okozhevnikov.fstreenote"). I don't know much about how apps work technically, just the basics really at this stage.
 

Attachments

  • one ui home, activities, Shortcut Maker.png
    one ui home, activities, Shortcut Maker.png
    91.9 KB · Views: 12

md_sgf

Member
Perhaps i could pass parameter as "Extras" in intent?

I wonder where i can find technical info of One Ui Home? (so i can see if the above is possible)
 

md_sgf

Member
If i DO manage to find a way, then that could also work to "activate" other apps too .. which is what I've been wanting for some time (as it's very cumbersome/messy to try to automate the swipes after triggering recents).
 

MacroDroidDev

Administrator
Staff member
It looks like this app is so old I can't even install on many of my test devices. I presume this is because it's built against very old SDKs and the Google police say we are no longer allowed it.
 

md_sgf

Member
Or Samsung Calendar (has same issues)

v = KEEPS current activity (editing/etc)
x = LOSES " " "

Calendar
this app
x Notification
launcher app
v Home (One UI Home)
v Home (Olauncher)
shortcut app
x Shortcut Maker (there's 15 activities listed, but i have no idea what they do)
x (other such apps)
 
Top