Developing Android ADK in practice - what are the best practices?

I am trying to get a clear idea of ​​what is almost related to the development of Android / ADK. There are some scattered Android / ADK related questions on SO with usually very few relevant answers.

I have some questions related to the development and the idea that the answer would be great if someone can confirm my messages or provide additional information.

  • Is it possible to develop Android / ADK in AVD?

    Answer: No, because your PC cannot work as a slave USB. ADK will be a USB host in additional mode, therefore (without extreme hacking levels) ADK cannot be connected to a development PC that works with AVD

  • Will the DDMS / debugger work on a device connected to the ADK?

    Answer: No, because the device can only be connected to a development PC or ADK, and not to both. You can connect the ADK using the micro usb port to your PC and do sequential debugging at the Arduino level, but this is not at all what debugs the java code on which the Android device is running.

  • What workflow is used to develop Android / ADK?

    Answer:

    • Write your Arduino code in Sketch, upload it to your ADK development board.
    • Connect your physical Android device to your development PC.
    • Write your code in Eclipse, compile it into APK, install it on a physical device.
    • Disconnect your Fijic Android device, connect it to the ADK, check if everything works. Use either the debugging application itself (for example, recording log entries on the screen), or use the Arduino serial connection to log in using the Arduino software.
    • If there are problems, fix them (either in Arduino or Java), return to 1. or 2.

Are the answers above correct? It sounds very difficult / slow to develop / test the code this way. Even a simulated ADK with AVD will be a big improvement.

+4
source share
1 answer

You are absolutely right in answering your own questions 1. and 3.

However, when it comes to question 2. , there is a way to debug your ADK project as usual, even when the device is connected to an accessory. You can use adb connect functionality to connect to your device via WiFi for debugging and DDMS purposes.

Take a look here to find out how to do this:

ADB, Wifi and Eclipse: how can I configure?

+2
source

Source: https://habr.com/ru/post/1400353/


All Articles