Creating a complete project, compiling and deploying the APK on the Wear device is quite time consuming and somewhat annoying.
I tried to write an app to execute BeanShell code directly on the Wear device. This is all experimental and the possibilities are quite limited compared to an regular app, but for an execution of some code snippets that seemed to be a good idea.
The result is Wear Shell, an app that consists of a mobile and a Wear part. The mobile part moves the code for execution to the smart watch, collects the result and passes it to the calling application.
So I hope owners of an Android Wear smart watch have fun with the app and find it as interesting as I did to explore things from the perspective of a watch.
WearShell App |
Web Interface
To make tests easier, the app contains a small (PAW based) web server with a web interface. Inside this interface you can type the code inside a text area, press the Execute button and wait for the result to be displayed.Web Interface with Wear System Information |
The web interface also contains a page containing code snippets for you to try out. These snippets include code for database, Bluetooth and system info access and should provide a good starting point for further explorations.
Developers
Developers have the possibility to use the functionality of the app within their own applications by using a Result Intent.Action: de.fun2code.android.wear.shell.EXEC
Request String Extra: bsh
Response String Extra: result
Just pass the BeanShell code to execute to the bsh parameter and read the result from the resulting Intent.
Links
Download: WearShell APKDiscussion: XDA Developers
Cool project, do you have source code available on github, or somewhere else?
ReplyDeleteSource code is currently not available.
DeleteDo you need any device rooted? huawei watch + samsung s4
ReplyDeleteIt doesn't install the watch component. I tried separately WearShell_0.6.0 and WearShell_0.6.0_wear - one uninstall the other one.
Root is not needed. Did you try to install and WearShell_0.6.0_wear dircetly on the watch? You can also post your question here: http://goo.gl/pCTTt5
DeleteI'm not very used to execute applications from adb console, but is it possible to launch a Beanshell from an ADB console in the mobile device in a way like this?
ReplyDeleteam start -a de.fun2code.android.wear.shell.EXEC --es "key" "bsh: command(param)"
Hope you can help me, I just wanted to collect the result of the stt Beanshell in Tasker and I can't figure out how to assign the stt result to a Tasker variable from the intent menu, so I thought making a script would be a better idea.
I executed succesfully Beanshells like tts, vibrate, etc... but I find useful to use the voice recognition in a watch and having a response right to Tasker app.
Hope you can help me.
This comment has been removed by the author.
ReplyDeleteFinally I discovered by myself:
ReplyDeleteam broadcast -a de.fun2code.android.wear.shell.EXEC --es bsh "stt(\"Say something\")"
I also found how to use tts.bsh in other languages:
tts("Dime algo bonito",new Locale("es", "ES"))
tts("Dime algo bonito",Locale.getDefault())
By the way I have modified stt to copy the text back to the phone. I will publish it on XDA because here I can't post mediafire links.
I would like how to:
- add a Tasker variable
- load it with the recognised text
from a bean shell to avoid using files.
Keep doing this good work, hope we can make new things soon.
Thank you!
This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things.
ReplyDeleteAndroid Wear