-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates android-browser-helper and enables WebView fallback on config #126
Updates android-browser-helper and enables WebView fallback on config #126
Conversation
andreban
commented
Mar 18, 2020
- Updates to using android-browser-helper-1.2.0
- Adds an option to enable the WebView fallback on the twa-manifest.json
- Updates to using android-browser-helper-1.2.0 - Adds an option to enable the WebView fallback on the twa-manifest.json
@@ -72,6 +72,7 @@ describe('TwaManifest', () => { | |||
expect(twaManifest.generateShortcuts()) | |||
.toBe('[[name:\'shortcut name\', short_name:\'short\',' + | |||
' url:\'https://pwa-directory.com/launch\', icon:\'shortcut_0\']]'); | |||
expect(twaManifest.fallbackType).toBe('customtabs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test as well to check that webview
works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -36,7 +36,10 @@ def twaManifest = [ | |||
shortcuts: <%= generateShortcuts() %>, | |||
// The duration of fade out animation in milliseconds to be played when removing splash screen. | |||
splashScreenFadeOutDuration: <%= splashScreenFadeOutDuration %>, | |||
generatorApp: '<%= generatorApp %>' // Apllication that generated the Android Project | |||
generatorApp: '<%= generatorApp %>', // Apllication that generated the Android Project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: type in "Apllication"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -21,6 +21,7 @@ | |||
the abbreviated format. --> | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
package="<%= packageId %>"> | |||
<uses-permission android:name="android.permission.INTERNET"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this get added in by Android Studio or do we need it for WebView? It's seems a little ugly including it even if we don't need WebView, but on the other hand it's not that much overhead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be added for the WebView to work on Android 9 and below. We could conditionally add it, only when the fallback is type webview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed the "could" on the text. Fixed that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's easy enough let's do it, I don't think it's blocking though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
- Adds more tests for fallbackType - Conditionally adds the INTERNET permission when the WebView fallback is used. - Fixes typo :)
Closes #105 |