Impossible import Favourites to "Maps" app in a new phone

I have a new phone: Fairphone 4. I followed the instructions, into “Maps” app, in /e/os, to export “Favourites” to the new phone, but it’s impossible. The app doesn’t import Favourites.

Has anyone managed to do it? Thanks!

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

You mean in Magic Earth - Settings - Support - Tips & Tricks - Favourites: How do I export… / How do I import…?

What happens? Any error message or something else unexpected?

Correct. I followed this tips, but then, when I open “Favourites.xml” in “Maps”, Murena’s app, nothing happens. My favourites places are not imported. No error message: simply the app doesn’t import Favourites.

I can confirm this on 1.13-s-20230727314102-dev-FP3.

You could open an issue at https://gitlab.e.foundation/e/backlog/-/issues to directly contact the /e/OS developers about this.

read https://www.magicearth.com/faq/#favourites-help

and I put it into

Android/data/com.generalmagic.magicearth/files/Download/MAGICEARTH/

and it agreed to import from there.

I think the App just needs an additional READ_EXTERNAL_STORAGE at https://gitlab.e.foundation/e/os/android_vendor_eos/-/blob/914b28c88abf175743e1966e6df8dc404943383e/config/permissions/eos-permissions.xml#L68 to make the import from the toplevel user dirs possible.

I can go ahead and file a bug if you want. The permission imo too general. If Magicearth had an App dialog that would open the dir and ask for scoped permission on for example “Downloads”, that would be better than giving it the read permission system-side.

1 Like

I read https://www.magicearth.com/faq/#favourites-help and did what was recommended …

‘It is recommended to send the file to yourself in mail or whatsapp attachment, then open it on the phone, tap on the attachment and select "Open With Magic Earth’."

… and for me this shows exactly the behaviour @llamasjm described.

sorry, just linked this for completeness sake. The faq is still proper for the official App, it was never meant to be shipped as system app.

If you’d install MagicEarth as user-app, it would ask for the read-external perm on first start. It’s the existance as system-app with rigid permissions that invalidate the official faq.

1 Like

It works perfectly! I have done it with Android Debugging, and now I have again Favourites on Maps. Thank you so much!

1 Like

Does anyone know if MagicEarth can export its favourites into a format that can be read by other apps? For example, Organic Maps or similar.

Thanks!

@andreasmjg not compatible, it’s just an app custom sqlite db. I checked how I’d do a readout, but couldn’t figure out what format it uses as geo coordinates.

There’s no lat long separation of coordinates. There is a body field that has lat long in the text description (raw sqlite fails to decode that) - but what’s the “coord” field? it says helpfully WGS_PT_INT as field type - I get WGS, but have no idea how it splits integers to decimals.

531594725036142167 - Cristo Rei, Lisbon
671506437246026492 - Eiffelturm / Eiffeltower, Paris
721779132560392983 - Pariser Platz / Brandenburg Gate, Berlin

sqlite3 Favourites.xlm ".schema LMK"
CREATE TABLE LMK(id INTEGER PRIMARY KEY NOT NULL,tile INTEGER NOT NULL,name TEXT,desc TEXT,coord WGS_PT_INT NOT NULL,icon INTEGER,categ INTEGER,upd TIME_INT NOT NULL,body BLOB NOT NULL);

these are the full rows. You get that with

sqlite3 Favourites.xlm "select id,tile,name,desc,coord,icon,categ,upd,hex(body) from LMK;

Internet says:

“To get latitude and longitude from the values in the coordinates column, please perform the following operations: Coordinates data is packed as an integer 64 value for optimized access. The C code snippet for unpacking it is: WGS_ longitude = int( ccordinates ) / 3200000. ; WGS_latitude = int( coordinates >> 32 ) / 3200000”

In case this snippet is not enough … since they answered this question before apparently, asking Magic Earth support again might help.

1 Like

Thank you!

This is the reason I stopped using Magic Earth and why I still am reluctant to go back to it, although it would be very convenient as it’s a good maps app.

Until it has import/export compatibility with other maps apps, it’s just as switching-friendly as Google Maps :confused:

the bitmask on longitude was seen by the forum poster as html entity formatting or else and it got removed. This will work:

void main() {
  long long coord = 721779132560392983; // Brandenburg Gate, Berlin
  // bitwise right shift
  printf("WGS_latitude: %f\n", (float)(coord >> 32) / 3200000);
  // bitmask of first 32 bits
  printf("WGS_longitude: %f\n", (float)(coord & 0xFFFFFFFF) / 3200000);
}

@andreasmjg here a conversion script to gpx / geojson / kml - https://gist.github.com/tcecyk/3a5f4754cf7eff68134317e282404586 - Organicmaps would accept the gpx

1 Like

This topic was automatically closed after 90 days. New replies are no longer allowed.