opt: appScheme
This commit is contained in:
@ -12,7 +12,6 @@
|
|||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<data android:scheme="https" />
|
<data android:scheme="https" />
|
||||||
</intent>
|
</intent>
|
||||||
|
|
||||||
</queries>
|
</queries>
|
||||||
<queries>
|
<queries>
|
||||||
<intent>
|
<intent>
|
||||||
@ -20,7 +19,6 @@
|
|||||||
"android.support.customtabs.action.CustomTabsService" />
|
"android.support.customtabs.action.CustomTabsService" />
|
||||||
</intent>
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
<!-- If your app checks for http support -->
|
<!-- If your app checks for http support -->
|
||||||
<intent>
|
<intent>
|
||||||
@ -34,7 +32,6 @@
|
|||||||
<data android:scheme="https" />
|
<data android:scheme="https" />
|
||||||
</intent>
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="PiliPala"
|
android:label="PiliPala"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
@ -144,102 +141,55 @@
|
|||||||
<data android:scheme="bilibili" android:host="assistant" />
|
<data android:scheme="bilibili" android:host="assistant" />
|
||||||
<data android:scheme="bilibili" android:host="feedback" />
|
<data android:scheme="bilibili" android:host="feedback" />
|
||||||
<data android:scheme="bilibili" android:host="auth" android:path="/launch" />
|
<data android:scheme="bilibili" android:host="auth" android:path="/launch" />
|
||||||
|
|
||||||
<data android:scheme="http" android:host="live.bilibili.com"
|
|
||||||
android:pathPattern="/live/.*" />
|
|
||||||
<data android:scheme="https" android:host="live.bilibili.com"
|
<data android:scheme="https" android:host="live.bilibili.com"
|
||||||
android:pathPattern="/live/.*" />
|
android:pathPattern="/live/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/video/.*" />
|
android:pathPattern="/video/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.tv"
|
|
||||||
android:pathPattern="/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.tv"
|
<data android:scheme="https" android:host="www.bilibili.tv"
|
||||||
android:pathPattern="/video/.*" />
|
android:pathPattern="/video/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.cn"
|
|
||||||
android:pathPattern="/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.cn"
|
<data android:scheme="https" android:host="www.bilibili.cn"
|
||||||
android:pathPattern="/video/.*" />
|
android:pathPattern="/video/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/mobile/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/mobile/video/.*" />
|
android:pathPattern="/mobile/video/.*" />
|
||||||
<data android:scheme="http" android:host="m.bilibili.com"
|
|
||||||
android:pathPattern="/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="m.bilibili.com"
|
<data android:scheme="https" android:host="m.bilibili.com"
|
||||||
android:pathPattern="/video/.*" />
|
android:pathPattern="/video/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/story/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/story/.*" />
|
android:pathPattern="/story/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/bangumi/i/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/bangumi/i/.*" />
|
android:pathPattern="/bangumi/i/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/mobile/bangumi/i/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/mobile/bangumi/i/.*" />
|
android:pathPattern="/mobile/bangumi/i/.*" />
|
||||||
<data android:scheme="http" android:host="bangumi.bilibili.com"
|
|
||||||
android:pathPattern="/.*" />
|
|
||||||
<data android:scheme="https" android:host="bangumi.bilibili.com"
|
<data android:scheme="https" android:host="bangumi.bilibili.com"
|
||||||
android:pathPattern="/.*" />
|
android:pathPattern="/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/bangumi/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/bangumi/.*" />
|
android:pathPattern="/bangumi/.*" />
|
||||||
<data android:scheme="http" android:host="m.bilibili.com"
|
|
||||||
android:pathPattern="/bangumi/.*" />
|
|
||||||
<data android:scheme="https" android:host="m.bilibili.com"
|
<data android:scheme="https" android:host="m.bilibili.com"
|
||||||
android:pathPattern="/bangumi/.*" />
|
android:pathPattern="/bangumi/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/cheese/play/ss.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/cheese/play/ss.*" />
|
android:pathPattern="/cheese/play/ss.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/cheese/play/ep.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/cheese/play/ep.*" />
|
android:pathPattern="/cheese/play/ep.*" />
|
||||||
<data android:scheme="http" android:host="m.bilibili.com"
|
|
||||||
android:pathPattern="/bangumi/play/ss.*" />
|
|
||||||
<data android:scheme="https" android:host="m.bilibili.com"
|
<data android:scheme="https" android:host="m.bilibili.com"
|
||||||
android:pathPattern="/cheese/play/ss.*" />
|
android:pathPattern="/cheese/play/ss.*" />
|
||||||
<data android:scheme="http" android:host="m.bilibili.com"
|
|
||||||
android:pathPattern="/cheese/play/ep.*" />
|
|
||||||
<data android:scheme="https" android:host="m.bilibili.com"
|
<data android:scheme="https" android:host="m.bilibili.com"
|
||||||
android:pathPattern="/cheese/play/ep.*" />
|
android:pathPattern="/cheese/play/ep.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/read/cv.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/read/cv.*" />
|
android:pathPattern="/read/cv.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com" android:path="/review/" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com" android:path="/review/" />
|
<data android:scheme="https" android:host="www.bilibili.com" android:path="/review/" />
|
||||||
<data android:scheme="http" android:host="bilibili.cn"
|
|
||||||
android:pathPattern="/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="bilibili.cn"
|
<data android:scheme="https" android:host="bilibili.cn"
|
||||||
android:pathPattern="/video/.*" />
|
android:pathPattern="/video/.*" />
|
||||||
<data android:scheme="http" android:host="bilibili.com"
|
|
||||||
android:pathPattern="/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="bilibili.com"
|
<data android:scheme="https" android:host="bilibili.com"
|
||||||
android:pathPattern="/video/.*" />
|
android:pathPattern="/video/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.cn"
|
|
||||||
android:pathPattern="/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.cn"
|
<data android:scheme="https" android:host="www.bilibili.cn"
|
||||||
android:pathPattern="/video/.*" />
|
android:pathPattern="/video/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/video/.*" />
|
android:pathPattern="/video/.*" />
|
||||||
<data android:scheme="http" android:host="www.bilibili.com"
|
|
||||||
android:pathPattern="/mobile/video/.*" />
|
|
||||||
<data android:scheme="https" android:host="www.bilibili.com"
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
android:pathPattern="/mobile/video/.*" />
|
android:pathPattern="/mobile/video/.*" />
|
||||||
<data android:scheme="https" android:host="b23.tv"
|
<data android:scheme="https" android:host="b23.tv"
|
||||||
android:pathPattern="/*" />
|
android:pathPattern="/*" />
|
||||||
<data android:scheme="https" android:host="space.bilibili.com"
|
<data android:scheme="https" android:host="space.bilibili.com"
|
||||||
android:pathPattern="/*" />
|
android:pathPattern="/*" />
|
||||||
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<service
|
<service
|
||||||
@ -251,7 +201,6 @@
|
|||||||
<action android:name="android.media.browse.MediaBrowserService" />
|
<action android:name="android.media.browse.MediaBrowserService" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name="com.ryanheise.audioservice.MediaButtonReceiver"
|
android:name="com.ryanheise.audioservice.MediaButtonReceiver"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
@ -259,7 +208,7 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
<!-- Don't delete the meta-data below.
|
<!-- Don't delete the meta-data below.
|
||||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
<meta-data
|
<meta-data
|
||||||
@ -281,4 +230,4 @@
|
|||||||
-->
|
-->
|
||||||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||||
</manifest>
|
</manifest>
|
@ -1,8 +1,6 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- app_links (0.0.2):
|
- app_links (0.0.2):
|
||||||
- Flutter
|
- Flutter
|
||||||
- appscheme (1.0.4):
|
|
||||||
- Flutter
|
|
||||||
- audio_service (0.0.1):
|
- audio_service (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- audio_session (0.0.1):
|
- audio_session (0.0.1):
|
||||||
@ -71,7 +69,6 @@ PODS:
|
|||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- app_links (from `.symlinks/plugins/app_links/ios`)
|
- app_links (from `.symlinks/plugins/app_links/ios`)
|
||||||
- appscheme (from `.symlinks/plugins/appscheme/ios`)
|
|
||||||
- audio_service (from `.symlinks/plugins/audio_service/ios`)
|
- audio_service (from `.symlinks/plugins/audio_service/ios`)
|
||||||
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
||||||
- auto_orientation (from `.symlinks/plugins/auto_orientation/ios`)
|
- auto_orientation (from `.symlinks/plugins/auto_orientation/ios`)
|
||||||
@ -110,8 +107,6 @@ SPEC REPOS:
|
|||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
app_links:
|
app_links:
|
||||||
:path: ".symlinks/plugins/app_links/ios"
|
:path: ".symlinks/plugins/app_links/ios"
|
||||||
appscheme:
|
|
||||||
:path: ".symlinks/plugins/appscheme/ios"
|
|
||||||
audio_service:
|
audio_service:
|
||||||
:path: ".symlinks/plugins/audio_service/ios"
|
:path: ".symlinks/plugins/audio_service/ios"
|
||||||
audio_session:
|
audio_session:
|
||||||
@ -171,7 +166,6 @@ EXTERNAL SOURCES:
|
|||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
app_links: e7a6750a915a9e161c58d91bc610e8cd1d4d0ad0
|
app_links: e7a6750a915a9e161c58d91bc610e8cd1d4d0ad0
|
||||||
appscheme: b1c3f8862331cb20430cf9e0e4af85dbc1572ad8
|
|
||||||
audio_service: f509d65da41b9521a61f1c404dd58651f265a567
|
audio_service: f509d65da41b9521a61f1c404dd58651f265a567
|
||||||
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
|
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
|
||||||
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
|
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import 'package:app_links/app_links.dart';
|
import 'package:app_links/app_links.dart';
|
||||||
import 'package:appscheme/appscheme.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
@ -12,37 +11,20 @@ import 'utils.dart';
|
|||||||
|
|
||||||
class PiliSchame {
|
class PiliSchame {
|
||||||
static late AppLinks appLinks;
|
static late AppLinks appLinks;
|
||||||
static AppScheme appScheme = AppSchemeImpl.getInstance()!;
|
|
||||||
static Future<void> init() async {
|
static Future<void> init() async {
|
||||||
appLinks = AppLinks();
|
appLinks = AppLinks();
|
||||||
appLinks.uriLinkStream.listen((Uri uri) {
|
appLinks.uriLinkStream.listen((Uri uri) {
|
||||||
final String scheme = uri.scheme;
|
final String scheme = uri.scheme;
|
||||||
if (RegExp(r'^pili', caseSensitive: false).hasMatch(scheme)) {
|
if (RegExp(r'^pili', caseSensitive: false).hasMatch(scheme)) {
|
||||||
piliScheme(uri);
|
piliScheme(uri);
|
||||||
}
|
} else {
|
||||||
});
|
routePush(uri);
|
||||||
|
|
||||||
appScheme.getInitScheme().then((SchemeEntity? value) {
|
|
||||||
if (value != null) {
|
|
||||||
routePush(value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
appScheme.getLatestScheme().then((SchemeEntity? value) {
|
|
||||||
if (value != null) {
|
|
||||||
routePush(value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
appScheme.registerSchemeListener().listen((SchemeEntity? event) {
|
|
||||||
if (event != null) {
|
|
||||||
routePush(event);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 路由跳转
|
/// 路由跳转
|
||||||
static void routePush(value) async {
|
static void routePush(Uri value) async {
|
||||||
final String scheme = value.scheme;
|
final String scheme = value.scheme;
|
||||||
if (scheme == 'bilibili') {
|
if (scheme == 'bilibili') {
|
||||||
biliScheme(value);
|
biliScheme(value);
|
||||||
@ -212,9 +194,9 @@ class PiliSchame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> biliScheme(SchemeEntity value) async {
|
static Future<void> biliScheme(Uri value) async {
|
||||||
final String host = value.host!;
|
final String host = value.host;
|
||||||
final String path = value.path!;
|
final String path = value.path;
|
||||||
switch (host) {
|
switch (host) {
|
||||||
case 'root':
|
case 'root':
|
||||||
Navigator.popUntil(
|
Navigator.popUntil(
|
||||||
|
@ -49,14 +49,6 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
appscheme:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: appscheme
|
|
||||||
sha256: b885b65219f3839ebafc937024a1bc5ce5a75b0e458fd249ef15e80e81235b6f
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.8"
|
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -111,7 +111,6 @@ dependencies:
|
|||||||
# 高帧率
|
# 高帧率
|
||||||
flutter_displaymode: ^0.6.0
|
flutter_displaymode: ^0.6.0
|
||||||
# scheme跳转
|
# scheme跳转
|
||||||
appscheme: ^1.0.8
|
|
||||||
app_links: ^6.3.2
|
app_links: ^6.3.2
|
||||||
# 弹幕
|
# 弹幕
|
||||||
ns_danmaku:
|
ns_danmaku:
|
||||||
|
Reference in New Issue
Block a user