zamojski / TowerCollector

The OpenCellID and MLS contributor's app.
Mozilla Public License 2.0
228 stars 29 forks source link

Use OSM tiles from installed OsmAnd app #102

Open r4sas opened 3 years ago

r4sas commented 3 years ago

Current implementation uses own tiles loading, but it can be good idea to check if OsmAnd app installed and use map tiles from it. That can prevent excessive tiles download and reduce internal space usage.

zamojski commented 3 years ago

Technically this may cause several issues on the devices running Android 11 which introduces many restrictions on using the files from other applications, including internal memory and SD card. Currently OSMDroid (the map control I use) is not fully compatible with Android 11, see this issue for example.

r4sas commented 3 years ago

In that case do it switchable, with logic depending on system version.

Lee-Carre commented 2 years ago

OSM tiles from installed OsmAnd

check if OsmAnd app installed and use map tiles from it

OsmAnd doesn't (ordinarily, by default) use tiles (raster images), but vector data (in OBF format, along with routing data) which it renders locally. Besides needing vector map data for routing, element tags are also needed for its in-app search (for PoIs) feature. The format isn't well-documented, either, from what I've read.

Pre-rendered tiles are probably the best (simplest) option for Tower Collector. A map is a secondary feature in this context. Tower Collector isn't about navigation, but collecting data. A map is a convenience feature.

OSM map tiles are quite lean (byte-count, because that's in everyone's interest). They don't require much storage unless viewing a wide area in detail.

If storage is a concern, then reduce (or disable) the cache (but that'll use more network data).

zamojski commented 2 years ago

I doubt it's technically possible to implement this feature on latest Android versions because Google limits access to several functions in the API, for example ability to query installed applications, officially for privacy reasons.

guglovich commented 2 months ago

Relevant I hope there is some solution to this issue