update intents; enable web search;
This commit is contained in:
@@ -76,24 +76,42 @@
|
|||||||
android:name="io.flutter.embedding.android.NormalTheme"
|
android:name="io.flutter.embedding.android.NormalTheme"
|
||||||
android:resource="@style/NormalTheme"
|
android:resource="@style/NormalTheme"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
<category android:name="android.intent.category.APP_BROWSER"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="me.movenext.bang_navigator.action.LAUNCH" />
|
<action android:name="me.movenext.bang_navigator.action.LAUNCH" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.SEND" />
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
<data android:mimeType="text/*" />
|
<data android:mimeType="text/*" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<!-- Required exactly like this to appear in both default app choosers and when explicitly browsing -->
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
|
<data android:scheme="http" />
|
||||||
|
<data android:scheme="https" />
|
||||||
|
</intent-filter>
|
||||||
|
<!-- like above but specifying additional schemes. Not qualified for app chooser. -->
|
||||||
|
<intent-filter>
|
||||||
|
<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" />
|
<data android:scheme="http" />
|
||||||
<data android:scheme="https" />
|
<data android:scheme="https" />
|
||||||
@@ -101,11 +119,21 @@
|
|||||||
<data android:mimeType="text/plain" />
|
<data android:mimeType="text/plain" />
|
||||||
<data android:mimeType="application/xhtml+xml" />
|
<data android:mimeType="application/xhtml+xml" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
<data android:mimeType="application/pdf" />
|
<data android:mimeType="application/pdf" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.WEB_SEARCH" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ final _sharingIntentTransformer =
|
|||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case SharedMediaType.TEXT:
|
case SharedMediaType.TEXT:
|
||||||
case SharedMediaType.URL:
|
case SharedMediaType.URL:
|
||||||
|
case SharedMediaType.WEB_SEARCH:
|
||||||
if (uri_to_file.isUriSupported(data.value!)) {
|
if (uri_to_file.isUriSupported(data.value!)) {
|
||||||
final file = await uri_to_file.toFile(data.value!);
|
final file = await uri_to_file.toFile(data.value!);
|
||||||
final mimeType = mime.lookupMimeType(file.path);
|
final mimeType = mime.lookupMimeType(file.path);
|
||||||
@@ -35,6 +36,7 @@ final _sharingIntentTransformer =
|
|||||||
} else {
|
} else {
|
||||||
sink.add(ReceivedIntentParameter(data.value, null));
|
sink.add(ReceivedIntentParameter(data.value, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
logger.w('Unhandled media type: $data');
|
logger.w('Unhandled media type: $data');
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -33,7 +33,10 @@ dependencies:
|
|||||||
flutter_reorderable_grid_view:
|
flutter_reorderable_grid_view:
|
||||||
path: ../../flutter-reorderable-grid-view
|
path: ../../flutter-reorderable-grid-view
|
||||||
flutter_secure_storage: ^10.0.0-beta.4
|
flutter_secure_storage: ^10.0.0-beta.4
|
||||||
flutter_sharing_intent: ^1.1.1
|
flutter_sharing_intent:
|
||||||
|
git:
|
||||||
|
url: https://github.com/FaFre/flutter_sharing_intent.git
|
||||||
|
ref: web_search
|
||||||
flutter_slidable: ^4.0.0
|
flutter_slidable: ^4.0.0
|
||||||
flutter_svg: ^2.0.17
|
flutter_svg: ^2.0.17
|
||||||
go_router: ^14.8.1
|
go_router: ^14.8.1
|
||||||
|
|||||||
Reference in New Issue
Block a user