SlideShare uma empresa Scribd logo
1 de 71
Android SDK Dominik Gätjens Thomas Maier
Dominik Gätjens ,[object Object],[object Object],[object Object],[object Object],[object Object]
Thomas Maier ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Was ist Android? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Features ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Einschränkungen ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Development Tools SDK Emulator Eclipse
Development Tools - SDK ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Development Tools - SDK ,[object Object]
Development Tools - Emulator ,[object Object]
Development Tools - Emulator ,[object Object]
Development Tools - Eclipse ,[object Object]
Development Tools - Eclipse ,[object Object]
Development Tools - Eclipse ,[object Object]
Development Tools - Eclipse ,[object Object]
Development Tools - Eclipse ,[object Object]
Development Tools - Eclipse ,[object Object]
Architektur
Architektur
Architektur - Components ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Components - Activity ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Components - Activity
Components - Service ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Components - Service
Components - Broadcast Receiver ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Intents ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Explizite Intents ,[object Object],[object Object]
Implizite Intents ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Intent Filter <activity android:name=&quot;.MyActivity&quot;>     <intent-filter>         <action android:name=&quot;android.intent.action.PICK&quot;/>         <data android:path=&quot;de/myPath&quot;                 android:scheme=&quot;content&quot;/>     </intent-filter> </activity>
Resources
Resources - Layout <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <LinearLayout xmlns:android=                  &quot;http://schemas.android.com/apk/res/android&quot;               android:layout_width=&quot;fill_parent&quot;                android:layout_height=&quot;fill_parent&quot;                android:orientation=&quot;vertical&quot; >     <TextView android:id=&quot;@+id/mytextview&quot;               android:layout_width=&quot;wrap_content&quot;               android:layout_height=&quot;wrap_content&quot;               android:text=&quot;Hello World&quot; /> </LinearLayout>
Resources - Layout
Resources - Values ...  <TextView android:id=&quot;@+id/mytextview&quot;               android:layout_width=&quot;wrap_content&quot;               android:layout_height=&quot;wrap_content&quot;               android:text=&quot;@string/hello&quot;                /> ...  <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <resources>     <string name=&quot;hello&quot;>Hello World</string>  </resources>
Resources - Values
Resources - Values ...  <TextView android:id=&quot;@+id/mytextview&quot;               android:layout_width=&quot;wrap_content&quot;               android:layout_height=&quot;wrap_content&quot;               android:text=&quot;@string/hello&quot;                android:textColor=&quot;@color/translucent_red&quot;                android:textSize=&quot;@dimen/hello_size&quot;                 /> ...  <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <resources>     <string name=&quot;hello&quot;>Hello <b>World</b></string>      <color name=&quot;translucent_red&quot;>#80ff0000</color>      <dimen name=&quot;hello_size&quot;>16px</dimen>    </resources>
Resources - Drawables Verwendung mit   Resources.getDrawable(R.drawable.example) ,[object Object],Beispiel:   res/drawable/example.jpg ,[object Object],<resources>     <drawable name=&quot;solid_red&quot;>#f00</drawable> </resources> <TextView android:layout_width=&quot;fill_parent&quot;           android:layout_height=&quot;wrap_content&quot;           android:textAlign=&quot;center&quot;           android:background=&quot;@drawable/solid_red&quot;/>
Resources - AndroidManifest.xml ,[object Object]
Resources - AndroidManifest.xml ,[object Object]
Resources - AndroidManifest.xml ,[object Object]
GUI-Elemente
GUI-Elemente ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GUI-Elemente ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GUI-Elemente ,[object Object],[object Object],[object Object]
GUI-Elemente ,[object Object],[object Object]
GUI-Elemente ,[object Object],[object Object]
GUI-Elemente ,[object Object],... <RelativeLayout...      <Button ...              android:id=&quot;@+id/myButton1&quot;              android:layout_centerInParent=&quot;true&quot;              ...       />      <Button ...               android:id=&quot;@+id/myButton2&quot;              android:layout_toRightOf=&quot;@+id/myButton1&quot;              android:layout_alignTop=&quot;@id/myButton1&quot;      /> </RelativeLayout> ...
GUI-Elemente ,[object Object]
GUI-Elemente ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GUI-Elemente ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GUI-Elemente ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<Button ...      android:layout_width=&quot;wrap_content&quot;      android:layout_height=&quot;wrap_content&quot;      android:textColor=&quot;#ff0000&quot;        android:id=&quot;@+id/Button1&quot;      android:text=&quot;Button&quot;      ...  />      <TextView ...      android:layout_width=&quot;fill_parent&quot;      android:layout_height=&quot;wrap_content&quot;      android:text=&quot;@string/content&quot;      android:id=&quot;@+id/Text1&quot;      android:textSize=&quot;14dip&quot;      ...  /> private Button button1; ...   button1 = (Button) findViewById(R.id.Button1); ... button1.setOnClickListener(new OnClickListener() {      public void onClick(View v) {         doAction();     } }); ... private TextView text1; ...   text1 = (TextView) findViewById(R.id.Text1); ... text1.setText(newText); ...
GUI-Elemente ,[object Object],public boolean onCreateOptionsMenu(Menu menu) {     menu.add(0, 1, 0, &quot;Item1&quot;);     menu.add(0, 2, 0, &quot;Item2&quot;);     return true; } public boolean onOptionsItemSelected(MenuItem item) {     switch (item.getItemId()) {     case 1:         action1();         return true;     case 2:         action2();         return true;     }     return false; }
GUI-Elemente ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
API SMS Location Map Sensors
SMS senden ,[object Object],[object Object],[object Object],[object Object],[object Object]
SMS empfangen ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<receiver android:name=&quot;SmsReceiver&quot;> <intent-filter> <action android:name=&quot;android.provider.Telephony.SMS_RECEIVED&quot; /> </intent-filter> </receiver>
Maps <LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;     android:id=&quot;@+id/main&quot;     android:layout_width=&quot;fill_parent&quot;      android:layout_height=&quot;fill_parent&quot;>     <com.google.android.maps.MapView          android:id=&quot;@+id/map&quot;          android:layout_width=&quot;fill_parent&quot;           android:layout_height=&quot;fill_parent&quot;         android:enabled=&quot;true&quot;         android:clickable=&quot;true&quot;         android:apiKey=&quot;0yPsX1Tb93ThKLOA1zT5GtfuzoSYOP9C9G1Ojzg&quot;         />             </LinearLayout> ,[object Object],http://code.google.com/intl/de-DE/android/maps-api-signup.html $ keytool -list -keystore ~/.android/debug.keystore
Maps public class MyMapView extends MapActivity {      private MapView map;     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.maplayout);          map =(MapView) findViewById(R.id.map);          map.setBuiltInZoomControls(true);          MapController mapController = map.getController();         GeoPoint geoPoint = new GeoPoint(coordinates[0],coordinates[1]);         mapController.setCenter(geoPoint);         mapController.setZoom(14);        }     protected boolean isRouteDisplayed() {           return false;      } }
Location ,[object Object],[object Object],[object Object],[object Object],[object Object]
Sensors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dateisystem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SQLite Datenbank erstellen public class SmsDB extends SQLiteOpenHelper {      private static final String DATENBANK_NAME = &quot;sms.db&quot;;      private static final int DATENBANK_V = 1;         public SmsDB (Context context) {          super( context, DATENBANK_NAME , null, DATENBANK_V );      }       public void onCreate(SQLiteDatabase db) {          db.execSQL(&quot;CREATE TABLE ...&quot;);      }         public void onUpgrade (SQLiteDatabase db,int oldV ,int newV){          db.execSQL(&quot;DROP TABLE ...&quot;);          onCreate(db);      }  }
SQLite Abfrage Cursor cursor = db.query(      false, // distinct     DATABASE_TABLE, // TABLE     new String[] {KEY_SMS, KEY_NR}, // SELECT      KEY_NR+&quot; = ?&quot;, // WHERE-Bedingung      new String[] {&quot;0171 23456&quot;}, // Parameter für WHERE      null, // GROUP BY      null, // HAVING      null, // ORDER BY      null // LIMIT  );
SQLite Abfrage 2 ,[object Object],[object Object]
SQLite Abfrage 3 startManagingCursor(cursor); if(cursor.moveToFirst()){       String foo = cursor.getString(0);      display(foo); } ContentValues initialValues = new ContentValues(); initialValues.put(KEY_SMS, &quot;Hallo, Welt&quot;); initialValues.put(KEY_NR, &quot;0171 123456&quot;); db.insert(DATABASE_TABLE, null, initialValues);
Security
Security ,[object Object],[object Object],[object Object]
Security  - Permissions ,[object Object],[object Object],<uses-permission android:name=&quot;android.permission.RECEIVE_SMS&quot; />
Security  - Permissions android.permission.INTERNET   android.permission.BLUETOOTH   android.permission.READ_CONTACTS   android.permission.SEND_SMS   android.permission.VIBRATE
Literatur ,[object Object],[object Object],[object Object],[object Object]
Android SDK Dominik Gätjens Thomas Maier Fragen? Vielen Dank für die Aufmerksamkeit :-)

