The Get User Details API helps a developer to get user ID and email ID from the policy sent from the EMM server.
For Android, this API returns a JSON string. For iOS, this API returns a dictionary.
Important: This API is available from the release 3.0.3 onwards.
This method returns a dictionary that contains the following:
JavaScript: com.kony.iemm.app.getUserDetails();
None
{
“username”:”admin”,
“userid” : “admin”,
“emaild” : “admin@kony.com”
}
var userDetailsJsonString = com.kony.iemm.app.getUserDetails();
The output will be a JSON string
For example,
{
“username”:”admin”,
“userid” : “admin”,
“emaild” : “admin@kony.com”
}
To read the particular key, JSON string is converted in to a JSON table using JSON.parse API.
var userDetailsJsonTable=JSON.parse(userDetailsJsonString);
Individual keys can be accessed using the following.
Copyright © 2017 Kony, Inc. All rights reserved. |