Hi All, I encountered an issue while enrolling my Android device to the IoT Server using the cdmf-android-agent. The issue was, after the enrollment info was provided (server endpoint, username, password etc) the app would crash and the device would fail to enrol. While debugging, I came across a method to get the device CPUinfo using the top command.
When an Android device is being enrolled, the device sends a payload with device CPU info to the IoT Server. This data is not displayed or processed, rather simply stored. Since a separate API does not exist to retrieve this data, it is read from a format provided by the Android OS. However, this format sometimes changes by Android version and even manufacturer. While in certain Android variants, this change does not cause the app to crash, the data retrieved is often either incorrect or a null value. To further elaborate the how drastic the changes can be to the format from Android version to succeeding version I've provided screenshots below. Note the lines in each format that provide the percentages for values such as* user, iow* and *irq*: *the format for Android 25,* *the format for Android 26,* Taking into account the changes to this format based on Android version and manufacturer version, I applied some changes and did a pull request which can be found at this link <https://github.com/wso2/cdmf-agent-android/pull/168>. Thanks and regards -- *Nuwan Jayawardene* *Software Engineering intern* *WSO2, Inc.:http://wso2.com <http://wso2.com/>* *lean.enterprise.middleware* *Mobile :- +94 71 1813299* - *Linkedin* *:- **https://www.linkedin.com/in/nuwa <https://www.linkedin.com/in/nuwanjaya/>**njaya/ <https://www.linkedin.com/in/nuwanjaya/>* - * <https://www.wso2.com/signature>*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev