Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
1ヶ月でAndroidカメラアプリ開発(3/4)
Search
sakebook
April 04, 2016
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
1ヶ月でAndroidカメラアプリ開発(3/4)
Adobe Creative SDKを使った写真加工アプリの開発のスライドです。全4回。
sakebook
April 04, 2016
Transcript
46 slides
̍ϲ݄Ͱ ANDROIDΧϝϥΞϓϦ։ൃ @Trunk ञຊ৳ 2016/3/27
ຊͷྲྀΕ • ՝ͷ֬ೝ • Intent • Χϝϥݺͼग़͠ • ը૾ड͚औΓ •
ΪϟϥϦʔݺͼग़͠ • ΤσΟλʔىಈ • ը૾γΣΞ • (҉తIntentͷ݅ઃఆ)
՝ͷ֬ೝ
՝ • ͕ࣗ࡞Γ͍ͨΞϓϦͷϨΠΞτΛߟ͑ ࣮ͯ͠ΈΔ • ͕ࣗ࡞Γ͍ͨΞϓϦͷ͍͔ͭ͘ͷwidgetͰ ΠϕϯτϋϯυϦϯάΛઃఆ͢Δ
INTENT
INTENT • Activity(Component)ಉ࢜ͷΓͱΓʹ༻͍Δ • ผͷΞϓϦؒͰΓͱΓՄೳ • ༷ʑͳใΛ٧ΊΒΕΔ(੍ݶ͋Γ)
2छྨ͋Δ • ໌ࣔతIntent • ݺͼग़͍ͨ͠૬खΛComponent໊Ͱࢦఆ • ҉తIntent • ݺͼग़͍ͨ͠૬खΛػೳ͔Βࢦఆ
(ಥ)ֶߍʹྫ͑Δͱ • ໌ࣔతIntent • ʮࠤ౻͞Μͪΐͬͱདྷͯʯ • ରҰਓ • ҉తIntent •
ʮॏ͍ӡΔਓͪΐͬͱདྷͯʯ • ୭͕དྷΔ͔Θ͔Βͳ͍ • ෳਓདྷΔ߹͋Δ
Χϝϥݺͼग़͠
ͦͷ·͑ʹ • ΧϝϥONʹ͠ͳ͍ͱμϝ • ࣮ػͰͳ͍ͷͰ͓Εͳ͘
҉తINTENT • ʮΧϝϥ࣋ͬͯΔΞϓϦདྷͯʯ
ʮΧϝϥ࣋ͬͯΔΞϓϦདྷͯʯ • startActivityForResult • onActivityResultͰ ݁ՌΛड͚औΕΔݺͼग़͠ํ
• resultCode • Intent͕ظ௨Γऴ͔ྃͨ͠Ͳ͏͔
• requestCode • IntentΛૹͬͨૹ৴ݩΛผ͢Δࣈ
• data • IntentઌͰͷ݁Ռ͕٧ΊΒΕ͍ͯΔ (Nullable)
ը૾ड͚औΓ
BITMAPେ͖͍ • Bitmapը૾ͳͷͰ༰ྔ͕େ͖͍ • Intentʹ٧ΊΔʹ͍ۤ͠ • URIͰΓͱΓ͢Δ • https://ja.wikipedia.org/wiki/ Uniform_Resource_Identifier
ʮΧϝϥ࣋ͬͯΔΞϓϦདྷͯʯ • ʮͨͩ݁͠ՌfileUriʹೖΕ͍ͯͩ͘͞ʯ • Util.getOutputMediaFileUriͰ ݁ՌͷUriΛ࡞
URIΛੜ • GoogleͷνϡʔτϦΞϧ͔Βഈआ • https://developer.android.com/intl/ja/guide/ topics/media/camera.html#saving-media • આ໌ׂѪ
• fileUriʹͲΜͳ͕ೖ͍ͬͯΔͷ͔֬ೝͯ͠ ΈΑ͏ • ઌ΄ͲͱҟͳΓdatanullͳͷͰҙɻ
ΪϟϥϦʔݺͼग़͠
҉తINTENT • ʮը૾Ұཡ͕ݟ͍ͨʯ
ʮը૾Ұཡ͕ݟ͍ͨʯ • ݟ্ͨʹҰͭબ͍ͨ͠
• data.getData()Ͱ ΪϟϥϦʔ͔Βબͨ͠ը૾ͷUriΛऔಘ • ΧϝϥɾΪϟϥϦʔͲͪΒʹ͓͍ͯΤσΟ λʔىಈͷͨΊʹUriΛ͢
ΤσΟλʔىಈ
໌ࣔతINTENT • SDKͷComponentΛࢦఆ • ʮAviaryͷΤσΟλʔདྷͯʯ
ʮAVIARYͷΤσΟλʔདྷͯʯ • AdobeImageIntent • SDKͷΫϥε • Ճ͍ͨ͠ը૾ͷUriΛ͢
தΛݟΔͱ • AdobeImageIntent.class • AdobeImageEditorActivity.class • ಛఆͷCompomentΛࢦఆ͍ͯ͠Δɻ
• data.getData()ͰՃͨ͠ը૾ͷUriΛऔಘ • औಘͨ͠Uri͔ΒImageViewʹը૾Ληοτ
ը૾γΣΞ
҉తINTENT • ʮը૾ૹΓ͍ͨΜ͚ͩͲ୭͔ʯ
ʮը૾ૹΓ͍ͨΜ͚ͩͲ୭͔ʯ • setAction • ૹΓ͍ͨ • putExtra • ͢σʔλ •
setType • σʔλͷϑΥʔϚοτ
͜ΕͰಉ͡ • Χϝϥݺͼग़͠ʹࣅͯΔ
ڪΒͨ͘͘͞ΜԠ͢Δ • Twitter, Facebook, Instagram, LINE… • ͦͷબࢶ͕ԿΛҙຯ͢Δͷ͔ λΠτϧΛ͚ͭͯϢʔβʹ͔Γ͘͢͢Δ
None
• Intent.createChooserͰλΠτϧΛ͚ͭΒΕΔ • จࣈྻxmlͰఆٛͯ͠ಈతʹऔಘ͢Δɻ • res/values/strings.xml • جຊతʹϕλॻ͖͠ͳ͍
҉తINTENTͷ݅ઃఆ
Ͳ͏ͯ͠൴ΒԠ͢Δͷ͔ • ࣗͨͪͰ࡞ΕΔͷ͔ʁ ࡞Εͳ͍͕ͣͳ͍ɻ • ͔͜͠͠ͷΧϝϥΞϓϦ ԿʹԠ͠ͳ͍ • ҧ͍ʁ
ԠͰ͖Δ͜ͱΛهड़ • AndroidManifest.xmlʹ ͲͷComponent͕ ͳʹʹԠ͢Δͷ͔ఆٛ͢Δɻ
҉తINTENTͷ݅ઃఆ • ݅ઃఆ • Action • Category • Data
ACTION • ͲΜͳ͜ͱΛ͍ͤͨ͞ͷ͔ • Intent.ACTION_VIEW • ݟΔ • Intent.ACTION_SEND •
͢
CATEGORY • ͲΜͳΧςΰϦͷίϯϙʔωϯτʹ Ԡͯ͠Β͏͔ • Intent.CATEGORY_DEFAULT • ҉తIntentʹରԠ͍ͯ͠Δ • Intent.CATEGORY_LAUNCHER
• ϥϯνϟʔʹද͍ࣔͯ͠Δ
DATA • ίϯϙʔωϯτʹ͍ͨ͠Data • putExtra(String extra, Bundle data); • Intent.EXTRA_TEXT
• ACTION_SENDͰ͍ͨ͠Data(จࣈྻ) • Intent.EXTRA_STREAM • ACTION_SENDͰ͍ͨ͠Data(ϑΝΠϧύε)
DATA • setType(String mimeType) • ࣮ϑΝΠϧͤͳ͍ͷͰڭ͑Δඞཁ͕͋Δ • text/plain • ςΩετ
• image/jpeg • ը૾
ࢁ΄Ͳ͋Δ • https://developer.android.com/intl/ja/reference/ android/content/Intent.html
ઃఆྫ(ࣄྫͱͯ͠հ) • trunk://~ or http://~ ͷURLʹରͯ͠ɺ WebIntentActivityͱ͍͏ Component͕Ԡ͢Δ • ࣮ࡍड͚औͬͨޙͷॲཧඞཁ
More Decks by sakebook
See All by sakebook
「私のチーム」を飛び出したスクラムマスターの試行錯誤:うまくいく社内企画・うまくいかない社内企画の違い
sakebook
0
7
属人化を防ぎ、スプリントゴールを達成するために開発者が始めた取り組み
sakebook
0
210
私とスクラム私とコミュニティ私とOST
sakebook
0
110
目指せKotlin 100%
sakebook
1
2.6k
Make full use of Chrome Custom Tabs
sakebook
3
3.5k
Chrome Custom Tabsを使いこなそう
sakebook
1
2.6k
1ヶ月でAndroidカメラアプリ開発(1/4)
sakebook
1
1.9k
1ヶ月でAndroidカメラアプリ開発(2/4)
sakebook
0
1.2k
1ヶ月でAndroidカメラアプリ開発(4/4)
sakebook
0
1.1k
Other Decks in Programming
See All in Programming
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.4k
オーケストレーション記述言語 Katari
yukikurage
0
260
GraphQL の onError と Nullability のこれから
quramy
0
220
AI Augmentation Techniques with Liberty
ivargrimstad
1
480
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
330
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
0
220
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
150
あなたはMCPの機能を、まだ知らない。
4geru
1
140
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
130
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Utilizing Notion as your number one productivity tool
mfonobong
4
640
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
370
Art, The Web, and Tiny UX
lynnandtonic
304
22k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
930
Amusing Abliteration
ianozsvald
1
390
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Paper Plane
katiecoart
PRO
6
55k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
sira's awesome portfolio website redesign presentation
elsirapls
0
510