kontalk / androidclient

Kontalk official Android client
https://www.kontalk.org
GNU General Public License v3.0
572 stars 194 forks source link

Automatically import key #483

Open daniele-athome opened 9 years ago

daniele-athome commented 9 years ago

During registration, check for a kontalk-keys.zip file in external storage and, if phone number matched the key uid, ask the user to use that key instead of creating a new one.

Also, if an account has been found, direct user to a help page for key export/import or something.

breversa commented 8 years ago

Also, telling the user where the kontalk-keys.zip file is looked for (or better : allow the user to pick it using a file chooser) would be very useful, especially to set Kontalk up on a SIM-less device.

For instance, after setting it up on my phone, I exported my keys (again, being able to choose where it's exported would be cool), then copied the file to my tablet, but had no idea where. I first try the mount point of my SD card, to no avail. I then looked for a kontalk folder somewhere (which I thought would have been the correct place), without any more success. Thirdly, I sort of randomly put it at the root of the internal storage, and it worked.

Knowing where to put it would have cut the whole procedure by at least 50% the time. :-)

daniele-athome commented 8 years ago

Thanks @breversa, those are all good points of course, the best option would be to put up a file system browser, maybe for both even saving and restoring.

breversa commented 8 years ago

Yes, a file browser for both would be the most practical (and ergonomically consistent) solution IMO.

abika commented 8 years ago

right now the "import" option shows a dialog but only with the places "recent" and "downloads". This makes it impossible to select the key archive simply from the file system.

daniele-athome commented 8 years ago

Up to 4.4 I also have "Internal storage". I still need to try it with 5.0 and 6.0 though. Which one do you have?

abika commented 8 years ago

4.4.2 (API 19)

daniele-athome commented 8 years ago

It turned out that it was my device having this special support for "Internal storage" in SAF. Anyway, I switched to a raw file system chooser dialog for importing in 1572a61b75b93aba7a4fbcf785ac21630ccd903c and sticked to SAF for exporting (or file chooser dialog again for API < 19). I didn't test all of those on Android 5 or 6, I will before releasing.