LoginSignup
0
0

jetpack composeでcameraxとmlkitをつかってバーコード読み取り画面を実装するPart1

Posted at

はじめに

今回からJetpackComposeでのバーコード読み取り機能を実装していきます。

本文

今回は、まず必要なライブラリたちを追加するところからです
最近はtomlでバージョン管理をするのが流行なのでそれにのってってやっていきます

code-scanner = "18.3.0"
camerax = "1.4.0-beta01"

codescanner = {module = "com.google.android.gms:play-services-mlkit-barcode-scanning", version.ref = "code-scanner"}
camera = { module = "androidx.camera:camera-camera2", version.ref = "camerax" }
camera-lifecycle = { module = "androidx.camera:camera-lifecycle", version.ref = "camerax" }
camera-view = { module = "androidx.camera:camera-view", version.ref = "camerax" }
implementation(libs.codescanner)
    implementation(libs.camera.view)
    implementation(libs.camera.lifecycle)
    implementation(libs.camera)

さいごに

次はカメラの実装部分をやっていこうと思います
次の記事を書き次第下記に追加していきます

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0