Skip to content
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

Merged
merged 2 commits into from
Mar 18, 2020

Conversation

andreban
Copy link
Member

  • 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
@andreban andreban requested a review from PEConn March 18, 2020 15:47
@@ -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');
Copy link
Collaborator

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?

Copy link
Member Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: type in "Apllication"

Copy link
Member Author

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"/>
Copy link
Collaborator

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.

Copy link
Member Author

@andreban andreban Mar 18, 2020

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

Copy link
Member Author

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.

Copy link
Collaborator

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.

Copy link
Member Author

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 :)
@andreban andreban merged commit b3a4876 into GoogleChromeLabs:master Mar 18, 2020
@andreban
Copy link
Member Author

Closes #105

@andreban andreban added the enhancement New feature or request label Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants