Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lars Röwekamp on Android4

Lars Röwekamp on Android4

More Decks by Enterprise Java User Group Austria

Other Decks in Technology

Transcript

  1. Smartphones 0 Mio 20 Mio 40 Mio 60 Mio 80

    Mio Q1/11 Q2/11 Q3/11 Q4/11 Android Apple Blackberry Windows 7
  2. Fragmentation 22,1 % 57,5 % 14,0 % 3,7 % 1.5

    1.6 2.1 2.2 2.3.x 3.1 3.2 4+ September `12
  3. Building Blocks Activity Service Content Provider Broadcast Receiver > UI

    logic > layout reference > lifecycle callbacks > started by own/other app > loosely coupled > Activity
  4. Building Blocks Activity Service Content Provider Broadcast Receiver > background

    processing > long running operation(s) > remote processes > lifecycle callbacks > started by any „component“ > Service
  5. Building Blocks Activity Service Content Provider Broadcast Receiver > app‘s

    data exporter > CRUD for any kind of data > REST alike access methods > ready-to-go CPs available > accessable by any app > ContentProvider
  6. Building Blocks Activity Service Content Provider Broadcast Receiver > listener

    for broadcast intent* > low-battery, screen-off, ... > app can initiate own BIs* > status bar notifications > selection via intent filter > BroadcastReceiver * system wide events
  7. Building Blocks > intention to do something > activation of

    component > what to do? > which data needed? > return value expected? > Intent Intent
  8. Building Blocks public class MainActivity extends Activity { .... @Override

    public void onCreate(Bundle savedInstanceState) { ! super.onCreate(savedInstanceState); ! setContentView(R.layout.main); } public void onClickMap(View btn) { ! Intent mapViewIntent = new Intent(this, MapViewActivity.class); ! startActivity(mapViewIntent); ! } .... } ... View Event View
  9. Building Blocks Intent Aufruf Intent mapViewIntent = new Intent(this, MapViewActivity.class);

    startActivity(mapViewIntent); ! via Activity Class (MapViewActivity)
  10. Building Blocks Intent intent = new Intent(this, Intent.ACTION_SEND); intent.putExtra(EXTRA_EMAIL, emailAddress);

    intent.putExtra(EXTRA_SUBJECT, emailSubject); intent.putExtra(EXTRA_TEXT, emailText); startActivity(intent); ! via Intent Action (ACTION_SEND) Intent Aufruf
  11. Action Bar App Icon View Control Action Btn Action Overflow

    „Where am I?“ „What can I see?“ „What can I do?“
  12. Resources public class MainActivity extends Activity { .... @Override public

    void onCreate(Bundle savedInstanceState) { ! super.onCreate(savedInstanceState); ! setContentView(R.layout.main); } .... } ... smallest width 600 device independent pixel? res/layout res/layout-sw600dp
  13. Android SDK > Application Framework > Dalvik Virtual Machine >

    Integrated Browser > SQLite Database > Telephony, Bluetooth, EDGE, 3G & Wifi > Camera, Compass, GPS, Accelerometer > UI Controls, Widgets, Map
  14. Android Tooling > Eclipse/Idea + PlugIn > Virtual Device Manager

    > Emulator(s) > UI Designer > Debugger, also on device > Test Frameworks > Deployment Support (Emulator & Device) > Publishing & Signing
  15. Keep in Mind Yes, size matters Expect the unexpected Do

    not reinvent the wheel Less is more User Experience counts
  16. Keep in Mind Yes, size matters Expect the unexpected Do

    not reinvent the wheel Less is more User Experience counts