android-things

Android Things: Connect to Raspberry Pi 3

99封情书 提交于 2020-01-09 02:43:07
问题 Total newbie, I have a Raspberry Pi and have put the Android Things disk image on and booted it up, but I can't connect to it from a Windows 10 PC running Android Studio , adb.exe via Ethernet or USB? The Pi screen has a green and grey "androidthings" logo, but says "Not Connected" . If I connect a USB cable and use the adb devices command, nothing is detected. If I connect an Ethernet cable and use adb connect android.local command it says unable to connect to android.local:5555 ? I have

Android Things - Slow Installation

血红的双手。 提交于 2020-01-06 07:21:26
问题 I trying to develop a simple application with Android Things and Raspberry Pi 3, the problem is that the installation of the App is very very slow (the size of the apk file is 4 or 5Mb). The network is fine. I'm using versión 0.5 of Android Things. Any ideas? 回答1: Finally, In my case the problem is not the network, something is wrong with SD Card. I change it and everything it's ok. 来源: https://stackoverflow.com/questions/45836894/android-things-slow-installation

Android Things - Slow Installation

让人想犯罪 __ 提交于 2020-01-06 07:21:08
问题 I trying to develop a simple application with Android Things and Raspberry Pi 3, the problem is that the installation of the App is very very slow (the size of the apk file is 4 or 5Mb). The network is fine. I'm using versión 0.5 of Android Things. Any ideas? 回答1: Finally, In my case the problem is not the network, something is wrong with SD Card. I change it and everything it's ok. 来源: https://stackoverflow.com/questions/45836894/android-things-slow-installation

How can I run a shell script on Android Things device at boot with root permissions?

独自空忆成欢 提交于 2020-01-05 04:54:11
问题 I've installed Android Things DP4 on a Raspberry Pi 3. Now I need to execute a ifconfig as root in order to set a static IP. Tried: -installed an Android app in the /system/app folder with world executable perms -installed an Android app in the /system/private-app folder with world executable perms -created init.d with a executable shell script file (folder didn't exist before) All this failed miserably... 回答1: Android (and therefore Android Things) does not allow applications to run as the

Android Things: How to exit Android Settings screen?

浪尽此生 提交于 2020-01-04 01:38:51
问题 I succeed to show Android Date Settings by calling : startActivityForResult(new Intent(android.provider.Settings.ACTION_DATE_SETTINGS), 0); but I don't know how to exit, there is no cancel/update button, no back button or navigation bar. Would anyone know how to leave this screen? I use Android Things 0.5.1-devpreview on RPi3 with this example code. 回答1: In order to close Android 's settings app you can either send a back button press event adb shell input keyevent 4 or force close the

Android Things: How to exit Android Settings screen?

六月ゝ 毕业季﹏ 提交于 2020-01-04 01:38:10
问题 I succeed to show Android Date Settings by calling : startActivityForResult(new Intent(android.provider.Settings.ACTION_DATE_SETTINGS), 0); but I don't know how to exit, there is no cancel/update button, no back button or navigation bar. Would anyone know how to leave this screen? I use Android Things 0.5.1-devpreview on RPi3 with this example code. 回答1: In order to close Android 's settings app you can either send a back button press event adb shell input keyevent 4 or force close the

How to get screenshot of Application on Android Things device in Android Studio or via ADB?

£可爱£侵袭症+ 提交于 2020-01-04 00:04:07
问题 Is there any way to get screenshot in Android Studio (or via ADB ) for Raspberry Pi 3 Model B with Android Things Developer Preview on it? (any other way not via Android Studio / ADB also accepted). 回答1: It's not a "screenshot", but how about mp4 movie instead? adb shell screenrecord --verbose /sdcard/screen.mp4 --time-limit 1 Though the recorded movie is not correctly recorded, it's still like a "screenshot". (I cannot get a frame out of it using QuickTime Player, but any other tool might be

Connecting to a Usb peripheral

最后都变了- 提交于 2020-01-03 13:16:29
问题 It looks like the UsbManager is gone in the build. How do we communicate with usb peripherals now? Things like usb->serial etc using https://github.com/mik3y/usb-serial-for-android 回答1: Currently the Peripheral HAL doesn't recognize usbserial based UART peripherals. But if your usbserial device (ex: Arduino) exposes individual UART TX RX pins, you can communicate with it using the UART Peripheral API. Caveat: Don't forget to cross TX and RX when connecting the peripheral to the UART board of

How to request permission on Android Things?

瘦欲@ 提交于 2020-01-02 03:45:27
问题 I'm trying to write to a value on AT. I've already declared required permission as follow in manifest, <uses-permission android:name="android.permission.WRITE_SETTINGS"/> And try to request permission at run-time, AT shows windows regarding permission setup. However the switch is not clickable. Regarding AT document Requesting Permissions at Runtime is not supported because embedded devices aren't guaranteed to have a UI to accept the runtime dialog. Declare permissions that you need in your

Uart / GPS driver sample buffer overflow

馋奶兔 提交于 2019-12-25 07:49:20
问题 I am trying the sample for the GPS driver with a raspberry pi 3 and the Ultimate GPS V3 breakout board. Here is the full source code: https://github.com/androidthings/drivers-samples/tree/master/gps The GPS board is connected following this schematics: When launching the sample app, I get the following error: com.example.androidthings.driversamples E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.androidthings.driversamples, PID: 1299 java.nio.BufferOverflowException at java.nio