La presentazione è in caricamento. Aspetta per favore

La presentazione è in caricamento. Aspetta per favore

realizzazione app per Google Android OS

Presentazioni simili


Presentazione sul tema: "realizzazione app per Google Android OS"— Transcript della presentazione:

1 realizzazione app per Google Android OS
appinventor realizzazione app per Google Android OS

2 drag & drop visual programming
appinventor è un’applicazione “drag & drop visual programming” Contrariamente ai linguaggi tradizionali (text-based programming languages) è basato su componenti visuali come blocchi e icone che sono utilizzate dall’utente- programmatore mediante operazioni di drag-and-drop

3 un esempio di drag & drop programming: Scratch
Scratch è un linguaggio di programmazione che rende semplice creare storie interattive, animazioni, giochi, musica e arte e condividere le tue creazioni sul web. Quando i ragazzi creano e condividono i loro progetti Scratch, imparano importanti idee matematiche e computazionali e allo stesso tempo imparano a pensare creativamente, a ragionare con sistematicità e a lavorare in collaborazione.

4

5 appinventor È un semplice ambiente di sviluppo basato su piattaforma Java App Inventor faceva parte di Google Labs, luogo virtuale ove gli ingegneri di Google sviluppano le nuove applicazioni sperimentali, ma il 10 agosto 2011 Google ha comunicato che App Inventor sarebbe stato chiuso, cosa che è avvenuta il 31 dicembre 2011. Il sistema è stato preso in carico dal MIT Center for Mobile Learning che ora lo supporta con il nome "App Inventor Edu”

6 storia Presentato da Google nel dicembre 2010
Utilizza la Open Blocks library di Java del MIT Simile a Scratch (altro lavoro del MIT) Ospitato dai server MIT nel gennaio 2012

7 la struttura di appinventor
Appinventor Designer permette di “disegnare” l’interfaccia grafica e scegliere i componenti dell’applicazione è una web application ospitata su un server del MIT tutti i dati risiedono sul server (cloud computing) E’ possibile installare in locale un server contenente la web application Appinventor Blocks Editor permette di associare le azioni agli eventi è una Java Web Start Application che opera sul client Emulatore per testare l’applicazione senza la necessità di un dispositivo android

8 la struttura di appinventor

9 designer scelta dei componenti da trascinare sullo screen
proprietà del componente selezionato screen (interfaccia dell’applicazione) Lista dei componenti

10 caricamento del blocks editor
“Open the Blocks Editor” per passare dal Designer al Blocks Editor Esegue il download del file che contiene la Java Web Start application che deve essere eseguita sul client

11 blocks editor

12 blocks editor (Java Web Start)
Java Web Start (JavaWS, javaws o JAWS) è un framework sviluppato da Sun Microsystems (ora Oracle), che permette agli utenti di scaricare ed avviare applicazioni software per Java Platform direttamente da Internet utilizzando un browser web. Il software Java Web Start: Permette una facile attivazione delle applicazioni mediante un clic Garantisce che venga sempre eseguita l'ultima versione dell'applicazione Elimina le complicate procedure d'installazione e di aggiornamento

13 “programmazione” Nel Blocks Editor si compongono i blocchi che associano agli eventi associati ai componenti le azioni da compiere

14 test dell’applicazione
è possibile testare l’applicazione mediante un emulatore android

15 … o collegare direttamente il device

16 Variable Declaration App Inventor: Declare Variables using the “Define Variable As” Block Find the Blocks Editor (top-left), click the Definition button, then pull out the correct block.

17 Variable Assignment Assign a variable named “count” to 5
In App Inventor, use “set global - to” block in the My Blocks Menu Only available once defined your variable Drag the “set global - to” block out Create a number block by typing in “5” in the editor window Click 5 into the “set global – to” block

18 App Inventor Math using Variables
Combine the “Set-To” Block with operators from the “Built-In->Math” Menu Count = 9 Count = 5 Count = 14 Count = 3 Count = 1 (modulo gives the remainder of division)

19 Variable Initialization

20 You are forced to define a variables value when you declare it in App Inventor
A general place for program initialization is the “When Screen1.Initialize” block Note: Most Text-Based languages use the “main()” function as the start of the program For example, set count to 100 when the program starts:

21 Implementing an Equation in App Inventor
Area of a Rectangle = Length * Width Step 1: What variables do we need? Area, Length, and Width Step 2: Declare them in App Inventor Step 3: Use Math. Operators to Implement

22 Output: The Label Component
Components used to show text. Displays text specified by the Text property. Useful Properties Text Width Visible Background Color

23 Output: The Image Component
Components used to show a picture Displays text specified by the Picture property. Useful Properties Picture Width Visible Height

24 Output: The Texting Component
A non-visible component to allow users to send and receive text messages. Useful Properties Message Phone Number Receiving Enabled (Does this also make the Texting component a input?)

25 Input: The Button Component
Components used to show text. Displays text specified by the Text property. Useful Properties Text Width Visible Background Color

26 Input: The TextBox Component
Components used to show text. Displays text specified by the Text property. Useful Properties Text Width Visible Background Color

27 If-Blocks

28

29 Nesting If and If-Else Blocks
Often times, we want to check if a prior condition is true, before checking another condition. Example: If x > 100, then check if y is < 100. If y < 100, then assign z to 1. If x <= 100, set z to 35.

30 Implementation Step 1: Lamp Doesn’t Work
If-Block or If-Else Block? Why?

31 Step 2: Lamp Plugged In?

32 Step 3: Bulb Burned Out?

33

34 Tips E’ possibile copiare e incollare un insieme di blocchi
Ctrl C – Ctrl V E’ possibile digitare un valore numerico o booleano e viene automaticamente creato il blocco Con click destro su un blocco è possibile associare un commento disattivare il blocco eseguire il blocco controllare il valore di una variabile


Scaricare ppt "realizzazione app per Google Android OS"

Presentazioni simili


Annunci Google