API
Deeplink
Android
to work with eyrene deeplink on android 1\ install and configure the sdk to call the eyrene app, create an intent and call deeplinkactivity with startactivityforresult intent launchintent = new intent(); launchintent setaction(deeplinkconst ic camera launch action); 2\ sync master data to work with the app offline, sync master data note we recommend syncing data once at the beginning of the day, with stable internet request parameters deeplinkconst ic camera launch action string the intent of launch eyrene on the device deeplinkconst parameters token string required required calling application id deeplinkconst parameters ic command string control command deeplinkconst parameters list customer id string\[] an array of strings with customer id store codes to sync data on these stores deeplinkconst parameters string customer id string an alternative options list with customer id store codes to sync data for these stores in this format, a string with customer id codes is passed, which is separated by a comma (",") without spaces if both methods are specified, then the values from string customer id will be used request example https //help inspector cloud com/docs/api/mobile/sdk android/sync master data#%d0%bf%d1%80%d0%b8%d0%bc%d0%b5%d1%80 %d0%b7%d0%b0%d0%bf%d1%80%d0%be%d1%81%d0%b0 intent launchintent = new intent(deeplinkconst ic camera launch action); launchintent putextra(deeplinkconst parameters token, getdemotoken()); launchintent putextra(deeplinkconst parameters ic command, deeplinkconst commands ic sync); string\[] listcustomerid = { "id1", "id2", "id3", "id4", "id5" }; // store list example launchintent putextra(deeplinkconst parameters list customer id, listcustomerid); startactivityforresult(launchintent, icdeeplink default request code); response example https //help inspector cloud com/docs/api/mobile/sdk android/sync master data#%d0%bf%d1%80%d0%b8%d0%bc%d0%b5%d1%80 %d0%be%d1%82%d0%b2%d0%b5%d1%82%d0%b0 @override protected void onactivityresult(int requestcode, int resultcode, @nullable intent data) { super onactivityresult(requestcode, resultcode, data); if (data == null) { return; } log d(tag, "result code " + data getintextra(deeplinkconst parameters result code, 0)); log d(tag, "result info " + data getstringextra(deeplinkconst parameters result info)); log d(tag, "list customer id " + data getstringextra(deeplinkconst parameters list customer id)); } response parameters https //help inspector cloud com/docs/api/mobile/sdk android/sync master data#%d0%bf%d0%b0%d1%80%d0%b0%d0%bc%d0%b5%d1%82%d1%80%d1%8b %d0%be%d1%82%d0%b2%d0%b5%d1%82%d0%b0 deeplinkconst parameters result code integer result code visit valid (int 1) successful visit (new or open) completed with the button to close the visit visit err (int 2) visit error detailed information in result info sync ok (int 3) synchronization completed successfully sync err (int 4) synchronization failed detailed information in result info deeplinkconst parameters result info string error description or additional information deeplinkconst parameters list customer id array an array of strings with customer id codes of stores for which sync is performed after the sync is completed, the control will automatically return to the calling app 3\ start visit you can start or open a visit for viewing without prior synchronization in this case, you will need an internet connection at the point of sale information about the store will be loaded at the beginning of the visit request parameters https //help inspector cloud com/docs/api/mobile/sdk android/visits#%d0%bf%d0%b0%d1%80%d0%b0%d0%bc%d0%b5%d1%82%d1%80%d1%8b %d0%b7%d0%b0%d0%bf%d1%80%d0%be%d1%81%d0%b0 deeplinkconst ic camera launch action string the intent of launch eyrene on the device deeplinkconst parameters ic command string control command deeplinkconst parameters debug boolean enable debug mode displays a log with the output of the main errors and calling parameters optional deeplinkconst parameters token string required required calling application id deeplinkconst parameters visit id string required required visit id if id found — a visit will be opened; not found — a new visit will be created; empty or "0" an error will be returned deeplinkconst parameters agent id string required required agent id in uuid format if the agent id is not found, a new agent will be created deeplinkconst parameters customer id string required required store id the store is searched for by customer id (store > customer id) if the store not found an error will be returned, the visit cannot be started; found — all store tasks will be added to the visit deeplinkconst parameters task filter string task filter a regular expression (description) for filtering tasks by name if specified, the visit will display tasks that match the specified filter optional request example https //help inspector cloud com/docs/api/mobile/sdk android/visits#%d0%bf%d1%80%d0%b8%d0%bc%d0%b5%d1%80 %d0%b7%d0%b0%d0%bf%d1%80%d0%be%d1%81%d0%b0 intent launchintent = new intent(deeplinkconst ic camera launch action); launchintent putextra(deeplinkconst parameters debug, true); launchintent putextra(deeplinkconst parameters token, getdemotoken()); launchintent putextra(deeplinkconst parameters visit id, getdemovisit()); launchintent putextra(deeplinkconst parameters agent id, getdemoagent()); launchintent putextra(deeplinkconst parameters customer id, getdemocustomerid()); launchintent putextra(deeplinkconst parameters task filter, "regex"); startactivityforresult(launchintent, icdeeplink default request code); response example https //help inspector cloud com/docs/api/mobile/sdk android/visits#%d0%bf%d1%80%d0%b8%d0%bc%d0%b5%d1%80 %d0%be%d1%82%d0%b2%d0%b5%d1%82%d0%b0 the results of the call are returned to the onactivityresult function @override protected void onactivityresult(int requestcode, int resultcode, @nullable intent data) { super onactivityresult(requestcode, resultcode, data); if (data == null) { return; } log d(tag, "result code " + data getintextra(deeplinkconst parameters result code, 0)); log d(tag, "result info " + data getstringextra(deeplinkconst parameters result info)); log d(tag, "visit " + data getstringextra(deeplinkconst parameters visit id)); log d(tag, "agent " + data getstringextra(deeplinkconst parameters agent id)); log d(tag, "customer " + data getstringextra(deeplinkconst parameters customer id)); log d(tag, "images " + data getintextra(deeplinkconst parameters total images, 0)); } response parameters https //help inspector cloud com/docs/api/mobile/sdk android/visits#%d0%bf%d0%b0%d1%80%d0%b0%d0%bc%d0%b5%d1%82%d1%80%d1%8b %d0%be%d1%82%d0%b2%d0%b5%d1%82%d0%b0 deeplinkconst parameters result code integer result code visit valid (int 1) successful visit (new or open) completed with the button to close the visit visit err (int 2) visit error detailed information in result info sync ok (int 3) synchronization completed successfully sync err (int 4) synchronization failed detailed information in result info deeplinkconst parameters result info string error description or additional information deeplinkconst parameters visit id string visit id value as in input parameter deeplinkconst parameters agent id string agent id value as in input parameter deeplinkconst parameters customer id string store id value as in input parameter deeplinkconst parameters total images integer the number of images in the visit optional optional open the last visit the openlastvisit command finds the id of the last visit started in the store and opens it request parameters https //help inspector cloud com/docs/api/mobile/sdk android/open last visit#%d0%bf%d0%b0%d1%80%d0%b0%d0%bc%d0%b5%d1%82%d1%80%d1%8b %d0%b7%d0%b0%d0%bf%d1%80%d0%be%d1%81%d0%b0 deeplinkconst ic camera launch action string the intent of launch eyrene on the device deeplinkconst parameters ic command string control command deeplinkconst parameters debug boolean enable debug mode displays a log with the output of the main errors and calling parameters optional deeplinkconst parameters token string required required calling application id deeplinkconst parameters agent id string required required agent id in uuid format if the agent id is not found, a new agent will be created deeplinkconst parameters customer id string required required store id the store is searched for by customer id (store > customer id) if the store not found an error will be returned, the visit cannot be started; found — all store tasks will be added to the visit request example https //help inspector cloud com/docs/api/mobile/sdk android/open last visit#%d0%bf%d1%80%d0%b8%d0%bc%d0%b5%d1%80 %d0%b7%d0%b0%d0%bf%d1%80%d0%be%d1%81%d0%b0 intent launchintent = new intent(deeplinkconst ic camera launch action); launchintent putextra(deeplinkconst parameters ic command, deeplinkconst commands ic open last visit); launchintent putextra(deeplinkconst parameters debug, true); launchintent putextra(deeplinkconst parameters token, getdemotoken()); launchintent putextra(deeplinkconst parameters agent id, getdemoagent()); launchintent putextra(deeplinkconst parameters customer id, getdemostorecustomerid()); startactivityforresult(launchintent, icdeeplink default request code); response example https //help inspector cloud com/docs/api/mobile/sdk android/open last visit#%d0%bf%d1%80%d0%b8%d0%bc%d0%b5%d1%80 %d0%be%d1%82%d0%b2%d0%b5%d1%82%d0%b0 the results of the call are returned to the onactivityresult function @override protected void onactivityresult(int requestcode, int resultcode, @nullable intent data) { super onactivityresult(requestcode, resultcode, data); if (data == null) { return; } log d(tag, "result code " + data getintextra(deeplinkconst parameters result code, 0)); log d(tag, "result info " + data getstringextra(deeplinkconst parameters result info)); log d(tag, "visit " + data getstringextra(deeplinkconst parameters visit id)); log d(tag, "agent " + data getstringextra(deeplinkconst parameters agent id)); log d(tag, "customer " + data getstringextra(deeplinkconst parameters customer id)); log d(tag, "images " + data getintextra(deeplinkconst parameters total images, 0)); } response parameters https //help inspector cloud com/docs/api/mobile/sdk android/open last visit#%d0%bf%d0%b0%d1%80%d0%b0%d0%bc%d0%b5%d1%82%d1%80%d1%8b %d0%be%d1%82%d0%b2%d0%b5%d1%82%d0%b0 deeplinkconst parameters result code integer result code visit valid (int 1) successful visit (new or open) completed with the button to close the visit visit err (int 2) visit error detailed information in result info sync ok (int 3) synchronization completed successfully sync err (int 4) synchronization failed detailed information in result info deeplinkconst parameters result info string error description or additional information deeplinkconst parameters visit id string visit id value as in input parameter deeplinkconst parameters agent id string agent id value as in input parameter deeplinkconst parameters customer id string store id value as in input parameter deeplinkconst parameters total images integer the number of images in the visit constants used in the android deeplink the entire list of constants that are used in the android eyrene deeplink api is described here parameter list https //help inspector cloud com/docs/api/mobile/sdk android/const#%d1%81%d0%bf%d0%b8%d1%81%d0%be%d0%ba %d0%bf%d0%b0%d1%80%d0%b0%d0%bc%d0%b5%d1%82%d1%80%d0%be%d0%b2 public class deeplinkconst { public static final string ic camera launch action = "inspector cloud camera deeplinkactivity"; public static final string ic camera 3 package = "com iccamera3 app"; public static final string ic camera 3 activity = "com iccamera3 app mainactivity"; public static final class parameters { public static final string token = "token"; public static final string agent id = "agent id"; public static final string visit id = "visit id"; public static final string customer id = "customer id"; public static final string list customer id = "list customer id"; public static final string string customer id = "string customer id"; public static final string task filter = "task filter"; public static final string readonly = "readonly"; public static final string total images = "total images"; public static final string debug = "debug"; public static final string version api = "version api"; public static final string version app = "version app"; public static final string is new visit = "is new visit"; public static final string result code = "res code"; public static final string result info = "res info"; public static final string ic command = "ic command"; } public static final class resultcode { public static final int visit valid = 1; public static final int visit err = 2; public static final int sync ok = 3; public static final int sync err = 4; } public static final class commands { public static final string ic sync = "sync"; public static final string ic open last visit = "open last visit"; } } description https //help inspector cloud com/docs/api/mobile/sdk android/const#%d0%be%d0%bf%d0%b8%d1%81%d0%b0%d0%bd%d0%b8%d0%b5 %d0%bf%d0%b0%d1%80%d0%b0%d0%bc%d0%b5%d1%82%d1%80%d0%be%d0%b2 deeplinkconst https //help inspector cloud com/docs/api/mobile/sdk android/const#deeplinkconst deeplinkconst ic camera launch action string the intent for launching eyrene on the device deeplinkconst ic camera 3 package , deeplinkconst ic camera 3 activity string components to run the eyrene application parameters https //help inspector cloud com/docs/api/mobile/sdk android/const#parameters deeplinkconst parameters token string the token of the calling application deeplinkconst parameters agent id string agent id in uuid format deeplinkconst parameters visit id string visit id deeplinkconst parameters customer id string store id the store is searched for by customer id (store > customer id) deeplinkconst parameters list customer id string\[] an array of strings with customer id codes of stores for which sync is performed deeplinkconst parameters string customer id array an alternative list option with customer id store codes to synchronize data for these stores in this format, a string with customer id codes is passed, which is separated by a comma (",") without spaces if both methods are specified in the command, then the values from string customer id will be used deeplinkconst parameters task filter string task filter a regular expression (description) for filtering tasks by name if specified, the visit will display tasks that match the specified filter deeplinkconst parameters readonly boolean задает режим открытия визита только для чтения в этом режиме задачи доступны только для просмотра deeplinkconst parameters total images integer the number of images in the visit deeplinkconst parameters debug boolean enable debug mode displays a log with the output of the main errors and calling parameters deeplinkconst parameters version api integer the version of the built in api in the app deeplinkconst parameters version app integer application version code deeplinkconst parameters is new visit boolean a flag indicating a newly created visit resultcode https //help inspector cloud com/docs/api/mobile/sdk android/const#resultcode deeplinkconst parameters result code integer result code visit valid (int 1) successful visit (new or open) completed with the button to close the visit visit err (int 2) visit error detailed information in result info sync ok (int 3) synchronization completed successfully sync err (int 4) synchronization failed detailed information in result info deeplinkconst parameters result info string error description or additional information commands https //help inspector cloud com/docs/api/mobile/sdk android/const#commands deeplinkconst parameters ic command string control command supported commands ic sync perform sync https //docs eyrene com/android#oq 2 sync master data ; ic open last visit open the last visit https //docs eyrene com/android#xn optional open last visit to the specified store possible errors if while eyrene is running if theapplication was closed by the system or by the user using the "running tasks / delete eyrene" button, visit err will be returned as a result a failure occurred depending on the type of failure, either visit err or intent data returns null