ݺߣ

ݺߣShare a Scribd company logo
Django íà Android



     Àëåêñàíäð Øëåìèí




3-é Ìîñêîâñêèé Django Meetup
Android




  Android äëÿ ïðîãðàììèñòà, ýòî

      èíñòðóìåíò ïîçâîëÿþùèé

             ñîâåðøàòü òåëåôîííûå çâîíêè, ñëàòü SMS ñîîáùåíèÿ
             ïîëó÷àòü ïîêàçàíèÿ ñåíñîðîâ, GPS
             ïðîèçâîäèòü àóäèî è âèäåî çàïèñü
             ðàáîòàòü ñ
                   ñðåäñòâàìè ñèíòåçà è ðàñïîçíàâàíèÿ ðå÷è

                   Wi-Fi, Bluetooth

                   áàçàìè äàííûõ

                   ...

             ...

      Java   ?
SL4A




                       Scripting Layer for Android



       èíòåðôåéñ ê Android API

       RPC ñåðâåð

       èíòåðïðåòàòîðû ÿçûêîâ

           JavaScript (Rhino)
           Lua
           Brainfuck
           Tcl
           Perl
           ...
           Python !
Ïðèìåð 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 ! ' )
Çàïóñê Django




  Îáîëî÷êà äëÿ               Ôîðìà äëÿ API
                 runserver
  manage.py                  ôóíêöèé
Áàçû äàííûõ SQLite



  nd_databases                inspectdb database_path=...




  startapp database_path=...   Django Admin
Èñïîëüçîâàíèå Django Admin
Ñïàñèáî!




            Django project for Android:

  https://github.com/b3b/jadro/

More Related Content

Django на Android

  • 1. Django íà Android Àëåêñàíäð Øëåìèí 3-é Ìîñêîâñêèé Django Meetup
  • 2. Android Android äëÿ ïðîãðàììèñòà, ýòî èíñòðóìåíò ïîçâîëÿþùèé ñîâåðøàòü òåëåôîííûå çâîíêè, ñëàòü SMS ñîîáùåíèÿ ïîëó÷àòü ïîêàçàíèÿ ñåíñîðîâ, GPS ïðîèçâîäèòü àóäèî è âèäåî çàïèñü ðàáîòàòü ñ ñðåäñòâàìè ñèíòåçà è ðàñïîçíàâàíèÿ ðå÷è Wi-Fi, Bluetooth áàçàìè äàííûõ ... ... Java ?
  • 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 ! ' )
  • 5. Çàïóñê Django Îáîëî÷êà äëÿ Ôîðìà äëÿ API runserver manage.py ôóíêöèé
  • 6. Áàçû äàííûõ SQLite nd_databases inspectdb database_path=... startapp database_path=... Django Admin
  • 8. Ñïàñèáî! Django project for Android: https://github.com/b3b/jadro/