4
Get All Contacts Returns Permission Error
complete
B
Bruno Oliveira
The Get All Contacts from device flow function returns an error saying that permission was denied and cannot be requested again (Android). Permissions are enabled and the app build configuration has the "Read contacts" permission included. Still, no contacts ever get fetched! Always throws error. Please help.
Is any permission other than the READ CONTACTS required for this Get All Contacts Function??? Is anyone succesfuly using this at present?

Log In
Activity
Newest
Oldest
B
Bruno Oliveira
Update: For what it's worth for other people searching this post, the greatest problem with getting a large number of contacts is not in the flow function but in the fact that the device can't render the entire list at once, so pagination becomes necessary. I just managed to get it working with over 10.000 contacts while using pagination. It takes a while to load, but that's understandable.
T
Timo Kapanen
complete
T
Timo Kapanen
Hi Bruno Oliveira, Sumit Tiwari, we have made changes to contacts plugin and Android functionality has been improved. Could you check if the issue still occurs in 3.0.5 version of the preview? Please note: preview app distribution has changed and it is now available under SAP account named as SAP AppGyver Preview. Best Regards, Timo Kapanen
B
Bruno Oliveira
Timo Kapanen: Ok, switched to the SAP AppGyver Previewer for Android. Error message about contacts permissions disappeared but still no contacts showed up at all! At first it requests permission to access contacts and then does nothing every other time. Haven't tried it on the standalone build with version 3.0.5 yet. Any clues as to what's going on?
T
Timo Kapanen
Hi Bruno Oliveira, what is the model of Android phone you are using? Is "Get all contacts" flow returning any error message (outputs at port2)? Could you also provide the appID of your app for us to further study this. AppID can be found from the URL when app is open in Composer. Best Regards, Timo Kapanen
B
Bruno Oliveira
Timo Kapanen: https://platform.appgyver.com/builder/applications/229163/pages/36 - this page uses the get-all-contacts flow function. Tested on Android 8, Samsung S7. No error message shows up.
T
Timo Kapanen
Bruno Oliveira: I managed to look at this on device. iPhone8 returns and shows the phone contacts (iOS 15.0.1), same with Samsung Galaxy A51 (Android 11). We tested also with one Android 8 device and that worked as well. Have you checked with debugger if the flow function is returning any error message when testing with your Android 8 phone? Best Regards, Timo Kapanen
B
Bruno Oliveira
Timo Kapanen: Is there a limitation concerning the number of contacts on the phone? If there are many (say, over 500), what shall be the behavior? Lazy load? I changed the hide spinner for when the get-all-contacts finishes and it never hides, indicating it never finishes...
B
Bruno Oliveira
Timo Kapanen: I set the get-all-contacts ouput to populate a page variable this way:
MAP(outputs["Get all contacts"].contacts, {Name: item.givenName +" "+ item.familyName, Phone: "" + item.phoneNumbers[0].number, Email: ""+ item.emailAddresses[0].email})
Should this cause any trouble?
T
Timo Kapanen
Bruno Oliveira: based on my testing the current formula works as I am seeing contact list in both my Android Galaxy A51 and iPhone8. Android is little slower to show the contacts but eventually those are appearing. Do you have any other phone than the Android8 to test with? Also with Android8 would be good to see what the flow function Get all contact returns. You can use either debugger or then but alert to show the response. We suspect that there is empty response.
T
Timo Kapanen
Hi Bruno Oliveira, looping back to this issue. Does it still occur? Best Regards, Timo Kapanen
B
Bruno Oliveira
Timo Kapanen: Unfortunately yes. If you can't easily reproduce it, I suspect it is likely related to the large number of contacts and no lazy-load behavior. It spins and never finishes now. Or it stays at a blank screen if I change the logic for the spinner. But never actually loads any contact info.
T
Timo Kapanen
Bruno Oliveira: have you managed to check for example with debugger if the flow function is returning any error message? Do you have any other phone but Android 8, Samsung S7 to test with? And yes, it could be related to the amount of phonebook entries but would be good to see if there is any error message.
B
Bruno Oliveira
Timo Kapanen: Also tested in Android 10 on Samsung Galaxy J8. Using the debugger is a bit of a luxury to me, I never got around to it. But I checked for error messages and got none. Seems to be due to the number of phone book entries. In both cases, over 1.000 (which, I presume, is not so extraordinary)
T
Timo Kapanen
Bruno Oliveira: I am going through old tickets and noticed that this one has been left unmanaged for far too long time. Are you still experiencing this issue? Back then we could not reproduce it in our test setup. Any clues how it could be reproduced would greatly help. Best Regards, Timo Kapanen
B
Bruno Oliveira
Timo Kapanen: No, not the permission error anymore, that is solved.
T
Timo Kapanen
Bruno Oliveira: great, thanks for confirming
T
Timo Kapanen
Hi, and sorry for the late response. We have a fix under preparation. Best Regards, Timo Kapanen
Kristian Gerkman
planned
Kristian Gerkman
under review
Kristian Gerkman
Hey Bruno Oliveira, Are you able to get the contacts on the preview app? The only permission that should be required is the
READ CONTACTS
- which android version are you running? Also are you able to test this on some other Android device? Just to see if it's device specific. Thanks! :)B
Bruno Oliveira
Kristian Gerkman: thanks for the reply. Same behavior on android 10 and 8. Also on the preview app.
Kristian Gerkman
Bruno Oliveira: Thanks, Got it to reproduce!
S
Sumit Tiwari
Kristian Gerkman: facing same issue here. is there any workaround to utilize this feature.