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

CameraXを使ったら最高だった話

81e878754a68c7aae86f1d935349e747?s=47 ikemura23
August 21, 2020

 CameraXを使ったら最高だった話

2020/08/21 YUMEMI.apk #1

81e878754a68c7aae86f1d935349e747?s=128

ikemura23

August 21, 2020
Tweet

Transcript

  1. CameraXΛ࢖ͬͨΒ Χϝϥ࣮૷͕ϝνϟָͩͬͨ࿩ 2020/08/21 YUMEMI.apk

  2. ஑ଜ ࿨߶ ग़਎஍ɿԭೄݝ ੢දౡ झຯɿεϙʔπ ޷͖ͳՌ෺ɿύΠφοϓϧ Twitterɿikemura23

  3. CameraXͰΧϝϥ࣮૷͕ ϝνϟָʹͳͬͯ·͢

  4. CameraX ͱ͸ ɾJetpack αϙʔτ ϥΠϒϥϦ ɾΧϝϥΞϓϦͷ։ൃΛ؆୯ʹ͢ΔͨΊʹ࡞੒͞Εͨ ɾCamera2 APIͷ্ʹߏங͞Ε͍ͯΔ ɾCameraXͷϥϘͰ͞·͟·ͳ୺຤͕ςετ͞Εಈ࡞͕Ұ؀͍ͯ͠Δ ɾݱࡏ͸

    1.0.0-beta07
  5. CameraXͷԿ͕͍͍ͷ͔ʁ ɾϥΠϑαΠΫϧͷ؅ཧ͕ϝνϟָ ɾCamera2 APIΑΓ΋গͳ͍ίʔυྔͰ࣮૷Ͱ͖Δ ɾಛఆͷϢʔεέʔεΛ௒؆୯ʹ࣮૷Ͱ͖Δ ɹɾϓϨϏϡʔ ɹɾը૾Ωϟϓνϟ ɹɾը૾෼ੳ

  6. ͬ͘͟ΓCameraX࣮૷ίʔυΛ঺հ

  7. xmlͷPreviewViewΛઃஔ ඇϒϩοΩϯά Ϟʔυ σϑΥϧτղ૾౓͕640x480

  8. ͋ͱ͸ bindToLifecycle ʹ౉͚ͩ͢ UseCaseΛ Մม௕഑ྻͰ౉ͤΔ

  9. ࣮ࡍͷίʔυ͸ Google Codelabs Λࢀর͍ͯͩ͘͠͞

  10. CameraXͷ৺഑ͳ఺ ɾ೔ຊ੡Android୺຤ʹෆ۩߹͕νϥϗϥ ɹɾCameraXϥϘͰςετࡁΈ୺຤͸΄ͱΜͲւ֎ϝʔΧʔ ɹɾ೔ຊ୺຤͸ର৅֎ʁ ɾϏσΦΩϟϓνϟ͸·ͩެࣜαϙʔτ͞Ε͍ͯͳ͍ ɹɾ·ͩ·ͩ։ൃதͩͱ͔

  11. CameraXͷࠓޙͷظ଴ ɾARͱͷ࿈ܞ ɹɾARͱCameraXͱͷ࿈ܞָ͕ʹ࣮૷Ͱ͖ͨΒ͍͍ͳ ɹɾʢެࣜYouTubeͰʮARʯͱ୯ޠ͕ग़͚ͨͩͰɺAR࿈ܞͷ৘ใ͕΄΅ͳ͍ʣ ɾը૾ղੳͷڧԽ ɹɾΦϯσόΠεͰͷ೔ຊޠೝࣝΛ଴๬ʢML Kitʣ ɾϏσΦΩϟϓνϟͷެࣜαϙʔτ

  12. ͍·͙͢৮ΕͯΈΑ͏ CameraX