Lars Röwekamp | CIO New Technologies                                @mobileLarson                              @_openKnowl...
User Interface
Social
Social Sharing
be
beconnected
Gimme
Gimme Input
Make
Make Noise
User Interface
UI eXtended> Fragments> Loaders> Sorry, not Version 4.x
UI eXtendedFragments
UI eXtended> Multi-Pane UI
UI eXtended> Multi-Pane UI > UI Fragments als „Building Blocks“ > UI Activity Layout als „Block Assembler“ > UI Activity C...
UI eXtended   Was ist ein> Multi-Pane UI > UI Fragments als „Building Blocks“   Fragment? > UI Activity Layout als „Block ...
UI eXtended> Fragment > Activity Modul a.k.a. Sub Activity > inkl. eigener UI > inkl. eigenem Lifecycle > benötigt immer e...
UI eXtended> Fragments & Resources > Size: small, normal, large, xlarge > Density: ldpi, mdpi, hdpi, xhdpi > Orientation: ...
UI eXtended> Fragments & Resources > Size: small, normal, large, xlarge   Deprecated > Density: ldpi, mdpi, hdpi, xhdpi > ...
UI eXtendedOk, aber wie> Fragments & Resources spielt das > Size: small, normal, large, xlarge   Deprecated > Density: ldp...
UI eXtended> Fragments in Action
UI eXtended> Fragments in Action
UI eXtended      > Fragments in Action                       > Starte MainActivity                       > Screensize Smar...
UI eXtended      > Fragments in Action                       > Starte DetailsActivity                       > Screensize S...
UI eXtended      > Fragments in Action                                > Starte MainActivity                               ...
UI eXtended> Fragments Modus-Check // MainActivity: Check, if detail fragment is visible @Override public void onCreate(Bu...
UI eXtended> Fragments Modus-Weiche // MainActivity: Call detail for selected list item @Override public void onItemSelect...
UI eXtended> Fragments Special Features > Transaktionssteuerung via FragmentTransaction > insert(), replace(), delete() vi...
UI eXtended> Fragments Special Features // Using Fragments and FragmentTransactions Fragment newFragment = new ExampleFrag...
UI eXtendedLoader
UI eXtended> Loader > asynchrones Laden von Daten > verfügbar in Activities und Fragments > Content-Change-Monitoring der ...
UI eXtended
UI eXtended
UI eXtended
UI eXtended> Loader    // Activity implementing Loader Callbacks    public class MyActivity extends Activity             i...
UI eXtended> Loader    // Activity implementing Loader Callbacks    public class MyActivity extends Activity             i...
UI eXtended> Loader    // Activity implementing Loader Callbacks    public class MyActivity extends Activity             i...
UI eXtendedSorry, not 4.x
UI eXtended> Sorry, not Version 4.x  > WTH?  > No problemo!  > Android Support Library  > a.k.a. Android Compability Libra...
UI eXtended
UI eXtended„Und was ist mit dem    ActionBar?“
UI eXtended
Demo(s)
Social Sharing
Sharing> Social API> Calendar API> Visual Voicemail API
SharingSocial API
Sharing„With ICS, we set out to buildsoftware that supports emotionalconnections between humansand the devices they carry.“
Sharing> Social API  > Speichern/teilen von User Contacts und Content    > letzte Aktivitäten, Photos, eMails, Texte, ... ...
Sharing> Social API  > Idee 1: prominentere Darstellung der Kontakte  > Idee 2: prominentere Darstellung der Aktivitäten
Sharing> Social API  > Idee 1: prominentere Darstellung der Kontakte  > Idee 2: prominentere Darstellung der Aktivitäten
Sharing> Social API > Contact > Raw Contact > Data Row > Sync Adapter > Update Stream
Sharing  > Social API    > Contact    > Raw Contact    > Data Row    > Sync Adapter    > Update StreamRawContacts.ACCOUNT_...
Sharing  > Social API    > Contact    > Raw Contact    > Data Row    > Sync Adapter    > Update Stream                    ...
Sharing               READ-ONLY!> Tables                            READ-WRITE!                            READ-WRITE!
Sharing   > Table Relations
Sharing   > Table Relations
Sharing> Data Structure
Sharing> Data Structure
Sharing> Connection hinzufügen <!-- sync account description --> <ContactsAccountType   xmlns:android="http://schemas.andr...
Sharing> SyncAdapter
Sharing> SyncAdapter
Sharing> Social API > Contact > Raw Contact > Data Row > Sync Adapter > Update Stream   (seit API 15+)
Sharing> Social API > Contact > Raw Contact > Data Row > Sync Adapter > Update Stream   (seit API 15+)
Sharing> Add Stream Item    // add a stream item to an existing raw contact    private void addContactStreamItem(Context c...
Sharing> Click Stream Item <ContactsAccountType   xmlns:android="http://schemas.android.com/..."   <!-- Click on Item Stre...
Demo(s)
SharingCalendar API
Sharing> Calendar API > Kalenderdienste in eigene Apps integrieren         Na   > Permissions vorausgesetzt ... > Erzeugen...
Sharing> Calendar API > Kalenderdienste in eigene Apps integrieren   > Permissions vorausgesetzt ... > Erzeugen/verwalten ...
Sharing   > Calendar API
Sharing> Calendar API > CalendarContract.Calendar   > je Kalender: Name, Farbe, Sync Info, ... > CalendarContract.Event   ...
Sharing> Calendar API > CalendarContract.Reminders   > je Reminder: Typ und Zeitpunkt > CalendarContract.ExtendedPropertie...
Sharing> Calendar API > In Aktion ...                   (Quelle: Google Apps Developer Blog)
Sharing> Calendar API    // Check for existing calender(s)    Uri uri = CalendarContract.Calendars.CONTENT_URI;    String[...
Sharing> Calendar API // Insert an event - permission needed ContentResolver cr = getContentResolver(); ContentValues cv =...
Sharing> Calendar API           // Insert an event via intent - no permission needed	  	  	  Intent	  intent	  =	  new	  I...
SharingVisual Voice Mail
Sharing> Visual Voice Mail API  > Integrieren von „Voice Mails“    > Nachrichten, Aufnahmen, Sound-Dateien ...  > Voicemai...
Sharing> Visual Voice Mail API
Demo(s)
beconnected
Connectivity> NFC Beam> Wifi Direct> Bluetooth HDP
ConnectivityNFC Beam
Connectivity> NFC Beam (a.k.a. NDEF Push) > Datenaustausch zwischen 2 NFC Devices   > Apps, Contacts, Music, Videos, Game ...
Connectivity
Connectivity> NFC Beam > Sender   > „Beam Application“ im Vordergrund   > android.permission.NFC > Empfänger   > muss „unl...
Connectivity> NFC Sender - „static Message“ NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(); // set static payload ...
Connectivity> NFC Sender - „dynamic Message“ NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(); // set payload just i...
Connectivity> NFC Sender - NdefMessage // create NdefMessage for beaming private NdefMessage createNfcMessage(String msg) ...
Connectivity> NFC Receiver <intent-filter>   <action     android:name=“android.nfc.action.NDEF_DICSOVERED“/>   <category  ...
Connectivity> NFC Receiver // Beam data is delivered via intent EXTRA DATA Parcelable[] messages = intent.getPacelableArra...
ConnectivityWifi Direct
Connectivity> Wifi Direct  > Peer-to-Peer Connections    > Peer Discovery, Request und Connecting  > WifiP2pManager als Main...
Connectivity> Wifi Direct
Connectivity> Wifi Direct // required permission settings <uses-sdk android:minSdkVersion="14" /> <uses-permission android:...
Demo(s)
Gimme Input
Input> Text Service API> Voice Input> Input Framework
Input> Text Service API  > Abfrage von Textservices    > Dictionaries, Spell Checker für ...    > Wortvorschläge, Autokorr...
Input> Text Service API
Input> Voice Input  > Speach to Text    > verbesserte Voice Input Engine    > I18N, Interpunktion, Fehlererkennung, ...  >...
Input> Input Framewort > Motion Tool Types   > Stylus, Finger, Mouse, Eraser inkl. Button Events > Stylus Input Events   >...
Demo(s)
Make Noise
Media> Camera Features> Media Effects> Audio Remote Control> New Media Codecs
Media> Camera API Features > Zero Shutter Lag Exposure > Continuous Focus > Stabilized Image Zoom > Full-Resolution Snapsh...
Media> Media Effects > Transformation Filter für OpenGL ES 2.0 Textures > Transformation werden durch GPU ausgeführt > Col...
Media> Audio Remote Control > Playback Controls für Multi-Media Apps > Nutzung via RemoteControllClient > Nutzung via Lock...
Media> Audio Remote > In Aktion ...
Media> Audio Remote > In Aktion ...                audioManager.                       registerMediaButtonEventReceiver   ...
Media> New Media Codecs > Unterstützung weiterer Media Codecs   > WebP für High-Quality komprimierte Bilder   > VP8 Video ...
Demo(s)
Lars Röwekamp | CIO New Technologies                                @mobileLarson                              @_openKnowl...
Upcoming SlideShare
Loading in …5
×

