lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Yes, and as an iPhone user I am quite jealous.

Come on, Apple;  Step up.

Phoenix Sol


On Mon, Jun 22, 2009 at 5:30 PM, David Given <dg@cowlark.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yuri Takhteyev wrote:
[...]
> Someone showed me a jail-broken iPhone running Lua command line app.

You might be interested to know that there's an official Google project
to support scripting Android in Lua, Python and Beanshell:

http://code.google.com/p/android-scripting/

- --Placing the phone face down will disable the ringer. Turning it face
- --up again will enable the ringer.
require "android"
android.startSensing()
android.sleep(1)  --Give the sensors a moment to come online.
silent = false
while true do
 s = android.readSensors()
 facedown = s.result and s.result.zforce and s.result.zforce > 9
 if facedown and not silent then
     --A short vibration to indicate we are in silent mode.
   android.vibrate()
   android.setRingerSilent(true)
   silent = true
 elseif not facedown and silent then
   android.setRingerSilent(false)
   silent = false
 end
 android.sleep(1)
end
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpABdEACgkQf9E0noFvlzh4gwCg06iIqsuPenQ8ttCAuzUtCUq1
Wn4AnizdUe9owQlu2gri69jUwUudymZz
=hdjP
-----END PGP SIGNATURE-----

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────

│ "They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown." --- Carl Sagan