David7661654
Posts: 0
Joined: Sun Jul 26, 2015 9:18 am

using contacts service to perform an action on a number

Hello,

I followed this tutorial to use a filter to display the contacts names and phones:
https://devcenter.appery.io/tutorials...

I'm trying to press the button next to each result in order to push the phone number into a sessionStorage variable, but although I mapped it, it is not entered.

When I do exactly the same thing with an input text, it works exactly as it should.

The contact phone is located in
Mainmobilecontainercontacts_listcall_contactcontact_gridmobilegridcell_15contact_phone

Has anyone managed to use the result to make a call or perform some action?

This is my mapping and I don't see why it doesn't work:
Image

Thank in advance for your assistance,

David

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

using contacts service to perform an action on a number

Hello David,

Could you please clarify do you call this service on button click event?
Also you may debug your app with http://devcenter.appery.io/documentat... to check what is actually stored in your local storage with the following js code:
precode var myLSV = Apperyio.storage.destination.get();
alert("local storage = '" + myLSV + "'");code/code/code/pre

David7661654
Posts: 0
Joined: Sun Jul 26, 2015 9:18 am

using contacts service to perform an action on a number

Hi Evgene,

Yes.

I click on the button next to the specific name/number that I want to call:
Image

Do I inject the debug JS during the mapping, the button click, the page load...?

Regards,

David

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

using contacts service to perform an action on a number

Hi David -

You can make a separate click event on this list and check whether you are getting the correct value from your local storage variable.

David7661654
Posts: 0
Joined: Sun Jul 26, 2015 9:18 am

using contacts service to perform an action on a number

Hi Ilya,

Thank you for responding to my post. I'm afraid I don't understand what you mean.

As you can see herein, these are the events I set on the top yellow call button (the mapping I sent previously is the 1st event):
Image

The 2nd event checks the value in the session storage variable and that's where I see that there's a problem.

As I specified, in the 2nd call button (the one next to the manual input), I do exactly the same thing (map the input value to sessionStorage.destination) and there, it works

David7661654
Posts: 0
Joined: Sun Jul 26, 2015 9:18 am

using contacts service to perform an action on a number

In the weinre console I see this message:
ContactsService can't process request because navigator.contacts is undefined.

The problem with testing the app on the browser is that there's no contacts list that we can use during the testing (is there??) and building an apk and using it on the phone doesn't give us the debugging capabilities required

David7661654
Posts: 0
Joined: Sun Jul 26, 2015 9:18 am

using contacts service to perform an action on a number

OK. I sorted it out.

It seems that the mapping to storage doesn't actually populate the data into the variable and the "Set storage variable" action is required:
Image

Return to “Issues”