feat: in-app update check + download + install
Auto-check GitHub Releases latest on launch (24h throttle), show an update banner on the home screen, download the APK in-app with progress, and trigger the system installer via FileProvider + REQUEST_INSTALL_PACKAGES. - core/UpdateChecker: fetch releases/latest, semver compare, stream APK to externalFilesDir, install via FileProvider (handles MIUI unknown-sources). - SettingsStore: updateCheckEnabled / lastUpdateCheckTime / ignoredVersion. - HomeScreen: update banner + UpdateDialog. - SettingsScreen: "关于与更新" card with auto-check toggle and manual check. - manifest: REQUEST_INSTALL_PACKAGES + FileProvider; new res/xml/file_paths.xml. - version 1.4.2 -> 1.5.0 (versionCode 7 -> 8). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
|
||||
<application
|
||||
android:name=".A2iApp"
|
||||
@@ -45,5 +46,15 @@
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
Reference in New Issue
Block a user