11# GeneralUpdate.Maui
22
3- [ ![ Stars] (https://img.shields.io/github/stars/{{GitHub Owner}}/{{Repository Name}} ?style=flat-square)] (https://github.com/{{GitHub Owner}}/{{Repository Name}} /stargazers)
4- [ ![ Forks] (https://img.shields.io/github/forks/{{GitHub Owner}}/{{Repository Name}} ?style=flat-square)] (https://github.com/{{GitHub Owner}}/{{Repository Name}} /network/members)
5- [ ![ License] (https://img.shields.io/github /license/{{GitHub Owner}}/{{Repository Name}} ?style=flat-square)] ( ./LICENSE )
6- [ ![ Version ] ( https://img.shields.io/badge/version-{{Version}}-blue ?style=flat-square )] (https://github.com/{{GitHub Owner}}/{{Repository Name}}/releases )
3+ [ ![ GitHub Stars] ( https://img.shields.io/github/stars/GeneralLibrary/GeneralUpdate.Maui ?style=flat-square )] ( https://github.com/GeneralLibrary/GeneralUpdate.Maui /stargazers )
4+ [ ![ GitHub Forks] ( https://img.shields.io/github/forks/GeneralLibrary/GeneralUpdate.Maui ?style=flat-square )] ( https://github.com/GeneralLibrary/GeneralUpdate.Maui /network/members )
5+ [ ![ License] ( https://img.shields.io/badge /license-Apache%202.0-blue.svg ?style=flat-square )] ( ./LICENSE )
6+ [ ![ NuGet ] ( https://img.shields.io/nuget/v/GeneralUpdate.Maui.Android ?style=flat-square )] ( https://www.nuget.org/packages/GeneralUpdate.Maui.Android/ )
77
88[ 简体中文] ( ./README.md )
99
1010---
1111
1212## Introduction
1313
14- ** GeneralUpdate.Maui** is an auto- update capability library for the .NET MAUI ecosystem, designed to provide a standardized, extensible, and maintainable update workflow .
14+ ` GeneralUpdate.Maui ` is an update capabilities repository for .NET MAUI applications. Its current core module, ` GeneralUpdate.Maui.Android ` , provides a UI-free Android auto- update orchestration pipeline targeting ` net10.0-android ` for .NET MAUI apps .
1515
16- The project currently focuses on Android and provides a UI-less update orchestration core that can be integrated into enterprise apps, utility libraries, component libraries, and business systems .
16+ The project breaks the update workflow into composable abstractions, so you can replace version comparison, downloading, hash validation, installer launching, logging, and event dispatching based on your architecture .
1717
1818## Core Features
1919
20- - ** Update validation ** : Supports version checks and update eligibility validation.
21- - ** Resumable download ** : Implements resumable package downloads based on HTTP Range.
22- - ** Integrity verification ** : Built-in SHA256 verification for package integrity and safety.
23- - ** Installer triggering ** : Supports Android ` FileProvider ` and system installer intents.
24- - ** Event-driven workflow ** : Exposes lifecycle and download-statistics events for monitoring and extension.
20+ - ** UI-free Android update core ** : Host applications fully control dialogs, progress, and error presentation.
21+ - ** End-to-end update flow ** : validation → resumable download → SHA-256 verification → installer launch.
22+ - ** Extensible architecture ** : ` IVersionComparer ` , ` IUpdateDownloader ` , ` IHashValidator ` , ` IApkInstaller ` , and more are replaceable.
23+ - ** Resumable downloading ** : sidecar metadata + streaming writes for better reliability on unstable networks.
24+ - ** Unified event model ** : built-in validation, progress, completion, and failure events for UI/log integration.
2525
2626## Quick Start
2727
28- ### 1. Prerequisites
28+ ### Prerequisites
2929
30- - .NET SDK: ` {{.NET SDK Version}} ` (recommended ` 10.0 ` or later)
31- - Target platform: ` {{Target Platform}} ` (for example, ` Android ` )
32- - Optional IDE: ` {{IDE}} ` (for example, Visual Studio / JetBrains Rider)
30+ - .NET SDK: ` 10.0+ `
31+ - Platform: ` Android (net10.0-android) `
32+ - .NET MAUI: ` 10.0+ `
33+ - Git: ` 2.30+ `
3334
34- ### 2. Installation
35+ ### Installation
36+
37+ 1 . Clone the repository
3538
3639``` bash
37- dotnet add {{Project Path}} package {{Package Name}} --version {{Package Version}}
40+ git clone https://github.com/GeneralLibrary/GeneralUpdate.Maui.git
41+ cd GeneralUpdate.Maui
3842```
3943
40- Or use your project's standard dependency management command:
44+ 2 . Install dependencies (NuGet package consumption)
4145
4246``` bash
43- {{Installation Command}}
47+ dotnet add package GeneralUpdate.Maui.Android
4448```
4549
46- ### 3. Basic Usage
50+ 3 . Build and test locally (repository development)
51+
52+ ``` bash
53+ dotnet test src/GeneralUpdate.Maui.Android.Tests/GeneralUpdate.Maui.Android.Tests.csproj -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0
54+ ```
55+
56+ ### Basic Usage
4757
4858``` csharp
4959using GeneralUpdate .Maui .Android .Models ;
@@ -58,20 +68,20 @@ bootstrap.AddListenerValidate += (_, e) =>
5868
5969var package = new UpdatePackageInfo
6070{
61- Version = " {{Target Version}} " ,
62- VersionName = " {{Target Version Name}} " ,
63- ReleaseNotes = " {{Release Notes}} " ,
64- DownloadUrl = " {{Download Url}} " ,
65- Sha256 = " {{SHA256 Value}} " ,
66- PackageSize = {{ Package Size }}
71+ Version = " 2.3.0 " ,
72+ VersionName = " 2.3.0 " ,
73+ ReleaseNotes = " Fixes known issues and improves stability. " ,
74+ DownloadUrl = " https://example.com/app-release.apk " ,
75+ Sha256 = " REPLACE_WITH_ACTUAL_SHA256_HASH " ,
76+ PackageSize = 1024 * 1024 * 50
6777};
6878
6979var options = new UpdateOptions
7080{
71- CurrentVersion = " {{Current Version}} " ,
81+ CurrentVersion = " 2.2.1 " ,
7282 InstallOptions = new AndroidInstallOptions
7383 {
74- FileProviderAuthority = " {{FileProvider Authority}} "
84+ FileProviderAuthority = " com.example.app.generalupdate.fileprovider "
7585 }
7686};
7787
@@ -85,37 +95,34 @@ if (check.IsUpdateAvailable)
8595## Directory Structure
8696
8797``` text
88- {{Repository Name}}/
98+ GeneralUpdate.Maui/
99+ ├── src/
100+ │ ├── GeneralUpdate.Maui.Android/ # Android auto-update core library
101+ │ └── GeneralUpdate.Maui.Android.Tests/ # Unit tests
89102├── README.md
90103├── README-EN.md
91- ├── LICENSE
92- └── src/
93- ├── GeneralUpdate.Maui.Android/
94- └── GeneralUpdate.Maui.Android.Tests/
104+ └── LICENSE
95105```
96106
97107## Contributing
98108
99- Contributions are welcome through the standard GitHub collaboration workflow:
100-
101- 1 . Fork this repository.
102- 2 . Create a feature branch: ` git checkout -b feature/{{feature-name}} ` .
103- 3 . Follow the project coding standards and complete required tests.
104- 4 . Commit your changes: ` git commit -m "feat: {{change summary}}" ` .
105- 5 . Push your branch and open a Pull Request.
106-
107- Before submitting a PR, please make sure:
109+ Contributions are welcome through the standard GitHub workflow:
108110
109- - your change scope is clear and focused;
110- - related docs and examples are updated;
111- - no new security risks or breaking behavior are introduced.
111+ 1 . Fork this repository and create a branch from ` main ` : ` feature/your-change ` .
112+ 2 . Keep changes focused and follow existing style and naming conventions.
113+ 3 . Run the existing tests before submitting:
114+ ``` bash
115+ dotnet test src/GeneralUpdate.Maui.Android.Tests/GeneralUpdate.Maui.Android.Tests.csproj -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0
116+ ```
117+ 4 . Open a Pull Request describing motivation, implementation details, and compatibility impact.
118+ 5 . Iterate based on review feedback, then merge and delete the branch.
112119
113120## License
114121
115122This project is licensed under the ** Apache License 2.0** . See [ LICENSE] ( ./LICENSE ) for details.
116123
117124## Contact
118125
119- - Maintainer: ` {{Maintainer Name}} `
120- - Email: ` {{Contact Email}} `
121- - Issue Tracker: < https://github.com/{{GitHub Owner}}/{{Repository Name}}/issues>
126+ - Repository: https://github.com/GeneralLibrary/GeneralUpdate.Maui
127+ - Issue Tracker: https://github.com/GeneralLibrary/GeneralUpdate.Maui/issues
128+ - Discussions: https://github.com/GeneralLibrary/GeneralUpdate.Maui/discussions
0 commit comments