Open Frief84 opened 9 years ago
Yes, I’ve thought about this, and maybe this could be achieved by simply adding an HTML view of the local version of the Leaflet map? This might even result in an almost live map as you log. Embedding an HTML like that should definitely be possible.
Alternatively, the Google Maps API allows adding markers for GeoJSON points etc. too.
Worth exploring in the future.
Hi, it says in the README that a map visualization has been done. Is it possible to see any working code for this?
Yes, I did put something together with Leaflet, resulting in a "hex bin map", i.e., the RSSI is averaged over hexagonal tiles. (If you speak German, here’s the forum thread where all this originated.) It looked like this:
It wasn’t much more than a proof of concept. Here’s a downloadable version (.zip); the HTML file contains an explanatory comment.
(There was a server component too, which allowed uploading the logs from the app. I might still have it somewhere, but it was just some script.)
The thing is – and I guess I should eventually type up a post-mortem and post it in this project’s README – the results where underwhelming. At least for the original purpose, which was mapping the wifi coverage of a community wifi project.
Thanks for this info!
I'm about to make something similar for my community. I'm interested specifically in the power saving issues you ran into. Would you be able to briefly describe them and any workarounds you tried? Might be able to save myself some headache.
Unfortunately I don’t remember much of the details. I should say that this was my first (and so far only) foray into Android programming, so it’s entirely possible that the problems would be easily solvable to an experienced Android programmer.
The general problem was that wifi scanning and/or logging to file would stop when the screen is turned off or a different app takes the foreground (#1). AFAIK there no way to guarantee that an Android activity/service stays running (even if that is clearly what the user desires).
I tried acquiring a wake lock as seen in this commit, and the scanning/logging was moved to a service (this PR, but it’s possible that either of this was somehow done incorrectly. We still had users report that the log was incomplete or stopped entirely.
So I built my own monitor and you can solve this by pushing the wifi scanning to a Service that is run as a foreground service. It will have a persistent notification and a very high priority so Android will not clean it up.
See here:
Cool! Are you logging to DB only? I see you integrated a speed test too.
Out of curiosity, what will you use this for?
I'm logging to a firebase instance. I'm running a network performance evaluation of the university wireless network.
It would be nice if you could see the measurement points of your current Log within the app on a map ...