Skip to content

Geolocation and lock for android mobile device - #7289

Closed
mpedy wants to merge 10 commits into
Ylianst:masterfrom
mpedy:master
Closed

mpedy wants to merge 10 commits into
Ylianst:masterfrom
mpedy:master

Conversation

@mpedy

@mpedy mpedy commented Sep 21, 2025 •

Copy link
Copy Markdown

Added lock option for mobile device and a geolocalization tab for getting position of android mobile device with a fork of MeshCentralAndroidAgent

CLIENT SIDE: Ylianst/MeshCentralAndroidAgent#42

@si458

si458 commented Sep 21, 2025 •

Copy link
Copy Markdown
Collaborator

Unfortunately, we cannot accept this PR because the package.json has been modified with packages that won't work on Linux machines/docker

Also u say this works with a fork of the meshagent for Android rather than the official build

What might be better is u convert this into a plugin!
https://ylianst.github.io/MeshCentral/meshcentral/plugins/
Then people can install it if they want to use it

EDIT: ok, I had a think, we might accept it, but u need to fix the package.json, please, as this will break linux machines!
Also please can u verify the android app etc too with the Google play store

@mpedy

mpedy commented Sep 21, 2025

Copy link
Copy Markdown
Author

I restored package.json and package-lock.json as they were previously. For Android, I'm going to check it asap thank you!

@si458

si458 commented Sep 21, 2025

Copy link
Copy Markdown
Collaborator

Thanks for fixing that!

If possible, please can u also apply ur changes to the new modern ui? default3.handlebars

We aren't really making any major changes to the old ui anymore and we are trying to push people towards the new ui!

You can use the new ui by clicking the diamond (top right) and click the bottom 3 lines icon OR by adding ?sitestyle=3 into the url bar

@mpedy

mpedy commented Sep 22, 2025

Copy link
Copy Markdown
Author

I think there is a typo in default3.handlebars at row 9343: setModalContent('xxAddAgent', "Device Action", x) should be setModalContent('xxAddAgent', "Device Action", xxdialogTag). This causes the time div of the actions to not be displayed in the dialog mode

@si458

si458 commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

thank you @mpedy! indeed the modern ui had a bug! have pushed your fix here and checked it works 4295901
but also it just goes to show you how many people ACTUALLY use android agent, its very few as this was NEVER spotted in about a year of trialing the new modern ui

@si458

si458 commented Oct 23, 2025

Copy link
Copy Markdown
Collaborator

plz can u resolve these conflicts and we might be merging it!?

@si458

si458 commented Oct 28, 2025

Copy link
Copy Markdown
Collaborator

just another one, we already use openlayers v4.2.0
would it be possible for your to use this instead of leaflet?
ideally i would like to replace openlayers with leaflet but the is so much openlayers already does that would need replacing

@mpedy

mpedy commented Oct 29, 2025

Copy link
Copy Markdown
Author

@si458 I have ported map from leaflet to openlayer. Please consider to remove Content-Security-Policy from webserver.js if that's okay for you: there is an open route for *.openstreetmap. Regarding Custom CSS and JS tags, I placed them under webserver.js with no extra config file modification for using leaflet but, if it's not necessary anymore, consider only last commit.

@si458

si458 commented Oct 29, 2025

Copy link
Copy Markdown
Collaborator

@mpedy we already add to the CSP IF you have geolocation enabled
const geourl = (domain.geolocation ? ' *.openstreetmap.org' : '');

'Content-Security-Policy': "default-src 'none'; font-src 'self' fonts.gstatic.com data:; script-src 'self' 'unsafe-inline' " + extraScriptSrc + "; connect-src 'self'" + geourl + selfurl + "; img-src 'self' blob: data:" + geourl + " data:; style-src 'self' 'unsafe-inline' fonts.googleapis.com; frame-src 'self' blob: mcrouter:" + extraFrameSrc + "; media-src 'self'; form-action 'self' " + duoSrc + "; manifest-src 'self'"

@pofa2007

pofa2007 commented Feb 5, 2026

Copy link
Copy Markdown

thank you @mpedy! indeed the modern ui had a bug! have pushed your fix here and checked it works 4295901 but also it just goes to show you how many people ACTUALLY use android agent, its very few as this was NEVER spotted in about a year of trialing the new modern ui

we are about to add 600 tablets to a selfhosted one, will it be a good test ? :)

@si458

si458 commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

@pofa2007 we havent updated the android agent to include these feature yet, this is why we havent merged it yet
still some way a way

@pofa2007

Copy link
Copy Markdown

@si458 we found on old Android releases the current agent still works, on the last Android release it does not .
is there an estimated date to an apk update ?

thanks and regards

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label Apr 22, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed due to inactivity. If you'd like to continue working on it, please reopen it.

@github-actions github-actions Bot closed this Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants