搜索插件、代码仓与 APP 分类

in_app_update 封面
插件详情v5.0.0

in_app_update

使用官方 Android API 在 Android 上启用应用内更新。

Android
近 30 天下载
37.5万
喜欢数
1310
Pub 分数
160

安装插件

flutter pub add in_app_update

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

in_app_update 包通过利用官方 Android 应用内更新 API,实现了 Android 上的无缝应用内更新。它允许开发者在应用程序内部直接提示用户更新应用,从而提高用户留存率,并确保新功能和安全补丁能够及时交付。该包支持灵活更新和立即更新两种流程,提供流畅的升级体验,无需用户手动访问 Google Play 商店。该包可轻松集成到 Flutter 应用中,配置简单。

适合场景

  • 在运行时提示用户更新应用程序
  • 实施即时或灵活的更新策略
  • 提高应用程序更新的采用率
  • 确保用户保持在最新版本
  • 减少对外部应用商店更新的依赖

主要特点

  • 官方 Android API 集成
  • 支持灵活且即时的更新类型
  • 简单的 Flutter 界面
  • 自动更新状态检查
  • 跨版本兼容性

适合对象

  • 仅限 Android 的 Flutter 应用
  • 需要高更新合规性的应用
  • 开发人员内部管理应用生命周期
  • 在更新期间优先考虑用户体验的项目
  • 使用 Google Play 进行分发的团队

使用建议

  • 仅限 Android 平台
  • 需要 Google Play 服务
  • 不支持 iOS
  • 需要正确处理更新流程状态
  • 可能需要额外的权限或配置

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

pub package

Maintained by Jonas Bark

in_app_update

Enables In App Updates on Android using the official Android APIs.

https://developer.android.com/guide/app-bundle/in-app-updates

Documentation

The following methods are exposed:

  • Future<AppUpdateInfo> checkForUpdate(): Checks if there's an update available
  • Future<void> performImmediateUpdate(): Performs an immediate update (full-screen)
  • Future<void> startFlexibleUpdate(): Starts a flexible update (background download)
  • Future<void> completeFlexibleUpdate(): Actually installs an available flexible update

Please have a look in the example app on how to use it!

Android

This plugin integrates the official Android APIs to perform in app updated that were released in 2019: https://developer.android.com/guide/app-bundle/in-app-updates

iOS

iOS does not offer such a functionality. You might want to look into e.g. https://pub.dev/packages/upgrader. If you call the methods above on a iOS device you'll run into a not-implemented exception.

Troubleshooting

Getting ERROR_API_NOT_AVAILABLE error

Be aware that this plugin cannot be tested locally. It must be installed via Google Play to work. Please check the official documentation about In App Updates from Google:

https://developer.android.com/guide/playcore/in-app-updates/test

Update does not work on old Android versions

In App Updates are only available from API Versions >= 21, as mentioned here.

所属分类

源码仓库

使用此插件的项目

所在榜单