Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export, edit, then import - not working #129

Open
henrykuijpers opened this issue Nov 6, 2023 · 9 comments
Open

Export, edit, then import - not working #129

henrykuijpers opened this issue Nov 6, 2023 · 9 comments

Comments

@henrykuijpers
Copy link

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.

@mwarning
Copy link
Member

mwarning commented Nov 7, 2023

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
Copy link
Member

mwarning commented Nov 7, 2023

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?

@henrykuijpers
Copy link
Author

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?

@mwarning
Copy link
Member

mwarning commented Nov 7, 2023

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
Copy link
Member

mwarning commented Nov 7, 2023

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

@henrykuijpers
Copy link
Author

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

@mwarning
Copy link
Member

Anything new so far?

@henrykuijpers
Copy link
Author

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

@mwarning
Copy link
Member

mwarning commented Jan 5, 2024

Hi, any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants