Taking a screen shot with Samsung Android Gear Live (Wear) - wear-os

I just received a Samsung Android Wear from I/O today, and started working with it as soon as I got back to the hotel. I was wondering if anyone else (or an official rep) knows how to take a screen shot of the device.

Update
If you're running Android Wear 5.0.1 or later and have the updated Android Wear app on your phone, it's now very simple to take a screenshot of your watch. Just open the menu and tap "Take wearable screenshot" as shown below.
Taking a screenshot over ADB (the harder way)
You can use adb to grab a screenshot. Something like:
adb shell screencap -p /sdcard/screenshot.png
adb pull /sdcard/screenshot.png
This will first put screenshot.png on the watch's SD card, and then copy that screenshot to your current working directory. It is more complicated than the updated answer above, but will work for any Android Wear device, regardless of version.

I don't have a device yet, so I don't know the exact steps, but I've heard you can take screenshots through the developer tools, which you can access via
Settings>About and tap on the build number,just like you do on your phone.
Found here: http://www.androidcentral.com/just-get-android-wear-these-are-first-10-things-you-need-know

Similar to Tony Wickham's answer, I made a script for it:
https://gist.github.com/michaelsanford/029eef643f49e409ddf3
Write up with notes is here.
You can install the above gist with
cd /usr/local/bin & curl -o ./gcap https://gist.githubusercontent.com/michaelsanford/029eef643f49e409ddf3/raw && chmod +x gcap
Here is a trivial excerpt, the gist above is much more complete:
#!/usr/bin/env bash -e
ETIME=$(date +"%s")
adb shell /system/bin/screencap -p /sdcard/screen-${ETIME}.png
adb pull /sdcard/screen-${ETIME}.png screen-${ETIME}.png
adb shell rm /sdcard/screen-${ETIME}.png
Call it something short, chmox +x and symlink it to /usr/local/bin for easy use. My personal version is modified to adb pull to ~/Desktop/screen-${ETIME}.png because I use OS X.
Note that you will first need to enable debugging.

The easiest way to take screenshots on a wearable is to use the Android SDK monitor tool:
$ANDROID_HOME/tools/monitor
After enabling USB debugging on the wearable simply launch monitor and use the screenshot button shown here in the upper-right:

Related

Automator takes screenshot of background instead of window

System specs: mac OS Monterrey V12.5, Apple M1 chip 2020
I am making an application which will take a screenshot of a video, and take the timestamp of the current point in this video, after which both the timestamp and screenshot will be send to a numbers file (mac OS excel like program).
I could not find an application to do this and I tried to get it working using python as shown here but was unable to. Now because I am on Mac I have decided to use Automator instead. I am currently on the screenshot part and Automator has a build in screenshot functionality.
Unfortunately, this screenshot does not detect browser or application windows, it will only take a screenshot of my background.
I have no idea why this is but I suspect it might have to do with permissions related to the M1 chip.
I tried different monitors and simplyfying the automation to just taking a screenshot, but so far nothing has helped, I could not find others online who had a similar problem.
If there is any information missing from this post I will be happy to provide it.
Edit: It seems to be some kind of permission issue, automator CAN take screenshots within Safari, now I just need to find a way to do so in firefox.
I have solved the issue, it turns out that the M1 chip has a special permission for screen recording, adding my Automator application to this permission list will allow it to take screenshots of all windows.

Runing UIautomatorViewer with AVD

I would like to use Googles UIautomatorViewer to analyse a third Party App running in a Android Virtual Device.
So far, I found a lot of toturials for the UIautomatorViewer using a real device and the ADB.
But is there a way to use a emulated device?
Thank you a lot in advance!
Yes. You can analyse emulator easily with uiautomatorviewer.
let me explain steps.
1) create emulated device from android studio and give it name ex. demo
2) Open cmd from emulator folder by typing "cmd" in search bar.
You will find folder here = "C:\Users\admin\AppData\Local\Android\Sdk\emulator"
3) Hit command " emulator #demo " it will open your emulated device called demo.
4) Now open uiautomatorviewer
Start analyse whatever you want on your device.

Appcelerator doesn't detect android phone

Goodmorning,
I'm working quite hard on my own app. At this point I want to run it on my android (galaxy note 3) phone. Unfortunately Appcelerator studio doesn't detect my android phone; Windows does. I've tried it with the new Galaxy s7 of a friend, but same result.
Off course I searched the web like crazy and found several possible (old) answers, but none did the magic.
When I consult the log, there's no new info to be read!
Does anyone have a clue where to look? Looking forward to your answers…
Kind regards!
One thing you should check is if you have set up your phone for development. You can see the instructions here: http://developer.android.com/tools/device.html (... tap 7 times... - took me a while to discover!)
And the small obvious thing is in Appcecelerator Studio you may need to select "Refresh devices" when you try to run the project.
/John
When you say "Windows" detects it, what exactly do you mean? Does adb detect it?
If you run
adb devices
on the command line, does it report your device ID?
On my Mac, I run this and I can see my connected S4:
List of devices attached
9726ea90 device
I'm assuming that the Windows version of adb would output a similar report.
With all the Samsung phones I've debugged with, I always have to go to the notification bar and choose "connect as media device" (or something similar). The default connection mode does not work for debugging. And unfortunately, you have to do this every time you connect the device.

Android Wear - Start App voice command not working

I have an app installed on Android Wear Emulator that I can directly run from Start->MyApp. However when I want to start it with voice command i.e. Start MyApp, it keeps waiting for something but does not complete. What could be reason for this?
There is a limitation of the current emulator that it does not support voice actions via the keyboard, even though the text appears on the display. You will need to start the application by clicking on the display, then the red G, and then going to the start menu and picking the app from there. You can also quickly start the application using something like this from your development machine:
adb shell am start -n com.example.android.test/.TestActivity
The watch needs to be connected to a phone (device or emulator) with an internet connection for the voice commands to work.

How do I automatically run an application on USB attach or CD insert on Mac OS X?

Is there any way to automatically launch an application on USB attach or CD insert on Mac OS X? it's easy on Windows, but I found that AutoRun.Inf does not work on the Mac at all.
You can't. Autostarting applications is impossible under Mac OS X.
The next-best thing, opening the CD folder and showing the installer icon, can be done by using (AutoOpen version 1.0) to make a .dmg which can then be burnt to a CD.
Basically, auto-run is considered a security problem and so is not supported in OSX. Sophie Alpert's answer is also a bit overkill. Most installers for OSX simply open up a folder to show the application and, possibly, a readme. Installing is done by dragging the app to your Applications folder.
For other kinds of apps on CDs (say, a slide show or something like that), the developer generally uses hidden folders to hide support data to ensure that the only thing the user will see when they open the CD is the single icon they're supposed to double click to start the app.
It is possible to install a background service that monitors whenever a USB device is plugged in and then launches an App. Google's "Android File Transfer Agent" is such a service that is running in the background and launches "Android File Transfer" whenever you plug in an Android device.
If you are looking for something for just yourself, you could write a small mac app that runs in the background and watches for a particular USB device (by id) to be attached and then run the program. Ideally a small XML plist could be used to map device IDs to the correct program to run. The XCode SDK has sample code that monitors for device additional and removal to get you started.
I agree with JavaCoderEx. I would crontab a task that looks for /Volumes/*/autorun.sh, then runs it once. Maybe touch a file in /tmp/ so you know its already been run, then remove it if the volume disappears.

Resources