androidraspberry-piandroid-things

Android Things Project with Empty Activity on a Raspberry Pi 3 Model B


I just downloaded an Android Things Image and flashed a SD-Card for the Raspberry PI 3 Model B, ok, it worked. I connected the Rasperry to my Network and created an "Android Things Empty Activity" with a TextView "Hello World".

First thing, the Android Studio did not connected to the PI. After downloading "platform-tools" and running in Windows Command cmd "adb connect android.local" I am able to download the App to the PI. I am using the Raspberry Pi Touch Display https://www.raspberrypi.org/products/raspberry-pi-touch-display/.

Second thing, the touch behavior is not very well, in my opinion it dosent work.

Third thing, after downloading the app. The app does not start, only after clicking a button "profile app" or restarting the PI with power off/on :(

Fourth things, after the app finaly starts: I guess it is empty!? Only the DarkActionBar is visible with the Text in strings.xml. Whatever I place in main_activity.xml, it looks like I am in the wrong xml file.

Thanks for help.


Solution

  • First thing, the Android Studio did not connected to the PI

    you can use debug over WiFi connection like in answers for this question.

    Second thing, the touch behavior is not very well, in my opinion it dosent work.

    take a look at that question and answer. Use screens with less resolutions and write custom drivers for touch panel.

    after downloading the app. The app does not start

    It's normal behavior. You should not only upload the application to Pi, but also run it in some way: reboot device or start it manually by adb command like that:

    adb shell am start -n com.package.name/com.package.name.ActivityName

    (debug over WiFi connection from "First thing" also will help)

    Fourth things

    It's hard to help you without the source code.