remote_in_app_update
A Flutter plugin to download and install remote APKs directly from your app with support for progress, download speed, and estimated time remaining (ETA).
โ ๏ธ Android only
โจ Features
- ๐ฅ Download APK from any URL
- ๐ Real-time progress tracking
- โก Download speed & ETA updates
- ๐ Secure installation using
FileProvider
- ๐ All logic handled by plugin (Manifest, XML, etc.)
- โ Just one simple API call from your Flutter app
๐ Installation
Add the plugin to your pubspec.yaml
:
dependencies:
remote_in_app_update: ^<latest_version>
Then run:
flutter pub get
๐ ๏ธ Usage
import 'package:remote_in_app_update/remote_in_app_update.dart';
RemoteInAppUpdate().startUpdate(
apkUrl: 'https://your-server.com/path/to/app.apk',
onProgress: (progress) {
print('Progress: $progress%');
},
onSpeed: (speed) {
print('Speed: $speed KB/s');
},
onETA: (eta) {
print('ETA: $eta seconds');
},
onDownloaded: () {
print('Download complete. Installing...');
},
onError: (error) {
print('Error: $error');
},
);
๐งพ Permissions
Add the following permissions to your AndroidManifest.xml
:
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Note: For Android 10+ (API 29+), use
MANAGE_EXTERNAL_STORAGE
or switch to scoped storage.
โ๏ธ Android Configuration
No manual changes are required in your app. The plugin handles:
- FileProvider setup
- Manifest declarations
- Required XML files
Everything is auto-handled within the plugin.
๐ฆ Example
Check out the example app for a full working demo.
๐ License
MIT License
Engineered by Ankit Gauswami ๐ ๏ธ
Because great apps deserve better updates. ๐