MeshCentralAndroidAgent icon indicating copy to clipboard operation
MeshCentralAndroidAgent copied to clipboard

Android agent - Desktop connect brings up mesh agent activity hiding previous activity

Open edlins opened this issue 4 years ago • 3 comments

Hello,

I have been playing around on a customized Android device which boots and launches a specific activity that I always want to be displayed on top. I was able to sideload the Android agent apk and use adb to enter the server connection URL and I can connect! The problem is that every time I connect to the Desktop, the agent activity is brought to the front, possibly as a simple form of user consent notification. However, this hides the activity that I need to be persistent. Also, I cannot interact with the Desktop to switch back to the desired activity. Disconnect also does not change this so any Desktop connect leaves my device in a "broken" state showing just the mesh agent activity.

Can the foregrounding of the mesh activity be disabled through a setting, or can it default to not switching to the mesh activity?

This is very close to being a great Android monitoring solution if that one "feature" can be changed. Thanks!

EDIT: Hmm, I would also need to auto-start (receiver for RECEIVE_BOOT_COMPLETED) and auto-connect (CONNECT button) as well as keeping the activity in the background the entire time. So I can't really use this unless I have all three of those. This seems a pretty big ask but would make the agent very useful, even without Desktop interaction.

edlins avatar Jun 20 '21 17:06 edlins

I am not an Android expert and so, not sure how I fix this. Of course, the code to the Android agent is available if you want to make changes to it. One thing i do want to offer is an auto-connect feature in in the Android agent. That is certainly something I will be trying to add.

Ylianst avatar Jun 22 '21 14:06 Ylianst

Ok, I'm not great with Android either. I'll let you know if I take a crack at it. In the meantime, the ask is documented so you can close this if you like. Thanks!!

edlins avatar Jun 22 '21 18:06 edlins

I did add the auto-connect option in the latest MeshCentral Android Agent v1.0.14.

image

Ylianst avatar Jun 25 '21 21:06 Ylianst