Subdomain Posts
None | 10 days ago
None | 10 days ago
None | 10 days ago
None | 10 days ago
JavaScript | 21 days ago
JavaScript | 24 days ago
JavaScript | 25 days ago
JavaScript | 25 days ago
None | 25 days ago
None | 33 days ago
Recent Posts
None | 3 sec ago
CAD Lisp | 8 sec ago
PAWN | 26 sec ago
None | 31 sec ago
None | 50 sec ago
None | 54 sec ago
Make | 54 sec ago
None | 2 min ago
None | 2 min ago
PHP | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Anonymous on the 9th of Jun 2009 08:40:53 AM
Download |
Raw |
Embed |
Report
--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
android.vibrate() --A short vibration to indicate we're in silent mode.
android.setRingerSilent(true)
silent = true
elseif not facedown and silent then
android.setRingerSilent(false)
silent = false
end
android.sleep(1)
end
Submit a correction or amendment below.
Make A New Post