This post contains some steps/information which you might find use full in developing and deploying app to a wearable device using Android Studio.
Note: we assume that developer mode has already been activated on your handheld device.
Enable Debugging on SmartWatch (LG G-Watch)
Enable Developer Mode
- Open Settings;
- Open About; Find Build number and tap on it 7 times;
- You're done when a toast popup appears with the message, "You are now a developer!" Swipe right (to go back) to the Settings menu.
Enable ADB-debugging
- Open Settings;
- Open Developer options;
- Find and set ADB debugging to Enabled. You'll be asked if you're sure you want to enable. Tap the checkmark button to confirm.
- Find and set Debug over Bluetooth to Enabled.
Enable USB Debugging on Android Smartphone
On the Android Wear app on your handheld, go to settings, and enable "Debugging over Bluetooth".
Connect the Smartwatch via ADB
Open a Terminal, if required navigate to the Android SDK Platform Tools, and enter following commands:$ ./adb forward tcp:4444 localabstract:/adb-hub; $ ./adb connect localhost:4444
Run the wearable app
- In Android Studio, select your wearable app from the Run Configurations;
- Press the "Play" button next to the selected configuration;
- When the windows appears with the connected devices, you will see the wearable listed as a deployable device;
- Select the wearable device and continue;
- You can check in the "Run" status window if the application is successfully deployed;
Geen opmerkingen:
Een reactie posten