tmo1 / sms-ie

SMS Import / Export is a simple Android app that imports and exports SMS and MMS messages, call logs, and contacts from and to JSON / NDJSON files.
GNU General Public License v3.0
360 stars 39 forks source link

Importing contacts requires permission to write Contacts #69

Closed a-l-n closed 1 year ago

a-l-n commented 1 year ago

Hello,

I have used SMS Import / Export to EXPORT CONTACTS and that works fine. However, when I try to IMPORT CONTACTS, I get the message "Importing contacts requires permission to write Contacts" (I don't even get a prompt for the location of the import file). I get the same behaviour on Android 12 and LineageOS 19. I have tried uninstalling the App > Installing a lower version = no luck, same message. I have denied the App access to Contacts > Opened the app > Granted the app permissions to Contacts = no luck, same message.

Same behaviour on App Version: 1.5.1 and 1.5

Am I missing something? Can you please help?

Thank you

tmo1 commented 1 year ago

I recently ran into the same problem in testing - I'm not quite sure why this hasn't arisen before. In any event, I think I fixed it in this commit, so I'm closing this issue, but if you still experience the problem with the latest code, do reopen it.

a-l-n commented 1 year ago

Hi,

Thank you for your reply.

Since the latest release I could find is 1.5.1 (https://github.com/tmo1/sms-ie/releases), and your commit is after the release of 1.5.1, I tried building with "gradlew assembleDebug" (as per the Installation Readme). I've cloned this repo, installed gradle, ran ./gradlew assembleDebug from the root of the cloned repo and I started getting build errors - first being about missing the ANDROID_HOME environment variable in local.properties, which I defined (and created the directory), then the build failed because I need to accept SDK licence agreements and install the Android Studio SDK Manager.

At this stage, I was wondering if it's possible to get the apk file including your changes from somewhere (so I can just install and test the functionality)?

I'm afraid trying to build the file myself, might lead me down a rabbit hole, spending a lot of time just configuring the build environment.

So, if it's possible, could I please grab the apk build containing your changes from somewhere? or I can wait for the new release if a new release is planned for the near future.

Thanks again!

tmo1 commented 1 year ago

I'll probably release a new version within a few days. If you want an APK of the latest code before that, I can build one and post it here.

a-l-n commented 1 year ago

Thank you,

If you could build and post it here, that would be great!

tmo1 commented 1 year ago

Here's an APK of the latest code - please confirm that it fixes the problem.

a-l-n commented 1 year ago

Awesome, thanks!

Give me a good few hours please as I can't give it a try right now. Once I'm done testing it, I'll report back here.

a-l-n commented 1 year ago

Hi,

Sorry for the delay. I have tested and importing contacts works for me now, thank you very much! I tested by removing all my contacts and doing an import from a file via the app. That worked just fine. I don't know what would have happened if I would not have removed all my contacts first, I might give that a try at some point, but for now it does what I wanted, so all good.

Thanks again.

tmo1 commented 1 year ago

Thank you! I'll plan to release a version with this fix soon, then.

a-l-n commented 1 year ago

Excellent, I'll keep an eye for it (in F-Droid). Thanks again!