Your SlideShare is downloading. ×
0
Android     @thorikawa
Soft ware Engineer, MTI Ltd.  android apps “music.jp”Blog:  http://d.hatena.ne.jp/thorikawa/FiremobileSimulator  http://fir...
Android Activity Service BroadcastReceiver Intent ContentProvider
Activity           Activity
Service
BroadcastReceiver                    SD
Intent Activity,Ser vice,BroadcastReceiver          URI
ContentProvider
actionUser                      Activity                                 Content                                 Provider ...
Activity
onCreate() xml Intent
onStart()
onResume() Activity
onPause()    Activity
onStop()
onDestroy()   MediaPlayer.release()   WebView.destroy()
ActivityIntentActivity.startActivity()Activity.startActivityForResult()
1   = 1 Activity
Service
2Context.startSer vice()    Ser viceIntentContext.bindSer vice()    Ser vice         RPC
startService() vs bindSer vice() + RPC startSer vice()   Intent bindService()           bind      RPC
startService()                 Ser vice.onStart() Intent
bindService()                      bind      bind      Ser vice
Broadcast Receiver
Intent                  actiononReceive()             (Intent)              onReceive()
android.intent.action.PHONE_STATEandroid.intent.action.BOOT_COMPLETEDandroid.intent.action.TIMEZONE_CHANGEDandroid.intent....
App Widget BroadcastReceiveronReceive()    onReceive()
Intent
Intent    Intent Intent            Activity Intent            Activity
AndroidManifeset.xml            Intent Filter                                       Intent<intent-filter>  <action android...
Content Provider
Content Uri(content:/ /          /    URL)
query                              update  SQLite                      insert                              delete         ...
content://media/ MediaProvider content://media/external/images/ media content://media/external/images/ media/1
ContentProvider   ContentResolver
Uri imagesUri = Images.Media.getContentUri("external");	 	 Cursor cursor = getContentResolver().query(             imagesU...
ContentProviderContentProvider
public class MyContentProvider extends ContentProvider {    @Override    public boolean onCreate() { //    ...    }    @Ov...
AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/andro...
My App                            Mail App                  action: Intent.ACTION_SEND           extra: EXTRA_STREAM=conte...
ActivityActivity
Android Activity, Service, BroadcastReceiver, Intent, ContentProviderIntent    ContentProvider
Android開発の基礎_20101218
Android開発の基礎_20101218
Android開発の基礎_20101218
Upcoming SlideShare
Loading in...5
×

Android開発の基礎_20101218

4,212

Published on

2010/12/18 スパイシーソフトさんで開かれた勉強会「スパイシーカレッジ」での資料です。

0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,212
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
54
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • &amp;#x7AEF;&amp;#x672B;&amp;#x306B;&amp;#x306F;&amp;#x672C;&amp;#x5F53;&amp;#x306B;&amp;#x4E88;&amp;#x6E2C;&amp;#x3082;&amp;#x3064;&amp;#x304B;&amp;#x306A;&amp;#x3044;&amp;#x81EA;&amp;#x4F53;&amp;#x304C;&amp;#x3088;&amp;#x304F;&amp;#x8D77;&amp;#x3053;&amp;#x308B;&amp;#x306E;&amp;#x3067;&amp;#x3001;\n&amp;#x5FD8;&amp;#x308C;&amp;#x304C;&amp;#x3061;&amp;#x306A;&amp;#x306E;&amp;#x3067;&amp;#x4E00;&amp;#x89A7;&amp;#x3092;&amp;#x30C1;&amp;#x30A7;&amp;#x30C3;&amp;#x30AF;&amp;#x3057;&amp;#x3066;&amp;#x304A;&amp;#x304F;&amp;#x3053;&amp;#x3068;&amp;#x304C;&amp;#x304A;&amp;#x52E7;&amp;#x3081;\n
  • &amp;#x65E5;&amp;#x672C;&amp;#x8A9E;&amp;#x8A33;&amp;#x3059;&amp;#x308B;&amp;#x3068;&amp;#x610F;&amp;#x56F3;&amp;#x30FB;&amp;#x610F;&amp;#x5FD7;\n\n\n
  • \n
  • &amp;#x6B21;&amp;#x304B;&amp;#x3089;&amp;#x5404;&amp;#x30B3;&amp;#x30F3;&amp;#x30DD;&amp;#x30FC;&amp;#x30CD;&amp;#x30F3;&amp;#x30C8;&amp;#x306E;&amp;#x8A73;&amp;#x7D30;\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • &amp;#x3053;&amp;#x3053;&amp;#x307E;&amp;#x3067;&amp;#x304C;&amp;#x30E9;&amp;#x30A4;&amp;#x30D5;&amp;#x30B5;&amp;#x30A4;&amp;#x30AF;&amp;#x30EB;&amp;#x306E;&amp;#x8AAC;&amp;#x660E;\n&amp;#x6B21;&amp;#x306F;&amp;#x5225;Activity&amp;#x306E;&amp;#x8D77;&amp;#x52D5;&amp;#x306B;&amp;#x3064;&amp;#x3044;&amp;#x3066;\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • &amp;#x97F3;&amp;#x697D;&amp;#x30B5;&amp;#x30FC;&amp;#x30D3;&amp;#x30B9;&amp;#x3067;&amp;#x306F;&amp;#x3001;&amp;#x305F;&amp;#x3068;&amp;#x3048;&amp;#x3070;PHONE_STATE&amp;#x3084;MEDIA_REMOVE&amp;#x306A;&amp;#x3069;&amp;#x3092;&amp;#x4F7F;&amp;#x3046;&amp;#x3002;\n&amp;#x3053;&amp;#x308C;&amp;#x3092;&amp;#x53D7;&amp;#x3051;&amp;#x306A;&amp;#x3044;&amp;#x3068;&amp;#x3069;&amp;#x3046;&amp;#x3044;&amp;#x3046;&amp;#x3053;&amp;#x3068;&amp;#x304C;&amp;#x8D77;&amp;#x3053;&amp;#x308B;&amp;#x304B;&amp;#x3068;&amp;#x3044;&amp;#x3046;&amp;#x3068;&amp;#x3001;&amp;#x96FB;&amp;#x8A71;&amp;#x304C;&amp;#x304B;&amp;#x304B;&amp;#x3063;&amp;#x3066;&amp;#x304D;&amp;#x3066;&amp;#x3082;&amp;#x30D0;&amp;#x30C3;&amp;#x30AF;&amp;#x30B0;&amp;#x30E9;&amp;#x30A6;&amp;#x30F3;&amp;#x30C9;&amp;#x306E;&amp;#x30B5;&amp;#x30FC;&amp;#x30D3;&amp;#x30B9;&amp;#x306B;&amp;#x3088;&amp;#x308B;&amp;#x97F3;&amp;#x697D;&amp;#x518D;&amp;#x751F;&amp;#x306F;&amp;#x7D9A;&amp;#x3051;&amp;#x3089;&amp;#x308C;&amp;#x3066;&amp;#x3057;&amp;#x307E;&amp;#x3046;&amp;#x3002;&amp;#x96FB;&amp;#x8A71;&amp;#x304C;&amp;#x304B;&amp;#x304B;&amp;#x3063;&amp;#x3066;&amp;#x304D;&amp;#x305F;&amp;#x3089;BroadcastReceiver&amp;#x3067;&amp;#x691C;&amp;#x77E5;&amp;#x3057;&amp;#x3066;&amp;#x3001;Service&amp;#x306B;&amp;#x5BFE;&amp;#x3057;&amp;#x3066;&amp;#x505C;&amp;#x6B62;&amp;#x547D;&amp;#x4EE4;&amp;#x3092;&amp;#x51FA;&amp;#x3059;&amp;#x3001;&amp;#x3068;&amp;#x3044;&amp;#x3046;&amp;#x51E6;&amp;#x7406;&amp;#x304C;&amp;#x5FC5;&amp;#x8981;&amp;#x3002;&amp;#xFF08;&amp;#x540C;&amp;#x69D8;&amp;#x306B;&amp;#x96FB;&amp;#x8A71;&amp;#x304C;&amp;#x7D42;&amp;#x308F;&amp;#x3063;&amp;#x305F;&amp;#x3089;&amp;#x3001;&amp;#x518D;&amp;#x958B;&amp;#x547D;&amp;#x4EE4;&amp;#x3092;&amp;#x51FA;&amp;#x3059;&amp;#xFF09;\n
  • onReceive&amp;#x306E;&amp;#x9593;&amp;#x3057;&amp;#x304B;&amp;#x751F;&amp;#x5B58;&amp;#x671F;&amp;#x9593;&amp;#x304C;&amp;#x306A;&amp;#x3044;&amp;#x306E;&amp;#x3067;&amp;#x3001;&amp;#x3055;&amp;#x3063;&amp;#x304D;&amp;#x8AAC;&amp;#x660E;&amp;#x3057;&amp;#x305F;Service&amp;#x306B;bind&amp;#x3059;&amp;#x308B;&amp;#x3088;&amp;#x3046;&amp;#x306A;&amp;#x975E;&amp;#x540C;&amp;#x671F;&amp;#x51E6;&amp;#x7406;&amp;#x306F;&amp;#x884C;&amp;#x3046;&amp;#x3053;&amp;#x3068;&amp;#x304C;&amp;#x3067;&amp;#x304D;&amp;#x306A;&amp;#x3044;&amp;#x3002;Service&amp;#x3068;&amp;#x306F;&amp;#x3001;&amp;#x304A;&amp;#x4E92;&amp;#x3044;Intent&amp;#x3067;&amp;#x3084;&amp;#x308A;&amp;#x53D6;&amp;#x308A;&amp;#x3059;&amp;#x308B;&amp;#x306A;&amp;#x3069;&amp;#x5DE5;&amp;#x592B;&amp;#x3059;&amp;#x308B;&amp;#x5FC5;&amp;#x8981;&amp;#x304C;&amp;#x3042;&amp;#x308B;&amp;#x3002;\n
  • \n
  • \n
  • &amp;#xFF11;&amp;#x500B;&amp;#x76EE;&amp;#x306F;&amp;#x96FB;&amp;#x8A71;&amp;#x304C;&amp;#x304B;&amp;#x304B;&amp;#x3063;&amp;#x3066;&amp;#x304D;&amp;#x305F;Broadcast&amp;#x3092;&amp;#x53D7;&amp;#x3051;&amp;#x308B;\n&amp;#xFF12;&amp;#x500B;&amp;#x76EE;&amp;#x306F;&amp;#x97F3;&amp;#x697D;&amp;#x30D5;&amp;#x30A1;&amp;#x30A4;&amp;#x30EB;&amp;#x30C7;&amp;#x30FC;&amp;#x30BF;&amp;#x306B;&amp;#x5BFE;&amp;#x3057;&amp;#x3066;&amp;#x306E;Intent&amp;#x3092;&amp;#x53D7;&amp;#x3051;&amp;#x3089;&amp;#x308C;&amp;#x308B;&amp;#x3053;&amp;#x3068;&amp;#x3092;&amp;#x793A;&amp;#x3059;&amp;#x3002;&amp;#x3053;&amp;#x308C;&amp;#x3092;&amp;#x66F8;&amp;#x3044;&amp;#x3066;&amp;#x304A;&amp;#x304F;&amp;#x3068;&amp;#x3001;&amp;#x305F;&amp;#x3068;&amp;#x3048;&amp;#x3070;Gmail&amp;#x3067;&amp;#x306E;&amp;#x6DFB;&amp;#x4ED8;&amp;#x30D5;&amp;#x30A1;&amp;#x30A4;&amp;#x30EB;&amp;#x3067;&amp;#x97F3;&amp;#x697D;&amp;#x30D5;&amp;#x30A1;&amp;#x30A4;&amp;#x30EB;&amp;#x304C;&amp;#x9078;&amp;#x629E;&amp;#x3055;&amp;#x308C;&amp;#x305F;&amp;#x969B;&amp;#x3068;&amp;#x304B;&amp;#x306B;&amp;#x30A2;&amp;#x30D7;&amp;#x30EA;&amp;#x30B1;&amp;#x30FC;&amp;#x30B7;&amp;#x30E7;&amp;#x30F3;&amp;#x5019;&amp;#x88DC;&amp;#x4E00;&amp;#x89A7;&amp;#x306B;&amp;#x8868;&amp;#x793A;&amp;#x3055;&amp;#x308C;&amp;#x308B;&amp;#x3002;\n&amp;#xFF13;&amp;#x500B;&amp;#x76EE;&amp;#x306F;&amp;#x30D6;&amp;#x30E9;&amp;#x30A6;&amp;#x30B6;&amp;#x3067;&amp;#x7279;&amp;#x5B9A;&amp;#x306E;&amp;#x30B9;&amp;#x30AD;&amp;#x30FC;&amp;#x30DE;&amp;#x540D;&amp;#x3001;&amp;#x30DB;&amp;#x30B9;&amp;#x30C8;&amp;#x540D;&amp;#x3001;&amp;#x30D1;&amp;#x30B9;&amp;#x306E;&amp;#x30EA;&amp;#x30F3;&amp;#x30AF;&amp;#x3092;&amp;#x62BC;&amp;#x3055;&amp;#x308C;&amp;#x305F;&amp;#x3068;&amp;#x304D;&amp;#x306B;&amp;#x3001;&amp;#x5019;&amp;#x88DC;&amp;#x4E00;&amp;#x89A7;&amp;#x306B;&amp;#x8868;&amp;#x793A;&amp;#x3055;&amp;#x305B;&amp;#x308B;&amp;#x305F;&amp;#x3081;&amp;#x306E;&amp;#x30D5;&amp;#x30A3;&amp;#x30EB;&amp;#x30BF;&amp;#x3002;http&amp;#x3067;&amp;#x306A;&amp;#x304F;&amp;#x3066;&amp;#x3082;&amp;#x72EC;&amp;#x81EA;&amp;#x30B9;&amp;#x30AD;&amp;#x30FC;&amp;#x30DE;&amp;#x3082;&amp;#x5B9A;&amp;#x7FA9;&amp;#x3067;&amp;#x304D;&amp;#x308B;&amp;#x3002;\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • OS&amp;#x306E;&amp;#x30D0;&amp;#x30FC;&amp;#x30B8;&amp;#x30E7;&amp;#x30F3;&amp;#x3067;&amp;#x51E6;&amp;#x7406;&amp;#x3092;&amp;#x5207;&amp;#x308A;&amp;#x5206;&amp;#x3051;&amp;#x308B;&amp;#x3053;&amp;#x3068;&amp;#x304C;&amp;#x3067;&amp;#x304D;&amp;#x308B;&amp;#x306E;&amp;#x3067;2.1&amp;#x3084;2.2&amp;#x306E;&amp;#x65B0;&amp;#x6A5F;&amp;#x80FD;&amp;#x306F;&amp;#x30D5;&amp;#x30EB;&amp;#x306B;&amp;#x4F7F;&amp;#x3063;&amp;#x305F;&amp;#x65B9;&amp;#x304C;&amp;#x3088;&amp;#x3044;&amp;#x3002;Flash,&amp;#x30DE;&amp;#x30EB;&amp;#x30C1;&amp;#x30BF;&amp;#x30C3;&amp;#x30C1;,C2DM,&amp;#x30E9;&amp;#x30A4;&amp;#x30D6;&amp;#x58C1;&amp;#x7D19;,HTML5&amp;#x306A;&amp;#x3069;&amp;#x3002;&amp;#x307E;&amp;#x305F;API&amp;#x306B;&amp;#x3088;&amp;#x3063;&amp;#x3066;&amp;#x306F;&amp;#x5927;&amp;#x5E45;&amp;#x306A;&amp;#x5909;&amp;#x66F4;&amp;#x304C;&amp;#x3042;&amp;#x308B;&amp;#x5834;&amp;#x5408;&amp;#x3082;&amp;#x3042;&amp;#x308B;&amp;#x306E;&amp;#x3067;&amp;#x6CE8;&amp;#x610F;&amp;#x3002;&amp;#x305F;&amp;#x3068;&amp;#x3048;&amp;#x3070;&amp;#x9023;&amp;#x7D61;&amp;#x5148;&amp;#x306A;&amp;#x3069;&amp;#x3002;\n
  • UX&amp;#x306E;&amp;#x5411;&amp;#x4E0A;&amp;#x306B;&amp;#x30C1;&amp;#x30E5;&amp;#x30FC;&amp;#x30CB;&amp;#x30F3;&amp;#x30B0;&amp;#x306F;&amp;#x7D76;&amp;#x5BFE;&amp;#x5FC5;&amp;#x8981;&amp;#x306A;&amp;#x4F5C;&amp;#x696D;\n200ms&amp;#x5FDC;&amp;#x7B54;&amp;#x304C;&amp;#x306A;&amp;#x3051;&amp;#x308C;&amp;#x3070;&amp;#x305D;&amp;#x308C;&amp;#x306F;&amp;#x3082;&amp;#x3046;&amp;#x30B8;&amp;#x30E3;&amp;#x30F3;&amp;#x30AF;&amp;#x306A;&amp;#x30A2;&amp;#x30D7;&amp;#x30EA;\n\n
  • \n\n
  • &amp;#x5B9F;&amp;#x969B;&amp;#x306B;&amp;#x30A2;&amp;#x30D7;&amp;#x30EA;&amp;#x30B1;&amp;#x30FC;&amp;#x30B7;&amp;#x30E7;&amp;#x30F3;&amp;#x3092;&amp;#x958B;&amp;#x767A;&amp;#x3057;&amp;#x3066;&amp;#x307F;&amp;#x3066;&amp;#x3001;&amp;#x57FA;&amp;#x672C;&amp;#x7684;&amp;#x306A;&amp;#x69CB;&amp;#x6210;&amp;#x8981;&amp;#x7D20;&amp;#x306E;&amp;#x7406;&amp;#x89E3;&amp;#x304C;&amp;#x975E;&amp;#x5E38;&amp;#x306B;&amp;#x91CD;&amp;#x8981;&amp;#x304B;&amp;#x3068;&amp;#x601D;&amp;#x3063;&amp;#x305F;&amp;#x3002;\nandroid developers&amp;#x306B;&amp;#x3082;&amp;#x958B;&amp;#x767A;&amp;#x306E;&amp;#x57FA;&amp;#x790E;&amp;#x3068;&amp;#x3044;&amp;#x3046;&amp;#x30DA;&amp;#x30FC;&amp;#x30B8;&amp;#x304C;&amp;#x3042;&amp;#x3063;&amp;#x3066;&amp;#x3001;&amp;#x305D;&amp;#x308C;&amp;#x3092;&amp;#x8AAD;&amp;#x3080;&amp;#x3068;&amp;#x4ECA;&amp;#x65E5;&amp;#x8AAC;&amp;#x660E;&amp;#x3057;&amp;#x305F;&amp;#x5185;&amp;#x5BB9;&amp;#x304C;&amp;#x3055;&amp;#x3089;&amp;#x306B;&amp;#x6DF1;&amp;#x304F;&amp;#x5206;&amp;#x304B;&amp;#x308B;&amp;#x3068;&amp;#x601D;&amp;#x3046;&amp;#x3002;\n&amp;#x30A2;&amp;#x30D7;&amp;#x30EA;&amp;#x9593;&amp;#x3084;&amp;#x30B3;&amp;#x30F3;&amp;#x30DD;&amp;#x30FC;&amp;#x30CD;&amp;#x30F3;&amp;#x30C8;&amp;#x9593;&amp;#x306E;&amp;#x67D4;&amp;#x8EDF;&amp;#x306A;&amp;#x9023;&amp;#x643A;&amp;#x306F;&amp;#x3001;Android&amp;#x306A;&amp;#x3089;&amp;#x3067;&amp;#x306F;&amp;#x306E;&amp;#x4ED5;&amp;#x7D44;&amp;#x307F;&amp;#x3067;&amp;#x3068;&amp;#x3066;&amp;#x3082;&amp;#x9762;&amp;#x767D;&amp;#x3044;&amp;#x3002;\n&amp;#x4ECA;&amp;#x65E5;&amp;#x8AAC;&amp;#x660E;&amp;#x3057;&amp;#x3066;&amp;#x5185;&amp;#x5BB9;&amp;#x306F;&amp;#x81A8;&amp;#x5927;&amp;#x306B;&amp;#x3042;&amp;#x3063;&amp;#x3066;&amp;#x3001;&amp;#x305F;&amp;#x3068;&amp;#x3048;&amp;#x3070;UI&amp;#x30FB;&amp;#x30C1;&amp;#x30E5;&amp;#x30FC;&amp;#x30CB;&amp;#x30F3;&amp;#x30B0;&amp;#x30FB;&amp;#x30C6;&amp;#x30B9;&amp;#x30C8;&amp;#x306F;&amp;#x91CD;&amp;#x8981;&amp;#x3002;\n
  • Transcript of "Android開発の基礎_20101218"

    1. 1. Android @thorikawa
    2. 2. Soft ware Engineer, MTI Ltd. android apps “music.jp”Blog: http://d.hatena.ne.jp/thorikawa/FiremobileSimulator http://firemobilesimulator.org/ (iPhone/iPad app)t witter: @thorikawa
    3. 3. Android Activity Service BroadcastReceiver Intent ContentProvider
    4. 4. Activity Activity
    5. 5. Service
    6. 6. BroadcastReceiver SD
    7. 7. Intent Activity,Ser vice,BroadcastReceiver URI
    8. 8. ContentProvider
    9. 9. actionUser Activity Content Provider Service Intent BroadcastReceiverEvent
    10. 10. Activity
    11. 11. onCreate() xml Intent
    12. 12. onStart()
    13. 13. onResume() Activity
    14. 14. onPause() Activity
    15. 15. onStop()
    16. 16. onDestroy() MediaPlayer.release() WebView.destroy()
    17. 17. ActivityIntentActivity.startActivity()Activity.startActivityForResult()
    18. 18. 1 = 1 Activity
    19. 19. Service
    20. 20. 2Context.startSer vice() Ser viceIntentContext.bindSer vice() Ser vice RPC
    21. 21. startService() vs bindSer vice() + RPC startSer vice() Intent bindService() bind RPC
    22. 22. startService() Ser vice.onStart() Intent
    23. 23. bindService() bind bind Ser vice
    24. 24. Broadcast Receiver
    25. 25. Intent actiononReceive() (Intent) onReceive()
    26. 26. android.intent.action.PHONE_STATEandroid.intent.action.BOOT_COMPLETEDandroid.intent.action.TIMEZONE_CHANGEDandroid.intent.action.MEDIA_REMOVED
    27. 27. App Widget BroadcastReceiveronReceive() onReceive()
    28. 28. Intent
    29. 29. Intent Intent Intent Activity Intent Activity
    30. 30. AndroidManifeset.xml Intent Filter Intent<intent-filter> <action android:name="android.intent.action.PHONE_STATE" /></intent-filter><intent-filter> <action android:name="android.intent.action.VIEW" /> <data android:mimeType="audio/*" /></intent-filter><intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="http" /> <data android:host="example.com" /></intent-filter>
    31. 31. Content Provider
    32. 32. Content Uri(content:/ / / URL)
    33. 33. query update SQLite insert delete etc... Client File Content Provider ex)ActivityInternet
    34. 34. content://media/ MediaProvider content://media/external/images/ media content://media/external/images/ media/1
    35. 35. ContentProvider ContentResolver
    36. 36. Uri imagesUri = Images.Media.getContentUri("external"); Cursor cursor = getContentResolver().query( imagesUri, // Content Uri new String[] { ImageColumns.TITLE }, // null, // null, // null // ); while(cursor.moveToNext()) { ... } corsor.close();
    37. 37. ContentProviderContentProvider
    38. 38. public class MyContentProvider extends ContentProvider { @Override public boolean onCreate() { // ... } @Override public Uri insert(Uri uri, ContentValues values) { ... } @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { ... } @Override public int delete(Uri uri, String selection, String[] selectionArgs) { ... } @Override public String getType(Uri uri) { // Content Uri ... } @Override public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { ... } @Override public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { // ... }}
    39. 39. AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"package="a.b.c" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="x"> <provider android:name=".MyContentProvider"android:authorities="hoge" /> </application> <uses-sdk android:minSdkVersion="4" /></manifest> content://hoge/ MyContentProvider
    40. 40. My App Mail App action: Intent.ACTION_SEND extra: EXTRA_STREAM=content:/ /hoge/1 IntentActivity Activity query openFile Content Provider authorities="hoge"
    41. 41. ActivityActivity
    42. 42. Android Activity, Service, BroadcastReceiver, Intent, ContentProviderIntent ContentProvider
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×