Skip to content
Snippets Groups Projects
Commit 84e354b1 authored by igorwork's avatar igorwork Committed by Markin Igor
Browse files

Fix android intents.

parent c69d2f2e
Branches
No related tags found
1 merge request!1Mobile app initial implementation.
......@@ -15,7 +15,7 @@
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:launchMode="singleTask"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
......@@ -36,10 +36,10 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.LAUNCHER"/>
<data
android:scheme="vereign"
android:host="app.vereign.com" />
android:scheme="app"
android:host="com.vereign.app" />
</intent-filter>
</activity>
......
......@@ -34,7 +34,7 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.vereign.app/auhtorize</string>
<string>com.vereign.app/authorize</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app</string>
......
......@@ -54,7 +54,7 @@ class _AppState extends State<App> {
updateAppMode(Uri uri) {
log("Uri $uri");
if (uri?.path == "/auhtorize") {
if (uri?.path == "/authorize") {
setState(() {
_appMode = "oauth";
_invokerURL = uri.queryParameters["invokerUrl"];
......
......@@ -48,7 +48,13 @@ class _HomeState extends State<Home> {
onPressed: () async {
Navigator.of(context).pop();
widget.setMode("");
await launch("${widget.invokerURL}?token=$token");
log("Open ${widget.invokerURL}");
try {
await launch("${widget.invokerURL}?token=$token");
} catch (e) {
log("Error launching url ${widget.invokerURL}");
}
},
),
],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment