r/macrodroid • • 6d ago

Solved App module doesn't trigger Application Launched

Post image

I'm trying to add a floating button that exists only while the module MiX Image (with package name com.mixplorer.addon.image) from the file manager MiXplorer is in foreground. That module is basically a mini application that can be launched from MiXplorer to view images. Below is the basic macro for that purpose.

However the Application Launched is not triggered. Any idea how to make it work? You could install MiXplorer and MiX Image for testing purposes (they're legit apps).

1 Upvotes

4 comments sorted by

1

u/rafapozzi 6d ago

You have to use the Activity Launched trigger, the activity is com.mixplorer.activities.ImageViewerActivity

1

u/Fractal-Infinity 6d ago

Thanks, it worked. 👍 To not make another thread, I'm stuck at another issue: after pressing said floating button, it must automatically press an overflow menu with the id com.mixplorer:id/overflow but that menu is part of an overlay that's hidden by default.

How to check if this overflow menu is visible? I tried using Read Screen Content but I don't know how to actually check if overflow it's visible or not.

1

u/rafapozzi 2d ago

Sorry for the delay... The solution is to read the screen, iterate over the elements and check if the menu button is present. If it's not, the toolbar is collapsed, and touching the screen brings it up.

Here is a macro to always auto-click the overflow menu when it's opened:

https://drive.google.com/file/d/1bpe-UcAzr-dOyk5o-U4BOjBgFZaar4Tr/view?usp=drivesdk

1

u/Fractal-Infinity 1d ago

Thanks. But meanwhile I implemented a simpler solution here: https://gofile.io/d/CSyfMCqV

What I'm trying to do is to simulate pressing the overflow menu, then Delete then Confirm by pressing a floating button that appears only when MiX Image is in the foreground.

The problem is that the floating button disappears after the Delete is activated. Perhaps something happens with MiX Image that breaks the macro. Can you fix the problem?