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

Android

Burak Aydın
December 17, 2012

 Android

Samsun 19 Mayıs Üniversitesi - Android Sunumu - 17 Aralık 2012

Burak Aydın

December 17, 2012
Tweet

More Decks by Burak Aydın

Other Decks in Technology

Transcript

  1. Android Günü 2/18 10/31/13 Ajanda • Android Uygulama Yapısı •

    Activities • Services • Content Providers • Intents & Intent Filters • Broadcast Receivers • Manifest.xml • Permissions • Debugging • LogCat
  2. Android Günü 3/18 10/31/13 Android Uygulama Yapısı ├── assets ├──

    bin ├── libs ├── res │ ├── drawable-hdpi │ ├── drawable-ldpi │ ├── drawable-mdpi │ ├── drawable-xhdpi │ ├── layout │ ├── menu │ └── values └── src └── com └── example └── deneme
  3. Android Günü 4/18 10/31/13 R.java txtKullaniciAdi = (TextView) findViewById(R.id.txtKullaniciAdi); txtSifre

    = (TextView) findViewById(R.id.txtSifre); OrnekActivity.java <EditText android:id="@+id/edKullaniciAdi" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1"> </EditText> <EditText android:id="@+id/edSifre" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1"/> activity_ornek.xml
  4. Android Günü 5/18 10/31/13 Activities <activity android:name=".OrnekActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"

    /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> Twitter Facebook Gmail
  5. Android Günü 7/18 10/31/13 Intents & Intent Filters Niyet ettim...

    startActivity(new Intent(getApplicationContext(), Activity2.class));
  6. Android Günü 8/18 10/31/13 Intents & Intent Filters <activity android:name=".OrnekActivity">

    <intent-filter> <action android:name="android.intent.action.VIEW"/> </intent-filter> </activity>
  7. Android Günü 9/18 10/31/13 Services • Arka planda çalışır. •

    Multi-tasking özelliğini kullanır. <manifest> <application> <service android:name=".OrnekService" /> </application> </manifest>
  8. Android Günü 10/18 10/31/13 Content Providers • İçerik paylaşımı •

    Kişi listesine erişim <manifest> <application> <provider android:name=".contentprovider.MyTodoContentProvider" android:authorities="org.ankara.android.todos.contentprovider"> </provider> </application> </manifest>
  9. Android Günü 11/18 10/31/13 Broadcast Receivers • Telefon açıldığında •

    Sms geldiğinde • Pil azaldığında... <manifest> <application> <receiver android:name="OrnekReceiver" > <intent-filter> <action android:name="android.intent.action.VIEW" /> </intent-filter> </receiver> </application> </manifest>
  10. Android Günü 12/18 10/31/13 Manifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.gdgankara.ornek" android:versionCode="1" android:versionName="1.0"

    > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".LoginActivity" android:label="@string/title_activity_login" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
  11. Android Günü 14/18 10/31/13 Debugging adb – Android Device Bridge

    • adb devices • adb -s emulator-5554 install deneme.apk