Android 4 - Under the hood

613
-1

Published on

Speaker: Lars Röwekamp auf der MobileTechCon 2012 in Frankurt am Main

Android 4 wird häufig mit der lang ersehnten Angleichung des UI APIs für Smartphones und Tablet PCs gleichgesetzt. Dabei hat die aktuelle Android Version deutlich mehr zu bieten: Social Media API, Visual Voice Mail, Low-Level Video Streaming, Android Beam für NFC und Wifi Direct sind nur einige der neuen Möglichkeiten. Die Session gibt einen Einblick in die neuen Features und zeigt an praktischen Beispielen, wie diese zum Einsatz kommen können.

Published in: Technology, Education
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
613
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Android 4 - Under the hood

  1. 1. Lars Röwekamp | CIO New Technologies @mobileLarson @_openKnowledgeANDROID 4under the hood
  2. 2. User Interface
  3. 3. Social
  4. 4. Social Sharing
  5. 5. be
  6. 6. beconnected
  7. 7. Gimme
  8. 8. Gimme Input
  9. 9. Make
  10. 10. Make Noise
  11. 11. User Interface
  12. 12. UI eXtended> Fragments> Loaders> Sorry, not Version 4.x
  13. 13. UI eXtendedFragments
  14. 14. UI eXtended> Multi-Pane UI
  15. 15. UI eXtended> Multi-Pane UI > UI Fragments als „Building Blocks“ > UI Activity Layout als „Block Assembler“ > UI Activity Class als „Block Assembler Logic“ > UI Ressources als „Switch“
  16. 16. UI eXtended Was ist ein> Multi-Pane UI > UI Fragments als „Building Blocks“ Fragment? > UI Activity Layout als „Block Assembler“ > UI Activity Class als „Block Assembler Logic“ > UI Ressources als „Switch“
  17. 17. UI eXtended> Fragment > Activity Modul a.k.a. Sub Activity > inkl. eigener UI > inkl. eigenem Lifecycle > benötigt immer eine umliegende Activity > Lifecycle passt sich Activity-Lifecycle an
  18. 18. UI eXtended> Fragments & Resources > Size: small, normal, large, xlarge > Density: ldpi, mdpi, hdpi, xhdpi > Orientation: landscape, portrait > Designation: sw, w, h, ...dp
  19. 19. UI eXtended> Fragments & Resources > Size: small, normal, large, xlarge Deprecated > Density: ldpi, mdpi, hdpi, xhdpi > Orientation: landscape, portrait > Designation: sw, w, h, ...dp Added
  20. 20. UI eXtendedOk, aber wie> Fragments & Resources spielt das > Size: small, normal, large, xlarge Deprecated > Density: ldpi, mdpi, hdpi, xhdpi > Orientation: landscape, portraitzusammen? > Designation: sw, w, h, ...dp Added
  21. 21. UI eXtended> Fragments in Action
  22. 22. UI eXtended> Fragments in Action
  23. 23. UI eXtended > Fragments in Action > Starte MainActivity > Screensize Smartphone > Orientierung Portrait 1) > Layout aus /res/layout > Fragment A > Bei Selektion schicke Intent „Details“ > Zeige DetailsActivity mit Fragment B1) Standardlayout
  24. 24. UI eXtended > Fragments in Action > Starte DetailsActivity > Screensize Smartphone > Orientierung Portrait 1) > Layout aus /res/layout > Fragment B1) Standardlayout
  25. 25. UI eXtended > Fragments in Action > Starte MainActivity > Screensize Tablet > Orientierung Landscape 1) > Layout aus /res/layout-sw600dp > Fragment A und B > Bei Selektion aktualisiere B1) Layout für: smalest witdh 600dp = 10“ Tablet
  26. 26. UI eXtended> Fragments Modus-Check // MainActivity: Check, if detail fragment is visible @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ... DetailFragment frag = (DetailFragment) getFragmentManager() .findFragmentById(R.id.detail_fragment); if (frag != null) mDualPane = true; }
  27. 27. UI eXtended> Fragments Modus-Weiche // MainActivity: Call detail for selected list item @Override public void onItemSelected(int category, int pos) { if (!mDualPane) { Intent i = new Intent(this, DetailActivity.class); startActivity(i); // Not shown: i.putExtra(...) } else { DetailFragment frag = (ContentFragment) getFragmentManager() .findFragmentById(R.id.detail_fragment); frag.updateContent(category, pos); } }
  28. 28. UI eXtended> Fragments Special Features > Transaktionssteuerung via FragmentTransaction > insert(), replace(), delete() via FragmentManager > addToBackStack() erlaubt Verwaltung > Back-Stack erlaubt Navigation via „Back-Button“
  29. 29. UI eXtended> Fragments Special Features // Using Fragments and FragmentTransactions Fragment newFragment = new ExampleFragment(); FragmentTransaction transaction = getFragmentManager().beginTransaction(); // Replace, and add the transaction to the back stack transaction.replace(R.id.fragment, newFragment); transaction.addToBackStack(null); // Commit the transaction transaction.commit();
  30. 30. UI eXtendedLoader
  31. 31. UI eXtended> Loader > asynchrones Laden von Daten > verfügbar in Activities und Fragments > Content-Change-Monitoring der Datensource > Reconnection zu vorheriger Position > CursorLoader (ready to use für ContentProvider) > Loader oder AsyncTaskLoader
  32. 32. UI eXtended
  33. 33. UI eXtended
  34. 34. UI eXtended
  35. 35. UI eXtended> Loader // Activity implementing Loader Callbacks public class MyActivity extends Activity implements LoaderManager.LoaderCallback<Cursor> { @Override public void onCreate(Bundle savedInstanceState) {! ! super.onCreate(savedInstanceState); ... adapter = new SimpleCursorAdapter(...) setListAdapter(adapter) getLoaderManager().initLoader(0, null, this); } ...}
  36. 36. UI eXtended> Loader // Activity implementing Loader Callbacks public class MyActivity extends Activity implements LoaderManager.LoaderCallback<Cursor> { ... ! // loader was created and is ready to work public Loader<Cursor> onCreateLoader(int id, Bundle args){ // set content provider query URI etc. ... // access content provider return new CursorLoader(this, cpQueryUri, projection, where, whereArgs, sortOrder); } ...}
  37. 37. UI eXtended> Loader // Activity implementing Loader Callbacks public class MyActivity extends Activity implements LoaderManager.LoaderCallback<Cursor> { ... ! // loader finished loading - data is available public void onLoadFinished(Loader<Cursor> l, Cursor c){ adapter.swapCursor(c); } // loader was reseted - its data is unavailable public void onLoaderReset(Loader<Cursor> l){ adapter.swapCursor(null); }}
  38. 38. UI eXtendedSorry, not 4.x
  39. 39. UI eXtended> Sorry, not Version 4.x > WTH? > No problemo! > Android Support Library > a.k.a. Android Compability Library > ab Version 1.6+
  40. 40. UI eXtended
  41. 41. UI eXtended„Und was ist mit dem ActionBar?“
  42. 42. UI eXtended
  43. 43. Demo(s)
  44. 44. Social Sharing
  45. 45. Sharing> Social API> Calendar API> Visual Voicemail API
  46. 46. SharingSocial API
  47. 47. Sharing„With ICS, we set out to buildsoftware that supports emotionalconnections between humansand the devices they carry.“
  48. 48. Sharing> Social API > Speichern/teilen von User Contacts und Content > letzte Aktivitäten, Photos, eMails, Texte, ... > Andere Apps/Social Networks integrierbar > Google+, Facebook, Twitter, Homemade > User Permissions notwendig > Peoples App als Referenz
  49. 49. Sharing> Social API > Idee 1: prominentere Darstellung der Kontakte > Idee 2: prominentere Darstellung der Aktivitäten
  50. 50. Sharing> Social API > Idee 1: prominentere Darstellung der Kontakte > Idee 2: prominentere Darstellung der Aktivitäten
  51. 51. Sharing> Social API > Contact > Raw Contact > Data Row > Sync Adapter > Update Stream
  52. 52. Sharing > Social API > Contact > Raw Contact > Data Row > Sync Adapter > Update StreamRawContacts.ACCOUNT_NAMERawContacts.ACCOUNT_TYPEStructuredName.DISPLAY_NAME
  53. 53. Sharing > Social API > Contact > Raw Contact > Data Row > Sync Adapter > Update Stream > Recent Activities?RawContacts.ACCOUNT_NAMERawContacts.ACCOUNT_TYPEStructuredName.DISPLAY_NAME
  54. 54. Sharing READ-ONLY!> Tables READ-WRITE! READ-WRITE!
  55. 55. Sharing > Table Relations
  56. 56. Sharing > Table Relations
  57. 57. Sharing> Data Structure
  58. 58. Sharing> Data Structure
  59. 59. Sharing> Connection hinzufügen <!-- sync account description --> <ContactsAccountType   xmlns:android="http://schemas.android.com/..." <!-- invite to add connection -->   inviteContactActivity= "com.example.activities.InviteContactActivity"  inviteContactActionLabel= "@string/invite_action_label"> <!-- Data type declaration --> ... </ContactsAccountType> Sync Adapter Config: ready for „INVITE_CONTACT“ Intents
  60. 60. Sharing> SyncAdapter
  61. 61. Sharing> SyncAdapter
  62. 62. Sharing> Social API > Contact > Raw Contact > Data Row > Sync Adapter > Update Stream (seit API 15+)
  63. 63. Sharing> Social API > Contact > Raw Contact > Data Row > Sync Adapter > Update Stream (seit API 15+)
  64. 64. Sharing> Add Stream Item // add a stream item to an existing raw contact private void addContactStreamItem(Context context, long rawContactId, String text, String comments, long timestamp, String accountName, String accountType){  ContentValues values = new ContentValues();  values.put(StreamItems.RAW_CONTACT_ID, rawContactId);  values.put(StreamItems.TEXT, "Me at the MTC 2012");  values.put(StreamItems.TIMESTAMP, timestamp);  values.put(StreamItems.COMMENTS, comments);  values.put(StreamItems.ACCOUNT_NAME, accountName);  values.put(StreamItems.ACCOUNT_TYPE, accountType);  context.getContentResolver() .insert(StreamItems.CONTENT_URI, values); }
  65. 65. Sharing> Click Stream Item <ContactsAccountType   xmlns:android="http://schemas.android.com/..." <!-- Click on Item Stream -->   viewStreamItemActivity= "com.example.activities.ViewStreamItemActivity” <!-- Click on Item Stream Photo -->   viewStreamItemPhotoActivity= "com.example.activities.ViewStreamItemPhotoActivity"> <!-- Data type declaration --> ... </ContactsAccountType>
  66. 66. Demo(s)
  67. 67. SharingCalendar API
  68. 68. Sharing> Calendar API > Kalenderdienste in eigene Apps integrieren Na > Permissions vorausgesetzt ... > Erzeugen/verwalten von Kalendereinträgen > Dates, Teilnehmer, Alerts, Reminder, ... endlich! > Visualisierung via vorgegebener/eigener UIs > Event Verwaltung, Alerts, Reminders > Calendar App als Referenz
  69. 69. Sharing> Calendar API > Kalenderdienste in eigene Apps integrieren > Permissions vorausgesetzt ... > Erzeugen/verwalten von Kalendereinträgen > Dates, Teilnehmer, Alerts, Reminder, ... > Visualisierung via vorgegebener/eigener UIs > Event Verwaltung, Alerts, Reminders > Calendar App als Referenz
  70. 70. Sharing > Calendar API
  71. 71. Sharing> Calendar API > CalendarContract.Calendar > je Kalender: Name, Farbe, Sync Info, ... > CalendarContract.Event > je Ereignistyp: Titel, Location, Start-/Endzeit, ... > je Ereignis: CalendarContract.Instance > CalendarContract.Attendees > je Teilnehmer: Type und Status
  72. 72. Sharing> Calendar API > CalendarContract.Reminders > je Reminder: Typ und Zeitpunkt > CalendarContract.ExtendedProperties > Zusatzinformationen für den SyncAdapter > automatisches Cascading Delete > sonst keine Aktion vom Calender Provider
  73. 73. Sharing> Calendar API > In Aktion ... (Quelle: Google Apps Developer Blog)
  74. 74. Sharing> Calendar API // Check for existing calender(s) Uri uri = CalendarContract.Calendars.CONTENT_URI; String[] projection = new String[] {       CalendarContract.Calendars._ID,       CalendarContract.Calendars.ACCOUNT_NAME,       CalendarContract.Calendars.CALENDAR_DISPLAY_NAME,       CalendarContract.Calendars.NAME,       CalendarContract.Calendars.CALENDAR_COLOR }; Cursor  calendarCursor  =  managedQuery(uri,projection,                                                                                  null,  null,  null);
  75. 75. Sharing> Calendar API // Insert an event - permission needed ContentResolver cr = getContentResolver(); ContentValues cv = new ContentValues(); cv.put(CalendarContract.Events.DTSTART, startDateTime); cv.put(CalendarContract.Events.DTEND, endDateTime); cv.put(CalendarContract.Events.TITLE, "MTC 2012"); cv.put(CalendarContract.Events.DESCRIPTION, "MTC ..."); cv.put(CalendarContract.Events.CALENDAR_ID, 3); Uri uri = cr.insert( CalendarContract.Events.CONTENT_URI, cv); // Retrieve ID for new event String eventID = uri.getLastPathSegment();
  76. 76. Sharing> Calendar API // Insert an event via intent - no permission needed      Intent  intent  =  new  Intent(Intent.ACTION_INSERT)          .setType("vnd.android.cursor.item/event")          .putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME,  ...)          .putExtra(CalendarContract.EXTRA_EVENT_END_TIME,  ...)                              .putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY  ,  false)            .putExtra(Events.TITLE,  "MTC  2012")          .putExtra(Events.DESCRIPTION,  "MTC  2012  Android  Special  Day")              ...      startActivity(intent);
  77. 77. SharingVisual Voice Mail
  78. 78. Sharing> Visual Voice Mail API > Integrieren von „Voice Mails“ > Nachrichten, Aufnahmen, Sound-Dateien ... > Voicemail Content Provider als Bindeglied > eigene App(s) > Phone App via Call Log > Phone App als Referenz
  79. 79. Sharing> Visual Voice Mail API
  80. 80. Demo(s)
  81. 81. beconnected
  82. 82. Connectivity> NFC Beam> Wifi Direct> Bluetooth HDP
  83. 83. ConnectivityNFC Beam
  84. 84. Connectivity> NFC Beam (a.k.a. NDEF Push) > Datenaustausch zwischen 2 NFC Devices > Apps, Contacts, Music, Videos, Game Scores ... > System liefert UI und Low-Level NFC Support > Daten werden ausgetauscht > Text, Uri, „Unknown“ > Daten lösen je nach Typ Aktion aus > Google Play startet auto. falls App nicht vorhanden
  85. 85. Connectivity
  86. 86. Connectivity> NFC Beam > Sender > „Beam Application“ im Vordergrund > android.permission.NFC > Empfänger > muss „unlocked“ sein > Intent-Filter für „korrekten“ Content
  87. 87. Connectivity> NFC Sender - „static Message“ NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(); // set static payload nfcAdapter.setNdefPushMessage(nfcMessage, this); ...
  88. 88. Connectivity> NFC Sender - „dynamic Message“ NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(); // set payload just in time of sending nfcAdapter.setNdefPushMessageCallback ( public NdefMessage createNdefMessage(NfcEvent event) { new CreateNdefMessageCallback() { long now = ... String payload = “Beam me up at “ + now; NdefMessage message = createNfcMessage(payload); return message; } }, this); ...
  89. 89. Connectivity> NFC Sender - NdefMessage // create NdefMessage for beaming private NdefMessage createNfcMessage(String msg) { String mimeType = “application/de.openknowledge.nfc“; byte[] mimeBytes = mimeType.getBytes(...); return nfcMessage = new NfcMessage( new NdfeRecord[] { // 1. Record with payload ... // 2. Android Application Record ... } };
  90. 90. Connectivity> NFC Receiver <intent-filter> <action android:name=“android.nfc.action.NDEF_DICSOVERED“/> <category android:name=“android.intent.DEFAULT“/> <data android:mimeTye=“application/de.openknowledge.nfc“/> </intent-filter>
  91. 91. Connectivity> NFC Receiver // Beam data is delivered via intent EXTRA DATA Parcelable[] messages = intent.getPacelableArrayExtra( NfcAdapter.EXTRA_NDEF_MESSAGES); NdefMessage message = (NdfMessage)messages[0]; NdefRecord record = message.getRecords()[0]; String payload = new String(record.getPayload());
  92. 92. ConnectivityWifi Direct
  93. 93. Connectivity> Wifi Direct > Peer-to-Peer Connections > Peer Discovery, Request und Connecting > WifiP2pManager als Main Player > Listener und Intents als Helper > Google Play Filter > uses-feature „android.hardware.wifi.direct“
  94. 94. Connectivity> Wifi Direct
  95. 95. Connectivity> Wifi Direct // required permission settings <uses-sdk android:minSdkVersion="14" /> <uses-permission android:name= "android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name= "android.permission.CHANGE_WIFI_STATE" /> <uses-permission android:name= "android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name= "android.permission.INTERNET" /> <uses-permission android:name= "android.permission.ACCESS_NETWORK_STATE" />
  96. 96. Demo(s)
  97. 97. Gimme Input
  98. 98. Input> Text Service API> Voice Input> Input Framework
  99. 99. Input> Text Service API > Abfrage von Textservices > Dictionaries, Spell Checker für ... > Wortvorschläge, Autokorrekturen, ... > Pluggable Service > unabhängig vom aktiven InputManager > System liefert (verbesserte) Default Services > können auch Eigenentwicklungen sein
  100. 100. Input> Text Service API
  101. 101. Input> Voice Input > Speach to Text > verbesserte Voice Input Engine > I18N, Interpunktion, Fehlererkennung, ... > Text to Speach > Neues Framework zur Textumwandlung
  102. 102. Input> Input Framewort > Motion Tool Types > Stylus, Finger, Mouse, Eraser inkl. Button Events > Stylus Input Events > Tilt, Distance Axes, Pressure, Moition > Hover Events für View Klasse > onHoverListener für Enter, Exit, Move
  103. 103. Demo(s)
  104. 104. Make Noise
  105. 105. Media> Camera Features> Media Effects> Audio Remote Control> New Media Codecs
  106. 106. Media> Camera API Features > Zero Shutter Lag Exposure > Continuous Focus > Stabilized Image Zoom > Full-Resolution Snapshot vom Video > Custom Regions innerhalb von Previews > Face Detection Service liefert Koordinaten
  107. 107. Media> Media Effects > Transformation Filter für OpenGL ES 2.0 Textures > Transformation werden durch GPU ausgeführt > Color Level & Brightness > Hintergründe > Linsenverzerrung > Bildschärfe, -ausschnitte, -rotation
  108. 108. Media> Audio Remote Control > Playback Controls für Multi-Media Apps > Nutzung via RemoteControllClient > Nutzung via Lock Screen > App wird für Media Button Events registriert > App managed Play State > App liefert MetaData an Remote Control
  109. 109. Media> Audio Remote > In Aktion ...
  110. 110. Media> Audio Remote > In Aktion ... audioManager. registerMediaButtonEventReceiver MyMediaButtonEventReceiver (extends BroadcastReceiver) MyRemoteControlClient (extends RemoteControlClient) audioManager. registerRemoteControlClient
  111. 111. Media> New Media Codecs > Unterstützung weiterer Media Codecs > WebP für High-Quality komprimierte Bilder > VP8 Video Streaming > HTTP Live Streaming Protocol V3 > ADTS Container für AAC Inhalte > Matroska Container für Vorbis und VP8
  112. 112. Demo(s)
  113. 113. Lars Röwekamp | CIO New Technologies @mobileLarson @_openKnowledgeANDROID 4under the hood

×