アプリを弄ってみる #3 #antama_ws

560 views
522 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
560
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • アプリを弄ってみる #3 #antama_ws

    1. 1. 17.12.2011Takahiro Yoshimura (@alterakey)
    2. 2. Flash Web AndroidTwitter →@alterakey
    3. 3. https://github.com/taky/lucene …
    4. 4. … …
    5. 5. Picasa
    6. 6. Eclipse+SDK (r14 , Android 3.2) (0.1.1) https://github.com/taky/lucene
    7. 7. EclipseFile→New→New Android ProjectProject Name luceneCreate project from existing sourceLocation→Browse Finish
    8. 8. …Properties→Android Android 3.0Build Path→Add External Archives→libs jar
    9. 9. AndroidManifest.xml<uses-sdk android:minSdkVersion="8"android:targetSdkVersion="11" /><application android:label="@string/app_name"android:icon="@drawable/icon"> <activity android:name="MainActivity"...android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode" />
    10. 10. lucene
    11. 11. URL
    12. 12. URLIntent URL
    13. 13. text/plain Intentextra URL
    14. 14. text/plain IntentURL
    15. 15. Intenttext/plain Intent
    16. 16. IntentAndroidManifest.xml
    17. 17. AndroidManifest.xml: <categoryandroid:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> <data android:mimeType="text/plain" /> </intent-filter></activity>
    18. 18. URL
    19. 19. ACTION_SEND … text/plain EXTRA_TEXT“If using EXTRA_TEXT, the MIME type should be "text/plain";”( http://developer.android.com/reference/android/content/Intent.html#ACTION_SEND )
    20. 20. text/plain Intent extra EXTRA_TEXT
    21. 21. (2)AsyncImageLoader.read:if (extras.containsKey(Intent.EXTRA_STREAM))! return context.getContentResolver()....if (extras.containsKey(Intent.EXTRA_TEXT)) Log.d(“AIL.read”, String.format(“extra: %s”,extras.getCharSequence(Intent.EXTRA_TEXT).toString()));
    22. 22. (3)
    23. 23. …Intent URL http…
    24. 24. httpHttpClient
    25. 25. AndroidHttpClient DefaultHttpClient
    26. 26. AndroidHttpClient2.2 HC
    27. 27. AndroidHttpClient(HttpUriRequest)HttpGet, HttpPost, HttpHead, ... →
    28. 28. GET
    29. 29. HttpGetnew HttpGet(http://...)
    30. 30. AHC.execute(HG) HttpEntityHttpEntity HTTP
    31. 31. (2)HE.getContent() InputStream →
    32. 32. AIL.read:if (extras.containsKey(Intent.EXTRA_STREAM))! return context.getContentResolver()....if (extras.containsKey(Intent.EXTRA_TEXT)){! HttpGet req = newHttpGet(extras.getCharSequence(Intent.EXTRA_TEXT).toString());! return AndroidHttpClient.newInstance("Lightboxdroid/0.1.2").execute(req).getEntity().getContent();}
    33. 33. …URL
    34. 34. null
    35. 35. AIL.read:try {! HttpGet req = ...! return AndroidHttpClient....}catch (IllegalArgumentException e) { return null;}catch (IOException e) { return null;}
    36. 36. Picasa
    37. 37. Picasatext/plain Intent
    38. 38. (2)text/plain Intent URLURL
    39. 39. github (GPL-3)Text Viewer (dawne)Scribbler (effy) …

    ×