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

Android 10 対応 Tips

Android 10 対応 Tips

Android 10(target sdk version 29)に対応したときに考慮したことをご紹介します

katsuki-nakatani

February 16, 2020
Tweet

More Decks by katsuki-nakatani

Other Decks in Technology

Transcript

  1. changes in Android 10 ・Gesture Navigation ・Dark Theme ・Location Permisison(use

    foreground only or full supported) ・External Storage Security ・Supported Foldable device ・Role
  2. Whats 「DayNight」? https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/theme/res values-night/themes_daynight.xml <style name="Theme.MaterialComponents.DayNight" parent="Theme.MaterialComponents"/> <style name="Theme.MaterialComponents.DayNight.DarkActionBar" parent="Theme.MaterialComponents"/>

    <style name="Theme.MaterialComponents.DayNight.NoActionBar" parent="Theme.MaterialComponents.NoActionBar"/> <style name="Theme.MaterialComponents.DayNight.DialogWhenLarge" parent="Theme.MaterialComponents.DialogWhenLarge"/> values/themes_daynight.xml <style name="Theme.MaterialComponents.DayNight" parent="Theme.MaterialComponents.Light"/> <style name="Theme.MaterialComponents.DayNight.DarkActionBar" parent="Theme.MaterialComponents.Light.DarkActionBar"/> <style name="Theme.MaterialComponents.DayNight.NoActionBar" parent="Theme.MaterialComponents.Light.NoActionBar"/> <style name="Theme.MaterialComponents.DayNight.DialogWhenLarge" parent="Theme.MaterialComponents.Light.DialogWhenLarge"/>
  3. Role Manager 自分がその機能のデフォルトに設定されているかどうか (getSystemService(Context.TELECOM_SERVICE) as TelecomManager).let { TextUtils.equals(it.defaultDialerPackage, packageName) }

    (getSystemService(Context.ROLE_SERVICE) as RoleManager).let { it.isRoleAvailable(RoleManager.ROLE_DIALER) && it.isRoleHeld(RoleManager.ROLE_DIALER) } Android 6.0 〜 Android9.0 Android 10