Contacts plugin

Contacts

 

View and activate on the Corona Store

This plugins allows you to get all contacts on iOS and Android.

Documentation

Hi Scott.

Are you sure “contacts.requestAccess(RequestAccessListener)” function are working on Android? It seems not calling the functions.

I’ve already checked everything, permissions, functions, listeners. It works very fine on iOS, but not on Android.

Regards

It looks like neither of these two functions are working on Android: 

  • contacts.get(GetContactsListener)

+ contacts.requestAccess(RequestAccessListener)

local Response = contacts.canAccess() if (Response == "access granted" or Response == "access granted already") then contacts.get(GetContactsListener) else contacts.requestAccess(RequestAccessListener) end

Obs:. I’m testing sending the APK to device with AndroidDebugKey

Is it possible to get contacts or phone numbers from call log?

I would check out the sample https://github.com/scottrules44/contacts-demo, by the way contacts.requestAccess only is supposed on android 6.0+

Also can you sent me some logs? What android version are you running?

https://www.dropbox.com/s/a8vb1i9km8nkn06/File%20Nov%2030%2C%204%2018%2003%20PM.mov?dl=0

no, all or nothing

The device I’m testing is: Moto X (First Generation) (5.1 Version)

Still not working. Neither with your example.

The Log keeps looping for a very long time and after some seconds it crashes the app. Look some screens:

2ac6073c_45f3_46bd_bdfa_e520a632bc11.jpg

Captura_de_Tela_2016_12_02_a%CC%80s_12_1 Captura_de_Tela_2016_12_02_a%CC%80s_12_1 Captura_de_Tela_2016_12_02_a%CC%80s_12_1

Thanks for reporting will look into this

Thank you Scott. I’m really needing this.  :slight_smile:

I believe the problem is your device is a little on the weaker( no offense) so it is unable to handle all the contact data. Also the problem is the contacts api get all gmail contacts, every person you sent an email to is considered a contact. I am going to try to weed out the contacts with emails for names by say if it has an @ as a title name it is going in the trash. Hope this does not affect to people, I know very few people who have @ in there contact name.

Scott. Thank you for your quick response, but I ensure you its not because of the Moto X device. I’ve tested in another ones and occurs the same issue.

I cant deploy an app with the possibilitie of not working in most of them. 

Im very anxious to use this plugin on Android without any problems.  

I hope your next updates make it work nicely.

I really need this quickly. My neck is in price in the company I work haha. I’ve promissed to update the app with this this next week  :blink:

what version of corona are you running?

just tested this it looks like my contacts plugin does not like newest version corona sdk

please test with https://developer.coronalabs.com/release/2016/2987/

Also please post your build.setting and corona sdk version number.

Sorry to ask lots of questions do your any of contacts use any weird symbols? Can you use the corona terminal for logs? For all I know those logs could come from another app.

Not working for me. Switched back to version 2987 which stopped the RunTime. Then had to manually activate the contact persion in the settings. Now when I tap I get nothing. So disappointed

what are your logs saying? did you use the updated sample? what version of android are you running? I cannot reproduce the error or figure out what the error is I cannot fix it. I cannot guess these errors. 

For everyone who has had problems with android the version a new version should be avaible within about an hour an 30 minutes if everything goes smoothly, sorry for people having problems. I have fixed the following issues

  • requestAccess fixed see image bellow
  • faster loading due to removing unwanted contacts don’t have real names and just emails for names

If you have an issue please include the following

*sample =https://github.com/scottrules44/contacts-demo

  • device logs that generated from *sample code or project used see https://docs.coronalabs.com/guide/basics/debugging/index.html#device-debugging-android
  • screen shot or video of error
  • version of android, device name, corona version
  • if you make a tiny change to the *sample or use your own project, please post the full project not just the main.lua i mean zip it up post via dropbox, corona forums file uploader, google drive, etc.
  • describe what you did, example “I touch the request access button and then i tried to get contacts”

Sorry for having to post this but saying there is an error is not very helpful. 

Screen%20Shot%202016-12-03%20at%2012.19.

Just tested android 7.0, 4.4, 5.1, and 6.0 everything seems to be working fine.