Mais conteúdo relacionado

Destaque

Feliz dia del trabajador
Feliz dia del trabajadorFeliz dia del trabajador
Feliz dia del trabajadorcesarx-201
 
Noticia sobre el Taller "cómo vender más con Internet" organizada por AJE Val...
Noticia sobre el Taller "cómo vender más con Internet" organizada por AJE Val...Noticia sobre el Taller "cómo vender más con Internet" organizada por AJE Val...
Noticia sobre el Taller "cómo vender más con Internet" organizada por AJE Val...Inicia Marketing
 
Social Learning Networks and Social Bookmarking
Social Learning Networks and Social BookmarkingSocial Learning Networks and Social Bookmarking
Social Learning Networks and Social BookmarkingSteve Mackenzie
 
Revista Culturism si Fitness nr. 224 (3/2013)
Revista Culturism si Fitness nr. 224 (3/2013)Revista Culturism si Fitness nr. 224 (3/2013)
Revista Culturism si Fitness nr. 224 (3/2013)Redis Nutritie
 
EMIN SG - Proyecto Pilas Geopier Condominio Monte Castello
EMIN SG - Proyecto Pilas Geopier Condominio Monte CastelloEMIN SG - Proyecto Pilas Geopier Condominio Monte Castello
EMIN SG - Proyecto Pilas Geopier Condominio Monte CastelloEMIN Sistemas Geotecnicos
 
