Automating your Android Phone with SL4A
Sep 02, 2010, 14:34 (0 Talkback[s])
(Other stories by Paul Ferrill)
WEBINAR: On-demand webcast
How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >
"Back in Part 1 we learned how flexible and script-able Android
is, and installed the SL4A scripting layer. Today Paul Ferrill
teaches more about how to write custom Android scripts.
"In the first installment of this article we looked at getting
Google's Scripting Layer for Android (SL4A) downloaded and
installed on your Android phone. We examined the basics of writing
scripts using Python and even included a short script to set a few
of the profile settings. This time we'll take a look at some of the
sample scripts found on the SL4A website and talk about how you
might write a script of your own.
"The first thing you should do after installing the SL4A
application on your phone is to add a shortcut to the scripts
folder on one of the home screens. On the HTC EVO you can do this
by pressing on an empty space and hold until the Add to Home dialog
appears. From here you can add a Widget, App, Shortcut or Folder.
Selecting Folder presents a list of available folders and an option
to create a New Folder. Selecting the Scripts folder will add a
folder icon to the current home screen. Once that's done, you'll
have single-click access to any of the scripts stored on your SD
card in the sl4a/scripts directory."