Search code examples
ibm-mobilefirstworklight-studio

IBM Worklight : How to Fetch call logs and contacts?


Am new to IBM Worklight,Is there a way to fetch the call Log and contact,like in android using TelephonyManager to track call duration,call details.Can any one know,please guide me to do fetch these details.


Solution

  • Worklight itself does not have access to this information. However, Worklight uses Cordova, and using Cordova you could gain this access.

    To accomplish the above, you will need to create a Cordova plug-in, from which you will be able to hook into the TelephonyManager and retrieve any information that it can provide you, including call duration and details.

    Creating a Cordova plug-in cannot be explained shortly, so I will link you to the training module explaining exactly this: Adding native functionality to hybrid applications with Apache Cordova.

    Also, in the following question I have code written that enables hooking to the TelephonyMananger to get a different type of information, so you should be able to modify it to get what you need: IBM Worklight - Unable to get network signal strength in Android