The current work is Bluetooth-related, so recently whim want to toss under the Android development, easy to debug their own firmware,
After the installation of Android studio and SDK, thanks to Nordic's public code, studied for a while, feeling not much effort
The relevant code has two, the first to find is Android-nrf-toolbox, this code is more comprehensive, and ultimately need to be here for the DFU debugging,
But... For me this does not understand the person, still a little laborious, reluctantly read, do not dare to take to modify ...
So I found this android-nrf-uart, which is obviously much simpler ... Because. class has only three Java code.
OK, so clone down and then get up. Direct success, sprinkle flowers ~ ...
But, in order to modify and debug the convenient, UART service default is the Nordic official UUID
publicstaticfinal UUID rx_service_uuid = uuid.fromstring (" 6e400001-b5a3-f393-e0a9-e50e24dcca9e "); Public Static Final UUID Rx_char_uuid = uuid.fromstring ("6e400002-b5a3-f393-e0a9-e50e24dcca9e"); Public Static Final UUID Tx_char_uuid = uuid.fromstring ("6e400003-b5a3-f393-e0a9-e50e24dcca9e");
What I need, however, is not this ID,,,
So start to die, start with ApplicationID, change the file name, change the pack name.
At the end of the compilation It was strange that Com.nordicsemi.Uart's build and R files had never been able to replace the new IDs I needed, and found a lap to find
The original is still XML pot. There are residual configuration information in the Manifests/androidmanifesh.xml.
However, seemingly lightweight app development, in addition to resource (PNG layout string.xml) need to pay attention to, is the class and MANIFESHS
Clean up the package that is registered in this XML and the corresponding activity and service.
Now everything is normal, originally this goods is makefile duty. When this is done, the mystery of Android development disappears,
Visual inspection will soon be able to transform productivity, in fact, the overall difficulty is no more than the C # development of WIN's small tools laborious
Getting Started with Android studio