maui: phase 6 (Essentials) — docs verdict, no code change needed#271
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR closes out Phase 6 (Essentials) of the MAUI Compose backend with a no-op verdict: all Microsoft.Maui.* Essentials APIs work unchanged under UseAndroidXCompose() because they wrap platform APIs (Intent, SharedPreferences, LocationManager, etc.) that are independent of the handler chain. The PR delivers a comprehensive sample page proving this, wiring, manifest permissions, and documentation.
Changes:
- New
EssentialsPage(XAML + code-behind) exercising ~18 Essentials APIs with per-row result labels for on-device verification, plusAppShellroute andHomePagecatalog entry. AndroidManifest.xmlgainsVIBRATE, location,FLASHLIGHT, andCAMERApermissions needed by the interactive Essentials APIs on the page.docs/maui-backend.mdPhase 6 section rewritten from a speculative plan to a definitive investigation verdict with a per-API coverage table and future-work caveat.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/Microsoft.AndroidX.Compose.Maui.Sample/Pages/EssentialsPage.xaml |
New XAML page layout with snapshot labels, storage round-trip buttons, feedback/intent/permission-gated sections. |
src/Microsoft.AndroidX.Compose.Maui.Sample/Pages/EssentialsPage.xaml.cs |
Code-behind populating snapshot labels on load and handling button taps for each Essentials API with result feedback. |
src/Microsoft.AndroidX.Compose.Maui.Sample/HomePage.xaml.cs |
Adds "Essentials" entry to the gallery index. |
src/Microsoft.AndroidX.Compose.Maui.Sample/AppShell.xaml.cs |
Registers "essentials" Shell route. |
src/Microsoft.AndroidX.Compose.Maui.Sample/Platforms/Android/AndroidManifest.xml |
Declares permissions for Vibration, Location, Flashlight, and Camera. |
docs/maui-backend.md |
Replaces speculative Phase 6 plan with the no-op investigation verdict, API coverage table, and future-work notes. |
05ab479 to
d7ae5ba
Compare
Phase 6 was always optional. After investigation, no Compose-specific Essentials implementations are needed: `Microsoft.Maui.*` Essentials APIs (`IBattery`, `IConnectivity`, `IPreferences`, `ISecureStorage`, `IGeolocation`, `IFilePicker`, `IShare`, `IClipboard`, `IBrowser`, `IHapticFeedback`, `IVibration`, `IFlashlight`, `IEmail`, `ISms`, `IPhoneDialer`, `IMediaPicker`, `ILauncher`, `IFileSystem`, `IAppInfo`, `IDeviceInfo`) wrap platform APIs (`Intent`, `SharedPreferences`, `EncryptedSharedPreferences`, `LocationManager`, `ClipboardManager`, `Vibrator`, `Camera2`, system services) and are independent of the handler chain. `UseAndroidXCompose()` only swaps handler registrations; the stock MAUI.Essentials Android implementations resolve through DI and run unchanged. Rewrites the Phase 6 section in `docs/maui-backend.md` as the investigation verdict + per-API coverage table + "when future work might be needed" caveat. The only future case is a `Compose<IFilePicker>` / `Compose<IShare>` overlay if a Material 3 native picker UX is ever required; the system intent is the platform-correct UX, so this stays a deferred follow-up. No production code or sample changes — by design. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d7ae5ba to
41bb7a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verdict: Phase 6 is a no-op
After investigation, no Compose-specific Essentials implementations
are needed.
Microsoft.Maui.*Essentials APIs (IBattery,IConnectivity,IPreferences,ISecureStorage,IGeolocation,IFilePicker,IShare,IClipboard,IBrowser,IHapticFeedback,IVibration,IFlashlight,IEmail,ISms,IPhoneDialer,IMediaPicker,ILauncher,IFileSystem,IAppInfo,IDeviceInfo) wrap platformAPIs (
Intent,SharedPreferences,EncryptedSharedPreferences,LocationManager,ClipboardManager,Vibrator,Camera2, systemservices) and are independent of the handler chain.
UseAndroidXCompose()only swaps handler registrations — it does nottouch the Essentials DI registrations — so MAUI's stock Android
Essentials implementations resolve unchanged.
The sample uses
MauiAppCompatActivity(unchanged by this backend),so even APIs walking
Platform.CurrentActivityfind the activitytype they expect.
What changed
docs/maui-backend.md— Phase 6 section rewritten as theinvestigation verdict + per-API coverage table + "when future work
might be needed" caveat. The only future case is a
Compose<IFilePicker>/Compose<IShare>overlay if a Material 3native picker UX is ever required; the system intent is the
platform-correct UX, so this stays a deferred follow-up.
No production code or sample changes — by design.