android-things

Webview loadurl crashing

妖精的绣舞 提交于 2019-12-05 13:49:19
When trying to load a url in my Android Things webview the page initially loads, then crashes the UI with an error message pointing towards the IoT FrameworkPackageStubs. I am using a Raspberry Pi on Dev Preview 5.1 which supports Webviews and OpenGL but have no idea why my very simple application seems to be crashing. The code for it is as follows @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView webView = (WebView) findViewById(R.id.webView); if(webView != null) webView.loadUrl("https://www

WiFi P2P network in Android Things

纵然是瞬间 提交于 2019-12-05 11:52:17
I would like to create a P2P WiFi network using Android Things (5.1) and a couple of Raspberry Pi 3 or alternatively using Bluetooth. I followed the guide in the Android Developer section https://developer.android.com/guide/topics/connectivity/wifip2p.html , so my MainActivity looks like: private class MainActtivity { private WifiP2pManager mManager; .... @Override public void onCreate(Bundle savedInstances) { mManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE); .... } } However when I try to run the app, with WiFI enabled, the SystemServiceRegistry shows a message stating

How to request permission on Android Things?

让人想犯罪 __ 提交于 2019-12-05 07:53:16
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 app's manifest file. All normal and dangerous permissions declared in your app's manifest are granted

Setting wifi ssid with a space in it

亡梦爱人 提交于 2019-12-05 06:27:19
I am trying to setup the wifi on my android things raspberry pi following the documentation . My Ssid contains a space in the name let's say "my ssid". I tried to put quotes around it like this: $ adb shell am startservice \ -n com.google.wifisetup/.WifiSetupService \ -a WifiSetupService.Connect \ -e ssid "my ssid" \ -e passphrase secretpassword When looking at the logcat for the wifi connection I see: WifiNetworkHistory: saving network history: "my"NONE gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:0 status:2 nid:0 hasEverConnected: false

Android things UsbDevices

允我心安 提交于 2019-12-04 20:24:37
I am developing with Android Things on rpi3 . I have a problem working with usb devices(pendrive) in my Raspi3 on Android things platform 1.0 Versión, i have been able to detect Usb(pendrive) Files, and copy files to them from my sd Card. I use ' com.github.mjdev:libaums:0.5.5 ' library, and I cannot work with all kind of usb devices.I have 3 pendrives which are FAT32, and i can only use one, the others report me an error message, as soon as i plug them into mi rpi3, i get this messages: "Unsupported fs on partition" "E/2: error setting up device" So i cannot work with them, because the error

Android Things bundle - UnsatisfiedLinkError

戏子无情 提交于 2019-12-04 13:34:35
I use a native library in my Android Things project. While using Android Studio to build and install an app on RPi3 with Android Things Dev preview 0.4.1 everything works fine. Even if I manually assemble release apk and install it through an adb install - it works as usual. But if I create a new zip bundle and upload it to Android Things console, and then burn an SD card with newly created image, the UnsatisfiedLinkError is thrown on boot: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/oem/app/app.apk"],nativeLibraryDirectories=[/oem/lib/app, /system

How to change the date on Android Things device?

谁说我不能喝 提交于 2019-12-04 04:39:26
问题 I'm using Android Things Developer Preview on Raspberry Pi 3 Model B. Is there any way to set the correct date/time/timezone? 回答1: The easiest way to do this is probably using the date shell command over ADB. It requires root, but all the preview images should allow root access. Here's an example that checks the date, sets it, and then verifies that the date change stuck: $ adb root restarting adbd as root $ adb shell date Sat Jan 1 00:02:40 GMT 2000 $ adb shell date 1227120016 Tue Dec 27 12

Reading temperature through DHT11 using Android Things

泄露秘密 提交于 2019-12-03 07:22:51
I am using Raspberry pi3 and DHT11 sensor for temperature monitoring project. I have following pin positions VCC to pin no : 2 Ground to pin no : 6 Output to GPIO : BCM22 i.e pin no 15 Code that I have used: public class WeatherStationActivity extends Activity { private Handler mHandler = new Handler(); private TextView mTxtStatus; private PeripheralManagerService service = new PeripheralManagerService(); private Gpio tempGpio; private int i = 0; int[] dht11_dat = {0, 0, 0, 0, 0}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d("Weather

android.os.ServiceSpecificException: GPIO2_IO02 is already in use (code 16)

﹥>﹥吖頭↗ 提交于 2019-12-02 03:31:17
I am working on android things(Pico i.MX7D I/O).I got android.os.ServiceSpecificException: GPIO2_IO02 is already in use (code 16) exception,What it means by this? Please help me. My sample program is cloned from https://github.com/androidthings/sample-button . This means another app is running in the background and is currently accessing this pin. This may happen if one app is not fully stopped before a new one is opened. You can see all your installed apps by running: adb shell pm list packages -3 You can force stop a program by running adb shell am force-stop <package name> Uninstalling or

Build number/fingerprint for Android Things

萝らか妹 提交于 2019-12-02 01:34:28
I'm using the Developer Preview of Android Things on my Raspberry Pi 3 and now, that the Preview 2 is released, I was asking myself if my RPi will get this via OTA. Where can I find the build number to check against my device generic/iot_rpi3/rpi3:7.0/NIF73/3565696:userdebug/test-keys On the developer page I didn't find anything and before I rebuild by sdcard, it would be easier to compare it. Onik so I'm not sure if this is preview 1 or 2 generic/iot_rpi3/rpi3:7.0/NIF73/3565696:userdebug/test-keys is the fingerprint for Preview 1 , so you're still on it. You can getprop ro.build.id to see the