Pit and the Pendulum: Managing the Accelerating Pace of Technological Change
Pit and the Pendulum: Managing the Accelerating Pace of Technological Change Pit and the Pendulum: Managing the Accelerating Pace of Technological Change
Pit and the Pendulum: Managing the Accelerating Pace of Technological Change InnoTech
 
Engineering Watch Fellowship Portfolio
Engineering Watch Fellowship PortfolioEngineering Watch Fellowship Portfolio
Engineering Watch Fellowship Portfolioengineeringwatch
 
Focus sur le livre numerique
Focus sur le livre numeriqueFocus sur le livre numerique
Focus sur le livre numeriqueABES
 
Los legionarios romanos
Los legionarios romanosLos legionarios romanos
Los legionarios romanosJorge Vela
 
Cenizas volantes (c
Cenizas  volantes (cCenizas  volantes (c
Cenizas volantes (chugoandbety
 
Kraken js at paypal
Kraken js at paypalKraken js at paypal
Kraken js at paypalLenny Markus
 

Destaque (20)

Marco teorico ingles terminado
Marco teorico ingles terminadoMarco teorico ingles terminado
Marco teorico ingles terminado
 
Feliz dia del trabajador
Feliz dia del trabajadorFeliz dia del trabajador
Feliz dia del trabajador
 
ABA Headquarterbroschüre
ABA HeadquarterbroschüreABA Headquarterbroschüre
ABA Headquarterbroschüre
 
Estrategias deretail
Estrategias  deretailEstrategias  deretail
Estrategias deretail
 
Noticia sobre el Taller "cómo vender más con Internet" organizada por AJE Val...
Noticia sobre el Taller "cómo vender más con Internet" organizada por AJE Val...Noticia sobre el Taller "cómo vender más con Internet" organizada por AJE Val...
Noticia sobre el Taller "cómo vender más con Internet" organizada por AJE Val...
 
Social Learning Networks and Social Bookmarking
Social Learning Networks and Social BookmarkingSocial Learning Networks and Social Bookmarking
Social Learning Networks and Social Bookmarking
 
Revista Culturism si Fitness nr. 224 (3/2013)
Revista Culturism si Fitness nr. 224 (3/2013)Revista Culturism si Fitness nr. 224 (3/2013)
Revista Culturism si Fitness nr. 224 (3/2013)
 
Arquitecturas de bases de datos distribuidas
Arquitecturas de bases de datos distribuidasArquitecturas de bases de datos distribuidas
Arquitecturas de bases de datos distribuidas
 
Megacast deck
Megacast deckMegacast deck
Megacast deck
 
IPTSP Shohel Shikdar MetroTel
IPTSP Shohel Shikdar MetroTelIPTSP Shohel Shikdar MetroTel
IPTSP Shohel Shikdar MetroTel
 
EMIN SG - Proyecto Pilas Geopier Condominio Monte Castello
EMIN SG - Proyecto Pilas Geopier Condominio Monte CastelloEMIN SG - Proyecto Pilas Geopier Condominio Monte Castello
EMIN SG - Proyecto Pilas Geopier Condominio Monte Castello
 
Pit and the Pendulum: Managing the Accelerating Pace of Technological Change
Pit and the Pendulum: Managing the Accelerating Pace of Technological Change Pit and the Pendulum: Managing the Accelerating Pace of Technological Change
Pit and the Pendulum: Managing the Accelerating Pace of Technological Change
 
Engineering Watch Fellowship Portfolio
Engineering Watch Fellowship PortfolioEngineering Watch Fellowship Portfolio
Engineering Watch Fellowship Portfolio
 
Focus sur le livre numerique
Focus sur le livre numeriqueFocus sur le livre numerique
Focus sur le livre numerique
 
Los legionarios romanos
Los legionarios romanosLos legionarios romanos
Los legionarios romanos
 
Seguridad en Android
Seguridad en AndroidSeguridad en Android
Seguridad en Android
 
Cenizas volantes (c
Cenizas  volantes (cCenizas  volantes (c
Cenizas volantes (c
 
Nikolai malyshev
Nikolai malyshevNikolai malyshev
Nikolai malyshev
 
Presentación
PresentaciónPresentación
Presentación
 
Kraken js at paypal
Kraken js at paypalKraken js at paypal
Kraken js at paypal
 

Semelhante a Android Development

Android Entwicklung (App Entwickler Konferenz 2010 der Telekom)
Android Entwicklung (App Entwickler Konferenz 2010 der Telekom)Android Entwicklung (App Entwickler Konferenz 2010 der Telekom)
Android Entwicklung (App Entwickler Konferenz 2010 der Telekom)greenrobot
 
Einführung in die webOS Programmierung
Einführung in die webOS ProgrammierungEinführung in die webOS Programmierung
Einführung in die webOS ProgrammierungMarkus Leutwyler
 
Android Entwicklung GTUG München 2009
Android Entwicklung GTUG München 2009Android Entwicklung GTUG München 2009
Android Entwicklung GTUG München 2009greenrobot
 
Erstellung von mobilen cross-platform-Apps
Erstellung von mobilen cross-platform-AppsErstellung von mobilen cross-platform-Apps
Erstellung von mobilen cross-platform-AppsRalf Lütke
 
Automatisierung von Windows-Anwendungen
Automatisierung von Windows-AnwendungenAutomatisierung von Windows-Anwendungen
Automatisierung von Windows-AnwendungenAndreas Schreiber
 
Android Apps mit Xamarin entwickeln
Android Apps mit Xamarin entwickelnAndroid Apps mit Xamarin entwickeln
Android Apps mit Xamarin entwickelnAndré Krämer
 
Google Analytics Konferenz 2019_App Tracking_Runa Reno (Booking.com) & Markus...
Google Analytics Konferenz 2019_App Tracking_Runa Reno (Booking.com) & Markus...Google Analytics Konferenz 2019_App Tracking_Runa Reno (Booking.com) & Markus...
Google Analytics Konferenz 2019_App Tracking_Runa Reno (Booking.com) & Markus...e-dialog GmbH
 
Große Applikationen mit AngularJS
Große Applikationen mit AngularJSGroße Applikationen mit AngularJS
Große Applikationen mit AngularJSSebastian Springer
 
Microsoft Bot Framework (.NET Edition)
Microsoft Bot Framework (.NET Edition)Microsoft Bot Framework (.NET Edition)
Microsoft Bot Framework (.NET Edition)Jens Siebert
 
App Entwicklung mit Appcelerator Titanium - MTC 2014
App Entwicklung mit Appcelerator Titanium - MTC 2014App Entwicklung mit Appcelerator Titanium - MTC 2014
App Entwicklung mit Appcelerator Titanium - MTC 2014Marcel Pociot
 
Niemals nach Mitternacht füttern - Grüne Roboter überall!
Niemals nach Mitternacht füttern - Grüne Roboter überall!Niemals nach Mitternacht füttern - Grüne Roboter überall!
Niemals nach Mitternacht füttern - Grüne Roboter überall!inovex GmbH
 
Mit jQTouch auf's iPhone & Android
Mit jQTouch auf's iPhone & AndroidMit jQTouch auf's iPhone & Android
Mit jQTouch auf's iPhone & AndroidBjörn Wibben
 
SEO Produktspezifikation für RWD
SEO Produktspezifikation für RWDSEO Produktspezifikation für RWD
SEO Produktspezifikation für RWDConny Stier
 
Mobile Webentwicklung mit HTML5
Mobile Webentwicklung mit HTML5Mobile Webentwicklung mit HTML5
Mobile Webentwicklung mit HTML5kkramhoeft
 

Semelhante a Android Development (20)

Android Entwicklung (App Entwickler Konferenz 2010 der Telekom)
Android Entwicklung (App Entwickler Konferenz 2010 der Telekom)Android Entwicklung (App Entwickler Konferenz 2010 der Telekom)
Android Entwicklung (App Entwickler Konferenz 2010 der Telekom)
 
Einführung in die webOS Programmierung
Einführung in die webOS ProgrammierungEinführung in die webOS Programmierung
Einführung in die webOS Programmierung
 
Android Entwicklung GTUG München 2009
Android Entwicklung GTUG München 2009Android Entwicklung GTUG München 2009
Android Entwicklung GTUG München 2009
 
Erstellung von mobilen cross-platform-Apps
Erstellung von mobilen cross-platform-AppsErstellung von mobilen cross-platform-Apps
Erstellung von mobilen cross-platform-Apps
 
Was ist neu in .NET 4.5?
Was ist neu in .NET 4.5?Was ist neu in .NET 4.5?
Was ist neu in .NET 4.5?
 
Automatisierung von Windows-Anwendungen
Automatisierung von Windows-AnwendungenAutomatisierung von Windows-Anwendungen
Automatisierung von Windows-Anwendungen
 
Android Apps mit Xamarin entwickeln
Android Apps mit Xamarin entwickelnAndroid Apps mit Xamarin entwickeln
Android Apps mit Xamarin entwickeln
 
Google Analytics Konferenz 2019_App Tracking_Runa Reno (Booking.com) & Markus...
Google Analytics Konferenz 2019_App Tracking_Runa Reno (Booking.com) & Markus...Google Analytics Konferenz 2019_App Tracking_Runa Reno (Booking.com) & Markus...
Google Analytics Konferenz 2019_App Tracking_Runa Reno (Booking.com) & Markus...
 
Große Applikationen mit AngularJS
Große Applikationen mit AngularJSGroße Applikationen mit AngularJS
Große Applikationen mit AngularJS
 
Microsoft Bot Framework (.NET Edition)
Microsoft Bot Framework (.NET Edition)Microsoft Bot Framework (.NET Edition)
Microsoft Bot Framework (.NET Edition)
 
Wicket Kurzübersicht
Wicket KurzübersichtWicket Kurzübersicht
Wicket Kurzübersicht
 
App Entwicklung mit Appcelerator Titanium - MTC 2014
App Entwicklung mit Appcelerator Titanium - MTC 2014App Entwicklung mit Appcelerator Titanium - MTC 2014
App Entwicklung mit Appcelerator Titanium - MTC 2014
 
Niemals nach Mitternacht füttern - Grüne Roboter überall!
Niemals nach Mitternacht füttern - Grüne Roboter überall!Niemals nach Mitternacht füttern - Grüne Roboter überall!
Niemals nach Mitternacht füttern - Grüne Roboter überall!
 
Ionic 3
Ionic 3Ionic 3
Ionic 3
 
Mit jQTouch auf's iPhone & Android
Mit jQTouch auf's iPhone & AndroidMit jQTouch auf's iPhone & Android
Mit jQTouch auf's iPhone & Android
 
MVVM Pattern
MVVM Pattern MVVM Pattern
MVVM Pattern
 
Interactive Publishing Suite
Interactive Publishing SuiteInteractive Publishing Suite
Interactive Publishing Suite
 
Angular2
Angular2Angular2
Angular2
 
SEO Produktspezifikation für RWD
SEO Produktspezifikation für RWDSEO Produktspezifikation für RWD
SEO Produktspezifikation für RWD
 
Mobile Webentwicklung mit HTML5
Mobile Webentwicklung mit HTML5Mobile Webentwicklung mit HTML5
Mobile Webentwicklung mit HTML5
 

Android Development

  • 1. Android SDK Dominik Gätjens Thomas Maier
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Development Tools SDK Emulator Eclipse
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 21.
  • 22.
  • 24.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. Intent Filter <activity android:name=&quot;.MyActivity&quot;>     <intent-filter>         <action android:name=&quot;android.intent.action.PICK&quot;/>         <data android:path=&quot;de/myPath&quot;                android:scheme=&quot;content&quot;/>     </intent-filter> </activity>
  • 32. Resources - Layout <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <LinearLayout xmlns:android=                  &quot;http://schemas.android.com/apk/res/android&quot;               android:layout_width=&quot;fill_parent&quot;               android:layout_height=&quot;fill_parent&quot;               android:orientation=&quot;vertical&quot; >     <TextView android:id=&quot;@+id/mytextview&quot;               android:layout_width=&quot;wrap_content&quot;               android:layout_height=&quot;wrap_content&quot;               android:text=&quot;Hello World&quot; /> </LinearLayout>
  • 34. Resources - Values ... <TextView android:id=&quot;@+id/mytextview&quot;               android:layout_width=&quot;wrap_content&quot;               android:layout_height=&quot;wrap_content&quot;               android:text=&quot;@string/hello&quot;               /> ... <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <resources>     <string name=&quot;hello&quot;>Hello World</string> </resources>
  • 36. Resources - Values ... <TextView android:id=&quot;@+id/mytextview&quot;               android:layout_width=&quot;wrap_content&quot;               android:layout_height=&quot;wrap_content&quot;               android:text=&quot;@string/hello&quot;               android:textColor=&quot;@color/translucent_red&quot;               android:textSize=&quot;@dimen/hello_size&quot;               /> ... <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <resources>     <string name=&quot;hello&quot;>Hello <b>World</b></string>      <color name=&quot;translucent_red&quot;>#80ff0000</color>      <dimen name=&quot;hello_size&quot;>16px</dimen>   </resources>
  • 37.
  • 38.
  • 39.
  • 40.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54. API SMS Location Map Sensors
  • 55.
  • 56.
  • 57.
  • 58. Maps public class MyMapView extends MapActivity {      private MapView map;     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.maplayout);         map =(MapView) findViewById(R.id.map);          map.setBuiltInZoomControls(true);          MapController mapController = map.getController();         GeoPoint geoPoint = new GeoPoint(coordinates[0],coordinates[1]);         mapController.setCenter(geoPoint);         mapController.setZoom(14);       }     protected boolean isRouteDisplayed() {           return false;      } }
  • 59.
  • 60.
  • 61.
  • 62. SQLite Datenbank erstellen public class SmsDB extends SQLiteOpenHelper {     private static final String DATENBANK_NAME = &quot;sms.db&quot;;     private static final int DATENBANK_V = 1;        public SmsDB (Context context) {         super( context, DATENBANK_NAME , null, DATENBANK_V );     }      public void onCreate(SQLiteDatabase db) {         db.execSQL(&quot;CREATE TABLE ...&quot;);     }        public void onUpgrade (SQLiteDatabase db,int oldV ,int newV){         db.execSQL(&quot;DROP TABLE ...&quot;);         onCreate(db);     } }
  • 63. SQLite Abfrage Cursor cursor = db.query(     false, // distinct     DATABASE_TABLE, // TABLE     new String[] {KEY_SMS, KEY_NR}, // SELECT     KEY_NR+&quot; = ?&quot;, // WHERE-Bedingung     new String[] {&quot;0171 23456&quot;}, // Parameter für WHERE     null, // GROUP BY     null, // HAVING     null, // ORDER BY     null // LIMIT );
  • 64.
  • 65. SQLite Abfrage 3 startManagingCursor(cursor); if(cursor.moveToFirst()){     String foo = cursor.getString(0);     display(foo); } ContentValues initialValues = new ContentValues(); initialValues.put(KEY_SMS, &quot;Hallo, Welt&quot;); initialValues.put(KEY_NR, &quot;0171 123456&quot;); db.insert(DATABASE_TABLE, null, initialValues);
  • 67.
  • 68.
  • 69. Security - Permissions android.permission.INTERNET   android.permission.BLUETOOTH   android.permission.READ_CONTACTS   android.permission.SEND_SMS   android.permission.VIBRATE
  • 70.
  • 71. Android SDK Dominik Gätjens Thomas Maier Fragen? Vielen Dank für die Aufmerksamkeit :-)

Notas do Editor

  1. -&gt; Vorstellung 30 sek
  2. Thomas   -&gt; Agenda 30 sek
  3. Thomas   -&gt; Agenda 30 sek
  4. Thomas   -&gt; Agenda 30 sek
  5. Thomas   -&gt; Ein Betriebssystem für mobile Endgeräte       Beispielgeräte/hersteller.     Mehr als Betriebssystem... -&gt; Entwickelt von der Open Handset Alliance       65 Unternehmen, Netzbetreiber, Software-Firmen, Marketing-Firme, Geräte-Hersteller, unter Goole   -&gt; Unter Apache und GPL Lizenz (Open Source)        klar...    -&gt;  Basiert auf Linux-Kernel und Java       klar...+Dalvik -&gt; Gute Integration in die Google-Cloud       Kalender, Mail, Kontakte 1 min
  6. Thomas   -&gt; Multitasking       klar... -&gt; Vielfalt an unterstützter Hardware       Keine proprietäre Software, Abstraktionsschichten, Geräteverwaltung       Viel Aktorik: Beschleunigungssensor, Kompass, GPS, WiFi, Bluetooth, Beleuchtungssensor -&gt; Entwicklerfreundlich (Java)        Keine neue Sprache, Hochsprache, Gute Entwicklungsumgebung, gewohnte Werkzeuge   -&gt; Durchgängig durchdachte Security       sandboxing, jede app in eigener vm, permissions -&gt; Reichhaltiges Angebot an Apps       Fast 50.000 im offiziellen Google Market, Sekündärmärkte verfügbar      Bsp.: andappstore.com         slideme.org         handandgo.com     Anmeldung: 25$     nach Registration: upload vom Handy aus     -&gt; Internet-Optimiert (Social Networking        Mail, Messenger, Facebook und co., Browser, Telefon rückt in den Hintergrund (kleineres Netbook mit Telefon)   -&gt; Google-Integration       Synchronisation mit Kalender, Mail und Kontakte     -&gt; Open Source         ...klar   2 min
  7. Thomas -&gt; Google-Integration       Guter voller Funktionsumfang nur mit Google-Diensten   -&gt;  Taskverwaltung       Programme lassen sich oft nicht explizit beenden (ohne Taskkiller)     Sollte aber eigentlich nicht nötig sein...da android automatisch killt       Nur indirekte Wechsel über GUI.   -&gt; Gerätevielfalt         Muss Hardware vieler Hersteller unterstützen. HAL nötig. -&gt; Langsamer (theoretisch) -&gt; VM (keine JIT-Kompilierung)   JIT kompiliert teilstücke von class-files vor runtime, statt sie zu interpretieren 1 min
  8. Thomas -&gt; Development Tools 30 sek
  9. Thomas   -&gt;dx        *.dex executable für dalvik vm     dx baut aus class-bytecode bytecode für dalvik-vm  explizite nutzung   -&gt; apkbuilder     *.apk packages beihnhalten alle nötigen daten für app (quasi-installationsdatei) (resources+dex-classes) explizite nutzung -&gt;adb     Android Debug Bridge     Client auf development-pc     Server auf development-pc (daemon)     Client auf Target (real oder avd)(daemon) explizite nutzung +telefon komplett bedienen -&gt;layoutopt     optimiert, validiert layout commandline-tool   -&gt; Dominik jeztt Eclipse 3 min sum: 9 min     
  10. Thomas Bestandteil des SDK.   Java-Programm. Verwaltet API-Versionen.   Verwaltet Google-API&apos;s, nötig für Google Maps.   Verwaltet Virtual Devices (AVD-Android Virtual Device) Path für Eclipse (bzw. allgemein AVD-Manager und andere Tools) setze. 1 min
  11. Dominik AVD Anlegen 30 sek
  12. Dominik gestarter Emulator 30 sek
  13. Dominik  30sek Standard Eclipse ansicht kennt jeder Java Entwickler
  14. Dominik   30sek Applikation Starten  -&gt; Device Chooser
  15. Dominik DDMS View Device Ansicht mit Prozessen, Heap, Allocation Tracker, Threads, File Explorer Performance Löcher und Bugs finden LogCat kommt gleich 30 sek
  16. Dominik Debug View lässt sich auch ganz normal starten  Bekannt aus Java Entwicklung + LogCat LogCat gibt Android Logs aus, ähnlich einem consolen appender in Log4J 1 min
  17. Dominik Vollwertiger Gui Designer    Links Komponents  und Properties Rechts View-Hirachie     wird später im Detail drauf eingegangen 30 sek
  18. Dominik Android Manifest, Alle wichtigen Meta informationen für die Applikation. gehen wir später drauf ein 30 sek sum: 14,5 min
  19. Thomas -&gt; Architektur 0 sek
  20. Thomas -&gt; Linux-Kernel        Version 2.6        System-Dienste        security, memory management, process management, network stack, and driver model.       HAL für restlichen Softwarestack -&gt; Android Runtime       Für jede Applikation eigene Dalvik-VM  (Mehrere Instanzen pro Gerät)     Core-Libraries (nur teilmenge der, der Java-VM)     Es fehlt z.B. print, rmi, awt/swing     Anderer Release-Zyklus (hinterher, momentan java 1.5)       Java Vm basiert auf Kellerautomat, Dalvik VM auf Registermaschine (CPU auch). Dalvik in der Hinsicht besser     Umwandlung durch dx -&gt; Libraries (C/C++)     Surface Manager: Display I/O, Bringt 2d und 3d auf display zusammen     Media Framework: Media Codecs (Bilder, Video, Audio)     SQLite: Relationelle Datenbank, Zugriff für alle Applikationen     OpenGL: 3d Engine (Software, wahlweise hardware-beschleunigung)     FreeType: Bitmap und Vektor-Rendering (Schriften)     WebKit: HTML-Rendering Bibliothek     SGL: 2d engine     SSL: secure socket layer protocol...klar     libc: Standard C Lib       NDK: native development tools: für performance-kritische anwendungen zugriff auf c-libs    -&gt; Applikation Framework     Activity-Manager: Verwaltet Activities     Window-Manager: Verwaltet Windows       Content-Providers: Stellen Daten zur Verfügung     View-System: Verwaltet Views     Package-Manager: Verwaltet installierte Apps     Telephony-Manager: Zugriff auf Telefonie-status und service      Resource-Manager: Verwaltet Zugriff auf nicht-code resourcen     Location-Manager: Verwaltet Zugriff auf Positions-Daten     Notification-Manager: events im hintergrund, led, statusleiste. 5 min     
  21. Thomas -&gt; Components: Bausteine für Applikation, unabhängig. Andere Apps können Bausteine benutzen (mit permission).       gleichzeitig auch immer eine klasse 30 sek sum: 20 min
  22. Dominik   Logik, Kontrolle und Ansicht eines Screens (App-View) erbt von Acitivity Life-Cycle Methoden werden überschrieben um code einzubringen 30 sek
  23. Dominik   onCreate() initalisierungen onStart() weitere reInitialisierung onResume() Animationen und Musik starten. onPause( Animation und Musik stoppen   onPause()  Activity wurde teilweise überlagert. onStop() Avitivty wurde vollständig überlagert. onDestroy() wird nur durch aufruf von finish! 4 min
  24. Dominik laufen im Hintergrund  z.B. Mp3 Spieler kein UI erben von Service 30 sek
  25. Dominik 2 Life-Cycles 1. Service läuft immer und muss sich selbst beenden 2. Service wird beenden wenn keine bins mehr da sind. 2 min
  26. Dominik Regestrieren sich für Broadcasts Broadcasts werden vom System bei Ereignissen geschickt (SMS,Akku, Boot) erbt von BroadcastReceiver 1 min
  27. Dominik Leim zwischen den App-Blöcken Explizite und Impliizite Intents explizite geben Klasse an implizite nur eine Action 2. methoden zum starten ohne und mit Result 2 min
  28. Dominik     geben Context an jede Activity ist ein Context da Activitiy von Context erbt, darum meist &amp;quot;this&amp;quot; und aufzurufende Acitivity-Klasse 30 sek
  29. Dominik Intent gibt eine Action und eine Data-URI an Android sucht die passende Acitivity anhand von definierten Filtern sehr Lose kopplung aber Laufzeitfehler möglich 2 min
  30. Dominik   action  PICK schema content:// path de/myPath content://de/myPath   30 sek sum: 32,5 min
  31. Thomas -&gt; Resources: Nicht-code daten, sind auch in android selbst noch in der form da, verwaltung durch resource-manager -&gt;projekt anlegen/öffnen   -&gt; R.java   30 sek
  32. Thomas   Ein Layout File pro View   Filename: [a-z0-9_.] res/layout   namespace 1 min
  33. Thomas 30 sek
  34. Thomas   Filename: [a-z0-9_.] res/values   einafchster fall: verwendung als text direkt in layout    &amp;quot;This&apos;ll work&amp;quot;This&apos;ll also work   3 min  
  35. Thomas   30 sek
  36. Thomas   Filename: [a-z0-9_.] res/values   einafchster fall: verwendung als text direkt in layout    &amp;quot;This&apos;ll work&amp;quot;This&apos;ll also work   weitere möglichkeiten: farbe,dimensionen html-formatierung 3 min
  37. Thomas   Filename: [a-z0-9_.] res/drawables-hdpi,ldpi,mdpi   +nine-patch       4 min  
  38. Thomas ....liber im Editor   Liegt in applikations-root-verzeichnis   was alles dazu?   3 min -&gt; Demo Resources (5 min) sum 52,5 min
  39. Thomas ....liber im Editor   Liegt in applikations-root-verzeichnis   was alles dazu?   3 min -&gt; Demo Resources (5 min) sum 52,5 min
  40. Thomas ....liber im Editor   Liegt in applikations-root-verzeichnis   was alles dazu?   3 min -&gt; Demo Resources (5 min) sum 52,5 min
  41. Thomas   -&gt; 10 min
  42. Thomas   -&gt; 10 min
  43. Thomas   -&gt; 10 min
  44. Thomas   -&gt; 10 min
  45. Thomas   -&gt; 10 min
  46. Thomas   -&gt; 10 min
  47. Thomas   -&gt; 10 min
  48. Thomas   sum 65,5 min -&gt; demo über elemnt id&apos;s + findViews()
  49. Thomas   sum 65,5 min -&gt; demo über elemnt id&apos;s + findViews()
  50. Thomas   sum 65,5 min -&gt; demo über elemnt id&apos;s + findViews()
  51. Thomas   sum 65,5 min -&gt; demo über elemnt id&apos;s + findViews()
  52. Thomas   sum 65,5 min -&gt; demo über elemnt id&apos;s + findViews()
  53. Thomas   sum 65,5 min -&gt; demo über elemnt id&apos;s + findViews()
  54. onStop()??? 30 sek Ein Paar Ausschnitte aus der API immer wieder Beispiel
  55. Dominik 3 min
  56. Dominik PDU = Packet Data Unit BEISPIEL 2 min + demo 3 min -&gt; 5 min
  57. Thomas  API-Key   7 min 97 min
  58. Thomas  API-Key   7 min 97 min
  59. Dominik http://code.google.com/intl/de-DE/android/maps-api-signup.html DEMO APPLIKATION STARTN 2 min + demo 3 min   +app-demo 2 min 10 min sum: 85 min
  60. Dominik                 2 min folie 3 min demo   5 min  
  61. Thomas  API-Key   7 min 97 min
  62. Thomas  API-Key   7 min 97 min
  63. public Cursor query (boolean distinct, String table, String[] columns,  String selection, String[] selectionArgs,   String groupBy,  String having, String orderBy,  String limit)
  64. db : public synchronized SQLiteDatabase getReadableDatabase () 
  65. public long insert ( String table, String nullColumnHack, ContentValues values)  nullColumnHack SQL doesn&apos;t allow inserting a completely empty row, so if initialValues is empty this column will explicitly be assigned a NULL value
  66. Thomas   5 min
  67. Thomas   -&gt;Linux-Security auf Prozessebene       User/Groups - Permissions   -&gt; Sanboxing     Jede App eigene VM     security-safety -&gt; Application Signing       Jede App hat Zertifikat     Private Key von Developer     Keine Authority     Nur um App zu  identifizieren
  68. Thomas     -&gt;Standard-Applikation hat keine Permissions        klar...   -&gt; Überprüfung während der installation.         User muss permissions geben. -&gt; Beispiel     Permissions in AndroidManifest.xml
  69. Thomas      
  70. content://
  71. -&gt; Vorstellung 103 min!?