meshenger-android icon indicating copy to clipboard operation
meshenger-android copied to clipboard

Export, edit, then import - not working

Open henrykuijpers opened this issue 2 years ago • 10 comments

For some reason, when exporting (to Json format), then editing the file (actually, creating a new one with edited content), makes it not possible to import the file again. The file is greyed out when trying to select it.

The original exported file isn't greyed out and works just fine.

I'm trying to add contacts to the file, so that they can all be imported. I have a wall panel which I'm trying to run with this app, so that I can call another wall panel in another room. Unfortunately, the wall panels don't have a camera, so it's not possible to add contacts through qr code.

Another thing that would be nice, is to be able to add contacts through typing.

henrykuijpers avatar Nov 06 '23 21:11 henrykuijpers

I would expect that it would work to export, copy, edit and then to import a backup. I tried it and it worked on Anroid 12. Maybe there is some Android security mechanism at work that i am not aware of.

mwarning avatar Nov 07 '23 00:11 mwarning

And to add contacts via typing or copy&paste is supported. There is a share button next to the QR-code. And next to the QR-scan window there should be a button for the input field. But maybe the QR-scan window does not open if there is no camera?

mwarning avatar Nov 07 '23 00:11 mwarning

Sorry, I should have been a bit more clear: These android panels run on android 8.1, so they are of course not very current.

They indeed (afaik) don't have a camera, which probably causes the app to only show the "share qr code" screen, but not the screen that allows you to scan a QR code, because, well, you need a camera for it.

On my phone (android 13), I see 3 buttons in the menu. In the wallpanel (android 8.1) I see only the button for showing a QR.

Maybe the issue is in that area?

So that's why I tried the export, edit, import. However, it shows as greyed out. I checked the code and the only filter that is really there is that the mimetype should be application/json in ieder to select. I'm not sure if the edited file actually comes up with application/json as mimetype. It should, I would say. The exported file gets that mimetype, so why would the edited file be different.

Maybe it would be a good idea to add a separate button that only has an input field, without the camera function? For devices that do not have a camera?

henrykuijpers avatar Nov 07 '23 05:11 henrykuijpers

hm, weird. The QR scan icon should always be shown. There is no logic to hide the icon if there is no camera. I also tried with a virtual phone (Android 8.1 and no cameras), QRScanActivity starts but the image is black, the contact input icon is there.

mwarning avatar Nov 07 '23 11:11 mwarning

So that's why I tried the export, edit, import. However, it shows as greyed out.

I suspect that android tracks some kind of ownership. I have the problem that i cannot edit the json file file created by meshenger using a file editor on android 8.1

mwarning avatar Nov 07 '23 11:11 mwarning

Interesting! I'll have a chance to experiment a bit more this week, hopefully I'll have a few updates to this topic then :)

henrykuijpers avatar Nov 07 '23 12:11 henrykuijpers

Anything new so far?

mwarning avatar Nov 24 '23 18:11 mwarning

Sorry, I haven't got round to testing further! Life getting in the way. :P hopefully soon!

henrykuijpers avatar Nov 24 '23 18:11 henrykuijpers

Hi, any updates?

mwarning avatar Jan 05 '24 22:01 mwarning

This seems to be the reason for the problem: https://medium.com/mindful-engineering/scoped-storage-in-android-d52460630d6a

mwarning avatar Jul 23 '24 16:07 mwarning