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

アプリのアップデート浸透率を上げろ! 〜in-app updatesを実戦投入して見え...

masaibar
February 20, 2020

アプリのアップデート浸透率を上げろ! 〜in-app updatesを実戦投入して見えてきたもの〜 / in-app updates DroidKaigi 2020

DroidKaigi2020 Day1 16:00~
「アプリのアップデート浸透率を上げろ! 〜in-app updatesを実戦投入して見えてきたもの〜」での発表資料です。
サンプルコード:https://github.com/masaibar/in-app-updates-sample
Flexibleアップデートデモ動画:https://www.youtube.com/watch?v=d8BiKvVvziM
Immediateアップデートデモ動画:https://www.youtube.com/watch?v=cvlzcYV__4s

のぞきみ:https://play.google.com/store/apps/details?id=com.masaibar.nozokimi
PayHolder:https://play.google.com/store/apps/details?id=com.masaibar.payholder

masaibar

February 20, 2020
Tweet

More Decks by masaibar

Other Decks in Technology

Transcript

  1. Ξοϓσʔτૌٻࠓੲ JOBQQVQEBUFTͳ͍ͱ͖ Ξοϓσʔτ༗ແͷ֬ೝ "1* 3FNPUF$POGJH Ϣʔβʔ΁ͷ௨஌ μΠΞϩά ϩʔΧϧ௨஌ Ξοϓσʔτ ετΞ΁ඈ͹͢

    JOBQQVQEBUFT͋Δͱ͖ Ξοϓσʔτ༗ແͷ֬ೝ 1MBZ4UPSFΞϓϦͱ࿈ಈ Ϣʔβʔ΁ͷ௨஌ छྨͷ69 Ξοϓσʔτ
  2. Ξοϓσʔτૌٻࠓੲ JOBQQVQEBUFTͳ͍ͱ͖ Ξοϓσʔτ༗ແͷ֬ೝ "1* 3FNPUF$POGJH Ϣʔβʔ΁ͷ௨஌ μΠΞϩά ϩʔΧϧ௨஌ Ξοϓσʔτ ετΞ΁ඈ͹͢

    JOBQQVQEBUFT͋Δͱ͖ Ξοϓσʔτ༗ແͷ֬ೝ 1MBZ4UPSFΞϓϦͱ࿈ಈ Ϣʔβʔ΁ͷ௨஌ छྨͷ69 Ξοϓσʔτ ͦͷ৔ͰͰ͖Δ
  3. Ξοϓσʔτૌٻࠓੲ JOBQQVQEBUFTͳ͍ͱ͖ Ξοϓσʔτ༗ແͷ֬ೝ "1* 3FNPUF$POGJH Ϣʔβʔ΁ͷ௨஌ μΠΞϩά ϩʔΧϧ௨஌ Ξοϓσʔτ ετΞ΁ඈ͹͢

    JOBQQVQEBUFT͋Δͱ͖ Ξοϓσʔτ༗ແͷ֬ೝ 1MBZ4UPSFΞϓϦͱ࿈ಈ Ϣʔβʔ΁ͷ௨஌ छྨͷ69 Ξοϓσʔτ ͦͷ৔ͰͰ͖Δ
  4. ॳظԽϦεφʔͷొ࿥ͱղআ class MainActivity : AppCompatActivity(), InstallStateUpdatedListener { private lateinit var

    appUpdateManager: AppUpdateManager override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this) appUpdateManager.registerListener(this) } override fun onDestroy() { appUpdateManager.unregisterListener(this) super.onDestroy() } override fun onStateUpdate(state: InstallState) { } }
  5. ॳظԽϦεφʔͷొ࿥ͱղআ class MainActivity : AppCompatActivity(), InstallStateUpdatedListener { private lateinit var

    appUpdateManager: AppUpdateManager override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this) appUpdateManager.registerListener(this) } override fun onDestroy() { appUpdateManager.unregisterListener(this) super.onDestroy() } override fun onStateUpdate(state: InstallState) { } }
  6. ॳظԽϦεφʔͷొ࿥ͱղআ class MainActivity : AppCompatActivity(), InstallStateUpdatedListener { private lateinit var

    appUpdateManager: AppUpdateManager override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this) appUpdateManager.registerListener(this) } override fun onDestroy() { appUpdateManager.unregisterListener(this) super.onDestroy() } override fun onStateUpdate(state: InstallState) { } }
  7. ॳظԽϦεφʔͷొ࿥ͱղআ class MainActivity : AppCompatActivity(), InstallStateUpdatedListener { private lateinit var

    appUpdateManager: AppUpdateManager override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this) appUpdateManager.registerListener(this) } override fun onDestroy() { appUpdateManager.unregisterListener(this) super.onDestroy() } override fun onStateUpdate(state: InstallState) { } }
  8. ॳظԽϦεφʔͷొ࿥ͱղআ class MainActivity : AppCompatActivity(), InstallStateUpdatedListener { private lateinit var

    appUpdateManager: AppUpdateManager override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this) appUpdateManager.registerListener(this) } override fun onDestroy() { appUpdateManager.unregisterListener(this) super.onDestroy() } override fun onStateUpdate(state: InstallState) { } }
  9. Ξοϓσʔτ༗ແͷ֬ೝ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager.registerListener(this) appUpdateManager.appUpdateInfo.addOnSuccessListener {

    appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { // FlexibleΞοϓσʔτΛ࣮ߦ͢Δ } } }
  10. Ξοϓσʔτ༗ແͷ֬ೝ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager.registerListener(this) appUpdateManager.appUpdateInfo.addOnSuccessListener {

    appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { // FlexibleΞοϓσʔτΛ࣮ߦ͢Δ } } }
  11. Ξοϓσʔτ༗ແͷ֬ೝ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager.registerListener(this) appUpdateManager.appUpdateInfo.addOnSuccessListener {

    appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { // FlexibleΞοϓσʔτΛ࣮ߦ͢Δ } } }
  12. Ξοϓσʔτ༗ແͷ֬ೝ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager.registerListener(this) appUpdateManager.appUpdateInfo.addOnSuccessListener {

    appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { // FlexibleΞοϓσʔτΛ࣮ߦ͢Δ } } }
  13. ݹ͞ͷ֬ೝʢඇඞਢʣ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.clientVersionStalenessDays() != null && appUpdateInfo.clientVersionStalenessDays() >= DAYS_FOR_FLEXIBLE) && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) { // FlexibleΞοϓσʔτΛ࣮ߦ͢Δ } }
  14. ݹ͞ͷ֬ೝʢඇඞਢʣ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.clientVersionStalenessDays() != null && appUpdateInfo.clientVersionStalenessDays() >= DAYS_FOR_FLEXIBLE) && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) { // FlexibleΞοϓσʔτΛ࣮ߦ͢Δ } }
  15. ݹ͞ͷ֬ೝʢඇඞਢʣ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.clientVersionStalenessDays() != null && appUpdateInfo.clientVersionStalenessDays() >= DAYS_FOR_FLEXIBLE) && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) { // FlexibleΞοϓσʔτΛ࣮ߦ͢Δ } }
  16. ༏ઌ౓ͷ֬ೝʢඇඞਢʣ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.updatePriority() >= HIGH_PRIORITY_UPDATE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE) { // FlexibleΞοϓσʔτΛ࣮ߦ͢Δ } }
  17. appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.updatePriority()

    >= HIGH_PRIORITY_UPDATE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE) { // FlexibleΞοϓσʔτΛ࣮ߦ͢Δ } } ༏ઌ౓ͷ֬ೝʢඇඞਢʣ
  18. 'MFYJCMFμΠΞϩάͷදࣔ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.FLEXIBLE, this, REQUEST_CODE_FLEXIBLE ) } }
  19. 'MFYJCMFμΠΞϩάͷදࣔ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.FLEXIBLE, this, REQUEST_CODE_FLEXIBLE ) } }
  20. 'MFYJCMFμΠΞϩάͷදࣔ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.FLEXIBLE, this, REQUEST_CODE_FLEXIBLE ) } }
  21. 'MFYJCMFμΠΞϩάͷදࣔ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.FLEXIBLE, this, REQUEST_CODE_FLEXIBLE ) } }
  22. 'MFYJCMFμΠΞϩάͷදࣔ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.FLEXIBLE, this, REQUEST_CODE_FLEXIBLE ) } }
  23. 'MFYJCMFμΠΞϩάͷදࣔ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.FLEXIBLE, this, REQUEST_CODE_FLEXIBLE ) } }
  24. 'MFYJCMFμΠΞϩάͷදࣔ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&

    appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.FLEXIBLE, this, REQUEST_CODE_FLEXIBLE ) } }
  25. 'MFYJCMFಉҙঢ়گͷϋϯυϦϯά override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

    super.onActivityResult(requestCode, resultCode, data) if (requestCode == REQUEST_CODE_FLEXIBLE) { when (resultCode) { Activity.RESULT_OK -> { // ಉҙ } Activity.RESULT_CANCELED -> { // ڋ൱ɾΩϟϯηϧ } ActivityResult.RESULT_IN_APP_UPDATE_FAILED -> { // ࣦഊ } } } }
  26. 'MFYJCMFಉҙঢ়گͷϋϯυϦϯά override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

    super.onActivityResult(requestCode, resultCode, data) if (requestCode == REQUEST_CODE_FLEXIBLE) { when (resultCode) { Activity.RESULT_OK -> { // ಉҙ } Activity.RESULT_CANCELED -> { // ڋ൱ɾΩϟϯηϧ } ActivityResult.RESULT_IN_APP_UPDATE_FAILED -> { // ࣦഊ } } } }
  27. 'MFYJCMFಉҙঢ়گͷϋϯυϦϯά override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

    super.onActivityResult(requestCode, resultCode, data) if (requestCode == REQUEST_CODE_FLEXIBLE) { when (resultCode) { Activity.RESULT_OK -> { // ಉҙ } Activity.RESULT_CANCELED -> { // ڋ൱ɾΩϟϯηϧ } ActivityResult.RESULT_IN_APP_UPDATE_FAILED -> { // ࣦഊ } } } }
  28. 'MFYJCMFਐ௙ͷ؂ࢹʢඇඞਢʣ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if(appUpdateInfo.installStatus() == InstallStatus.DOWNLOADING) { val

    bytesDownloaded = appUpdateInfo.bytesDownloaded() val totalBytesToDownload = appUpdateInfo.totalBytesToDownload() // ϓϩάϨεόʔͷදࣔͳͲ } }
  29. 'MFYJCMFਐ௙ͷ؂ࢹʢඇඞਢʣ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if(appUpdateInfo.installStatus() == InstallStatus.DOWNLOADING) { val

    bytesDownloaded = appUpdateInfo.bytesDownloaded() val totalBytesToDownload = appUpdateInfo.totalBytesToDownload() // ϓϩάϨεόʔͷදࣔͳͲ } }
  30. 'MFYJCMFਐ௙ͷ؂ࢹʢඇඞਢʣ appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if(appUpdateInfo.installStatus() == InstallStatus.DOWNLOADING) { val

    bytesDownloaded = appUpdateInfo.bytesDownloaded() val totalBytesToDownload = appUpdateInfo.totalBytesToDownload() // ϓϩάϨεόʔͷදࣔͳͲ } }
  31. 'MFYJCMF׬ྃͷ؂ࢹͱ௨஌ྫ override fun onStateUpdate(state: InstallState?) { if (state?.installStatus() == InstallStatus.DOWNLOADED)

    { showDownloadedSnackbar() // SnackbarΛදࣔ͢Δ } } private fun showDownloadedSnackbar() { Snackbar.make( findViewById(R.id.layout_root), "ߋ৽͕μ΢ϯϩʔυ͞Ε·ͨ͠ɻ", Snackbar.LENGTH_INDEFINITE ).setAction("ߋ৽͢Δ") { appUpdateManager.completeUpdate() }.show() }
  32. 'MFYJCMF׬ྃͷ؂ࢹͱ௨஌ྫ override fun onStateUpdate(state: InstallState) { if (state?.installStatus() == InstallStatus.DOWNLOADED)

    { showDownloadedSnackbar() // SnackbarΛදࣔ͢Δ } } private fun showDownloadedSnackbar() { Snackbar.make( findViewById(R.id.layout_root), "ߋ৽͕μ΢ϯϩʔυ͞Ε·ͨ͠ɻ", Snackbar.LENGTH_INDEFINITE ).setAction("ߋ৽͢Δ") { appUpdateManager.completeUpdate() }.show() }
  33. *NNFEJBUFը໘ͷදࣔ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this)

    appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }
  34. *NNFEJBUFը໘ͷදࣔ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this)

    appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }
  35. *NNFEJBUFը໘ͷදࣔ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this)

    appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }
  36. *NNFEJBUFը໘ͷදࣔ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this)

    appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }
  37. *NNFEJBUFը໘ͷදࣔ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this)

    appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }
  38. *NNFEJBUFը໘ͷදࣔ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this)

    appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }
  39. *NNFEJBUFը໘ͷදࣔ override fun onCreate(savedInstanceState: Bundle?) { … appUpdateManager = AppUpdateManagerFactory.create(this)

    appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE) ) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }
  40. *NNFEJBUFಉҙঢ়گͷϋϯυϦϯά override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

    super.onActivityResult(requestCode, resultCode, data) if (requestCode == REQUEST_CODE_IMMEDIATE) { when (resultCode) { Activity.RESULT_OK -> { // ಉҙ(དྷͳ͍Մೳੑ͋Γ) } Activity.RESULT_CANCELED -> { // ڋ൱ɾΩϟϯηϧ } ActivityResult.RESULT_IN_APP_UPDATE_FAILED -> { // ࣦഊ } } } }
  41. *NNFEJBUFಉҙঢ়گͷϋϯυϦϯά override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

    super.onActivityResult(requestCode, resultCode, data) if (requestCode == REQUEST_CODE_IMMEDIATE) { when (resultCode) { Activity.RESULT_OK -> { // ಉҙ(དྷͳ͍Մೳੑ͋Γ) } Activity.RESULT_CANCELED -> { // ڋ൱ɾΩϟϯηϧ } ActivityResult.RESULT_IN_APP_UPDATE_FAILED -> { // ࣦഊ } } } }
  42. *NNFEJBUFಉҙঢ়گͷϋϯυϦϯά override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

    super.onActivityResult(requestCode, resultCode, data) if (requestCode == REQUEST_CODE_IMMEDIATE) { when (resultCode) { Activity.RESULT_OK -> { // ಉҙ(དྷͳ͍Մೳੑ͋Γ) } Activity.RESULT_CANCELED -> { // ڋ൱ɾΩϟϯηϧ } ActivityResult.RESULT_IN_APP_UPDATE_FAILED -> { // ࣦഊ } } } }
  43. *NNFEJBUF෮ؼ࣌ͷϋϯυϦϯά μ΢ϯϩʔυதʹΞϓϦ͔Β཭ΕΔ͜ͱΛ૝ఆ override fun onResume() { super.onResume() appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo

    -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }
  44. *NNFEJBUF෮ؼ࣌ͷϋϯυϦϯά μ΢ϯϩʔυதʹΞϓϦ͔Β཭ΕΔ͜ͱΛ૝ఆ override fun onResume() { super.onResume() appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo

    -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }
  45. *NNFEJBUF෮ؼ࣌ͷϋϯυϦϯά μ΢ϯϩʔυதʹΞϓϦ͔Β཭ΕΔ͜ͱΛ૝ఆ override fun onResume() { super.onResume() appUpdateManager.appUpdateInfo.addOnSuccessListener { appUpdateInfo

    -> if (appUpdateInfo.updateAvailability() == UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, REQUEST_CODE_IMMEDIATE ) } } }