dev fest android application case study
DESCRIPTION
Talk di Daniele Bottillo e Luca Leone alla DevFest 2012 @ FirenzeTRANSCRIPT
![Page 1: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/1.jpg)
Dev fest Android application - case study
Daniele BottilloGDG Bologna
![Page 2: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/2.jpg)
Indice
● l'applicazione
● da dove siamo partiti
● che cosa abbiamo fatto
● come l'abbiamo fatto
● i problemi incontrati
![Page 3: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/3.jpg)
L'applicazione
![Page 4: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/4.jpg)
L'applicazione
● agenda devfest
● dettaglio talk
● condivisione talk
● aggiunta talk al calendario
● lista sponsor
● about
![Page 5: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/5.jpg)
Da dove siamo partiti
● GDG Bologna è in "partenza"
● supporto agli organizzatori
● conoscenza di Android
● hey ma un'applicazione Android per la devfest non esiste?
● GDG Berlin / GDG Zurich (ieri)
![Page 6: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/6.jpg)
Requisiti / Punto di partenza
● 15-20 giorni di tempo
● lavoro notturno e nei weekend
● progettazione in pausa pranzo
● ragazze imbufalite
![Page 7: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/7.jpg)
Punto di partenza tecnico
● non abbiamo tempo
● android 4.0
● solo smartphone
● fragment ed intent
● ragazze imbufalite
![Page 8: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/8.jpg)
Progettazione
![Page 9: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/9.jpg)
Progettazione
Main Activity
View Pager
Fragment Agenda Fragment Sponsor
Fragment Talk
About Activity
![Page 10: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/10.jpg)
Progettazione
● genericità
● devfest è ciclica
● progetto android dev-fest
● progetto android dev-fest-2012
● libreria android
![Page 11: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/11.jpg)
Android Library
● progetto non compila più!
● creare riferimento alla libreria
● override
● strings.xml
![Page 12: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/12.jpg)
Sviluppo
● nuovo progetto Eclipse
● Build SDK: Android 4.1 (API 16)
● Minimum Required SDK: Android 4.0 (API 14)
● android compatibility package
![Page 13: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/13.jpg)
Sviluppo - Agenda
● viewpager
● fragment
● custom adapter (section list)
● no images!
![Page 14: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/14.jpg)
Sviluppo - Dettaglio Talk
● dialog fragment
● images!
● intent per condivisione
● intent per aggiunta a calendario
![Page 15: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/15.jpg)
Sviluppo - Intent condivisioneIntent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, talk.getTitle()+" - "+talk.getSpeaker());
startActivity(Intent.createChooser(intent, app.getResources().getString(R.string.title_sharing_dialog)));
![Page 16: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/16.jpg)
Sviluppo - Intent calendarioIntent intent = new Intent(Intent.ACTION_EDIT);intent.setData(Events.CONTENT_URI)
.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, talk.getStart().getTimeInMillis())
.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, talk.getEnd().getTimeInMillis())
.putExtra(Events.TITLE, talk.getTitle())
.putExtra(Events.EVENT_LOCATION, talk.getPlace())
startActivity(intent);
![Page 17: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/17.jpg)
Sviluppo - Libreria
List Fragment
android-devfestandroid-devfest-2012
json strings.xml
<string-array name="fest"> <item>Firenze</item> <item>Sicilia</item></string-array>
Class jsonRaw = R.raw.class;
Field field = jsonRaw.getField(fest[0].toLowerCase());
InputStream is = activity.getResources().openRawResource(field.getInt(null));
![Page 18: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/18.jpg)
Sviluppo - NFC
String url = "https://play.google.com/store/apps/details?id=org.gdgbologna.devfest2012"; byte[] payload = url.getBytes();
NdefRecord ndefRecord = new NdefRecord(NdefRecord.TNF_ABSOLUTE_URI, payload, new byte[0], payload);
mNdefPushMessage = new NdefMessage(new NdefRecord[] { ndefRecord });
mNfcAdapter.setNdefPushMessage(mNdefPushMessage, this);
![Page 19: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/19.jpg)
Problemi incontrati
● intent calendario○ +1 per i nexus○ insulti per HTC, SAMSUNG, etc..
● fragment○ bellissima idea○ portano via tempo...○ gestione ciclo di vita e viewpager
![Page 20: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/20.jpg)
Riferimenti
● http://code.google.com/p/android-devfest/
● http://code.google.com/p/android-devfest-2012/
● http://www.gdg-bologna.org/ (in terminazione)
● GDG Bologna - Google +
![Page 21: Dev fest android application case study](https://reader033.vdocuments.mx/reader033/viewer/2022061113/545c5295b0af9fae2c8b47a3/html5/thumbnails/21.jpg)
Fine
● Daniele Bottillo○ www.danielebottillo.com○ twitter: cribcaged7