Remove Read Contacts Permission

akaliptos69

Member
Licensed User
Longtime User
Hello again boys and girls.

As you may already know I have created this app. From version 2.1.1 and after I have implemented the "add contact" facility on my program. I made it using this solution. What I would like to ask is that I am getting some questions on why the app is requesting read/write contacts permissions. I can explain the write permissions section and justify it but what about the read permissions? Bottom line: Is there a way to have write permission but not read? And if so, how?

Thanks people...
 

admac231

Active Member
Licensed User
Longtime User
You could try removing the permission from the libraries XML file (miscUtil.xml).

I don't know if that actually changes anything or if it's just for B4As reference though. Give it a try anyway :)

Edit: Actually I just tried it. Works fine. I didn't try to write any contact info but I assume that'll work no problem.

Remove <permission>android.permission.READ_CONTACTS</permission> from miscUtils.xml
 
Last edited:
Upvote 0

akaliptos69

Member
Licensed User
Longtime User
Will try and post back on that...

Thanks anywayz

EDIT:

Great consulting admac231. It works fine... it does add the contact and gets no read contacts permission... Excellent. The only draw back on this is that it duplicates the contact if button pressed more than once (which is logical because it can no longer read contacts and update if one exists) ... but what can you do.. can't have it all in life... Thanks a lot mate. Problem solved
 
Last edited:
Upvote 0

vb1992

Well-Known Member
Licensed User
Longtime User
The only draw back on this is that it duplicates the contact if button pressed more than once

Why let them hit the button more than once?

button1.enabled = false

after they press the button
then you do your updates

and then send a msgbox("Contact Added","Info")

then release the button
 
Upvote 0

akaliptos69

Member
Licensed User
Longtime User
Why let them hit the button more than once?

button1.enabled = false

after they press the button
then you do your updates

and then send a msgbox("Contact Added","Info")

then release the button

That is a great way for the current section of the Activity runtime, but next time the user will launch the app will still be able to save the contact. Since there is no way to read the contacts (since I removed that permission) the application will not be able to update, or even just check the contacts for a similar contact and procced with the appropriate actions. That is the reason why I state the fact for the multiple presses on the save contact button. Multiple presses on multiple running sessions will cause multiple copies of the contact saved on the device's contacts list. But unfortunately (as far as I can say) there is no way to avoid that, with that permission removed.
 
Upvote 0
Top