I am writing an Android BLE application and I am trying to get permissions of a specific attribute. I have already managed to get the characteristic properties with the characteristic .getProperties (), and it returns a nonzero value, however, when I use the getPermission () method, it returns 0, although I am sure that this symptom has PERMISSION_WRITE_ENCRYPTED_MITM (0x00000040).
Here is a snippet of code
// properties int properties = ch.getProperties(); DebugWrapper.infoMsg("properties: " + properties, TAG); //returns non-zero value // permissions int permissions = ch.getPermissions(); DebugWrapper.infoMsg("permissions: " + permissions, TAG); //returns zero value
Am I doing something wrong? Is there a specific way to get permissions for a feature or is it a problem with android api?
I am using API 19 and testing my program on Samsung Galaxy Note 3.
I appreciate any help.
source share