Android SDK
Start the SDK
forterMobileUID
8 min
why does forter need a unique identifier? in the sdk forter's sdk requires a unique mobile device identifier to connect the activity and behavioral data collected by the sdk to the specific device and user this identifier should be specific to android device in the order api if/when a customer makes a purchase from the mobile app, the unique identifier must be included as the fortermobileuid value in the connectioninformation object of the forter orders api https //docs forter com/reference/order v3 since the orders api call is made entirely from your system's backend, this id should be retrievable from the https request headers and in the same casing as the value generated in the forter sdk { "orderid" "example order fdse0gb449", "ordertype" "android", "timesenttoforter" 1415287568000, "checkouttime" 1415273168, "connectioninformation" { "customerip" "174 255 8 151", "useragent" "teststore 4 92 203 rv 203 (android; linux 24 7 0; en us; lgl158vl)", "fortermobileuid" "2f37b5d22ca986caaaaa4d3b7e02fc152c93186bd4 c2vzc2lvbnrva2vuagvyzq== cf4 es4", "mobileappversion" "4 70 103" }, "totalamount" { "amountusd" "99 95" } } generate and pass the unique identifier (mobileuid) please use the following forter sdk method to retrieve the android device id forterintegrationutils getdeviceuid(this) for sdk version 3 0 0 and above the value returned from the forter token listener callback https //portal forter com/docs/android/android content/starting the sdk/android application class#fortersdk 300 and above should be used as the fortermobileuid in the connectioninformation https //portal forter com/api/data objects/connectioninformation object of the server side order api for sdk versions prior to 3 0 0 the value returned by forterintegrationutils getdeviceuid should be used as the fortermobileuid in the connectioninformation https //portal forter com/api/data objects/connectioninformation object of the server side order api casing please make sure that the deviceid (mobileuid) that is passed to the sdk does not mutate in casing when it is passed to the order api while forter's system has no casing preference, the mobileuid generated via the sdk must match the casing of the mobileuid that is passed to the order api at the time of transaction in order for forter's system to correctly connect the sdk data to the backend, order api's data passing account identifiers at login please provide the user's existing account id upon login to the android app using fortersdk getinstance() setaccountuid(forteraccountidtype merchant account id, accountuid); upon logout please call the same setaccountuid method with an empty string for the account id account identifiers should be passed to the merchantdeviceid field in the order api and not the fortermobileuid field do not provide https //en wikipedia org/wiki/personally identifiable information as an identifier if you use the user's email address as an id, encode/hash it before sending