Mobile SDK
Android
Runtime Permissions
3 min
your application will need to request some permissions during runtime, otherwise securityexception will be thrown when accessing certain functions in the sdk a permissionsutil object is provided in the sdk to handle this should you wish to use it its usage can be seen throughout the sample application the permissions that need to be requested are below bluetooth permissions this is applicable if you are using the sdk with connectionmode bluetooth val bluetoothpermissions array\<string> = if (build version sdk int >= build version codes s) { arrayof( manifest permission bluetooth connect, manifest permission bluetooth scan, ) } else { // below api 31 (android 12) bluetooth admin is automatically // granted given it is specified in the manifest arrayof() }string\[] bluetoothpermissions; if (build version sdk int >= build version codes s) { bluetoothpermissions = new string\[]{ manifest permission bluetooth connect, manifest permission bluetooth scan }; } else { // below api 31 (android 12) bluetooth admin is automatically // granted given it is specified in the manifest bluetoothpermissions = new string\[]{}; } location permissions these are only required if you want to collect geolocation for transactions ( toroconfig collectgeolocation is set to true ) val locationpermissions = arrayof( manifest permission access fine location, manifest permission access coarse location )string\[] locationpermissions = new string\[]{ manifest permission access fine location, manifest permission access coarse location }; usb permissions if you are using the sdk with connectionmode usb , permission will be requested as soon as the miura device is attached to the android device no additional setup is required in your application for this to work
