diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-22 09:17:31 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-22 09:17:31 +0300 |
| commit | 1824175276fcd29d4b6d4c14277c62e73247b7e2 (patch) | |
| tree | b32c9867f24d4ca34bb5a902adb9fb508ddc00d1 /player-android/android/app | |
| parent | 1b66b5f573c8de883947d712057ff85f5513e8ae (diff) | |
Implement public ShareViewerScreen with Android deep-link intent-filter (9b)
- New ShareViewerScreen (/share/:token): unauthenticated share-viewer that
fetches share metadata via publicApiClientProvider, renders filename, type,
duration, thumbnail, and a Play button routing to the video/audio player.
- New publicApiClientProvider: bare Dio client (no auth interceptors) for the
public share endpoint; shares kPlayerBaseUrl with the authenticated client.
- AndroidManifest: http + https deep-link intent-filters for /share/.* so
Android routes share URLs directly into the app (App Links / autoVerify).
- router.dart: /share/:token bypasses the authentication redirect; guard uses
AppRoutes.shareViewerPrefix constant instead of a raw '/share/' string (DIP).
- app_routes.dart: shareViewer route constant, shareViewerPrefix, shareViewerPath helper.
- error_mappers.dart: shareViewerErrorMessage — 404 invalid/revoked, 410 expired.
- player_api_client.dart: baseUrl getter encapsulates rawDio.options.baseUrl so
screens never access transport internals directly (ISP, DIP).
- Review fixes: OCP icon map in _FallbackThumbnail, LSP explicit baseUrl
overrides in test fakes, DIP shareViewerPrefix constant.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'player-android/android/app')
| -rw-r--r-- | player-android/android/app/src/main/AndroidManifest.xml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/player-android/android/app/src/main/AndroidManifest.xml b/player-android/android/app/src/main/AndroidManifest.xml index 602051c..3276ad7 100644 --- a/player-android/android/app/src/main/AndroidManifest.xml +++ b/player-android/android/app/src/main/AndroidManifest.xml @@ -29,6 +29,36 @@ <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> + <!-- Deep-link intent-filter for public share URLs. + When a user opens a link of the form + https://<PLAYER_HOST>/share/<token> + Android routes the intent to this activity and go_router + navigates to the ShareViewerScreen (/share/:token). + Replace PLAYER_HOST with the real server hostname (e.g. + player.example.com) for production deployments; the wildcard + host below accepts any host for development flexibility. + android:autoVerify="true" enables App Links (verified deep + links) once an assetlinks.json file is served at the host; + without verification the OS shows the disambiguation dialog. + Both http and https schemes are declared so links work with + self-signed or non-TLS development servers as well as + production HTTPS deployments. --> + <intent-filter android:autoVerify="true"> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.BROWSABLE" /> + <data android:scheme="https" + android:host="PLAYER_HOST" + android:pathPattern="/share/.*" /> + </intent-filter> + <intent-filter android:autoVerify="true"> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.BROWSABLE" /> + <data android:scheme="http" + android:host="PLAYER_HOST" + android:pathPattern="/share/.*" /> + </intent-filter> </activity> <meta-data android:name="flutterEmbedding" |
