how to get started in developing Android app

punchdrunker
February 08, 2018

how to get started in developing Android app

DroidKaigi2018での発表資料です

punchdrunker

February 08, 2018

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

36 slides
  1. We are 七尾 貴史 / punchdrunker 2009年 GDDでHT-03A(Android1.5)を貰っ て、Androidアプリを作り始め、同時期にiOS アプリ開発も始める

    2011年 ミクシィ入社 SNS mixiの開発 2016年 家族アルバムみてねの開発 菊間 英行 / hidey 2010年 ミクシィ入社 APIの開発 2011年 mixi API SDK for Android の開発を担 当 2012年 SNS mixi Android版の開発 2015年 モンスト海外版のクライアント開発 2017年 minimoの開発
  2. Index このセッションでは以下の内容について解説します • 開発環境の準備 • 基礎知識 • Activity と Fragment

    • レイアウト • 通知 • 非同期処理とネットワーク通信 • アーキテクチャ • テストとCI • デバッグ
  3. See also • Android Studio30分集中超絶技巧100選(day2 10:30) • buildに関するドキュメント ◦ https://developer.android.com/studio/projects/index.html

    ◦ https://developer.android.com/studio/build/index.html ◦ https://developer.android.com/studio/build/gradle-tips.html ◦ https://docs.gradle.org/current/userguide/userguide.html ◦ http://google.github.io/android-gradle-dsl/current/ • アプリマニフェスト ◦ https://developer.android.com/guide/topics/manifest/manifest-intro.html
  4. See also • Activityの公式ドキュメント ◦ https://developer.android.com/guide/components/activities.html • IntentとIntent Filter ◦

    https://developer.android.com/guide/components/intents-filters.html • 一般的なIntent ◦ https://developer.android.com/guide/components/intents-common.html • タスクとバックスタック ◦ https://developer.android.com/guide/components/tasks-and-back-stack.h tml • システムパーミッション ◦ https://developer.android.com/guide/topics/security/permissions.html ◦ PermissionsDispatcher ▪ https://github.com/permissions-dispatcher/PermissionsDispatcher
  5. Resource Androidアプリ開発ではリソースという言葉がよく出てきますが、一般的 にはresディレクトリ内にあるような以下のものは全てリソースです。 • string • drawable • layout •

    style • color 各ディレクトリやファイルは -v21 や -ja などの語尾をつける事によって OSバージョンや言語などの優先指定をすることができます。
  6. Layout サンプルアプリのLayoutActivityを例にどの ような部品を使えるのか眺めてみましょう • レイアウト ◦ LinearLayout , ConstraintLayout ...

    • コンポーネント ◦ Button, TextView, ImageView... • ナビゲーション ◦ DrawerLayout, TabLayout... • リスト ◦ ListView, RecyclerView... • DataBinding
  7. DataBinding 使い方 • 外側を<layout>タグで囲む • Make ProjectするとパスカルケースでBindingクラスが生成される ◦ activity_layout.xmlならActivityLayoutBindingというクラスが 生成される

    • xmlの部品にandroid:idを振っておくと、binding.likeButtonのように 参照できる • <data>タグの中に<variable>タグを記述すると変数をアサイン出来 る
  8. See also • DataBindingのコードを読む (day1 14:00) • データバインディングライブラリ(公式ガイド) ◦ https://developer.android.com/topic/libraries/data-binding/i

    ndex.html?hl=ja • 3分で分かる?Android OのAdaptive Iconに対応しよう ◦ https://qiita.com/takahirom/items/696fb5ecaa230fa8f755
  9. NotificationChannel NotificationChannelGroup Notification • 通知 ⧣ プッシュ通知 • Android8.0から NotificationChannel必須

    NotificationChannelを作成 Android8.0以上? ChannelIdを指定して通知を表 示 YES NO
  10. create NotificationChannel // 通知チャンネルを作成して val channel = NotificationChannel(“channel_id”, “表示名”, impotance)

    notificationManager.createNotificationChannel(channel) // 通知チャンネルを指定する val builder = NotificationCompat.Builder(this, “channel_id”) .setSmallIcon(R.drawable.ic_notification) .setContentTitle("this is title") .setContentText("Hello!") // 通知を表示 notificationManager.notify(notificationAppId, builder.build())
  11. See also • 開発者が知っておきたい通知の歴史 (day2 18:30-) • マーケティングオートメーションツールとアプリエンジニア プッシュ通 知・お知らせダイアローグの運用自動化のためのお仕事

    (day2 14:50-) • Notifications - material.io ◦ https://material.io/guidelines/patterns/notifications.html • 通知 APIガイド (日本語は内容が古いので、英語を開いてください) ◦ https://developer.android.com/guide/topics/ui/notifiers/noti fications.html?#ManageChannels
  12. Architecture • Androidで見かけるアーキテクチャ ◦ MVP ◦ MVVM ◦ Android Clean

    Architecture • アーキテクチャを導入することでやりたいこと
  13. See also • How to improve your MVP architecture and

    tests (day1 11:20) • Inside Android Architecture Components(day1 11:20) • Android Back to the Future(day1 12:50) • Android における Model-View-Intent アーキテクチャ(day1 12:50) • MVVMベストプラクティス(day1 15:40) • Kotlin版CleanArchitectureのテンプレート作ったら爆速開発になった話+α(day1 16:50) • Flux: Utilize unidirectional data flow to think less and scale faster(day2 11:20) • All you need is isolating the domain (How to apply DDD to Android Application Development 2) (day2 15:40)
  14. See also • Android アプリ設計パターン入門 ◦ https://peaks.cc/books/architecture_patterns • Androidアーキテクチャことはじめ ―

    選定する意味と、MVP、Clean Architecture、MVVM、Fluxの特徴を理解する ◦ https://employment.en-japan.com/engineerhub/entry/2018/01/17/1100 00 • Android Architecture Blueprints ◦ https://github.com/googlesamples/android-architecture ◦ いくつかのアーキテクチャのサンプル実装 • Android-CleanArchitecture ◦ https://github.com/android10/Android-CleanArchitecture • Flux ◦ https://github.com/facebook/flux
  15. See also • はじめてのUnit Test (day1 14:00) • UIテストの実行時間を短縮させる方法 (day2

    18:30-) • アプリのテスト(公式リファレンス) ◦ https://developer.android.com/studio/test/index.html? hl=ja
  16. おまけ おすすめの情報収集方法 (全部英語です ) • https://www.reddit.com/r/androiddev/ • https://android-developers.googleblog.com/ • https://blog.jetbrains.com/kotlin/

    • https://blog.gradle.org/ • https://medium.com/google-developers 英語が苦手な人は英語の情報を追いかけてる人をフォローすると よさそう
  17. FIN

More Decks by punchdrunker

Other Decks in Technology