3. SL4A
Scripting Layer for Android
èíòåðôåéñ ê Android API
RPC ñåðâåð
èíòåðïðåòàòîðû ÿçûêîâ
JavaScript (Rhino)
Lua
Brainfuck
Tcl
Perl
...
Python !
4. Ïðèìåð Python êîäà
import a n d r o i d
d r o i d = a n d r o i d . Android ( )
r = d r o i d . d i a l o g G e t I n p u t ( ' D i a l o g Header ' ,
' D i a l o g Message ' ,
' Default text ' )
i f ( not r . e r r o r ) and r . r e s u l t :
droid . ttsSpeak ( r . r e s u l t )
e l i f droid . v i b r a t e (32 ∗ 1 0 0 0 ) . e r r o r :
d r o i d . makeToast ( ' A l l t h e s y s t e m s i n norm ! ' )