-
-
Notifications
You must be signed in to change notification settings - Fork 142
fix(android): load KMP files from app-external sources #16392
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
base: master
Are you sure you want to change the base?
Changes from all commits
f4a67d8
90b2e45
ba76704
af0a2b6
507512b
abb2b82
f0e79e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,10 +96,6 @@ | |
| <category android:name="android.intent.category.BROWSABLE" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
|
|
||
| <!-- needed for properly formatted email messages --> | ||
| <data | ||
| android:mimeType="application/vnd.keyman" | ||
| android:scheme="content" /> | ||
| <!-- needed for mangled email messages --> | ||
| <data | ||
| android:mimeType="application/keyman" | ||
|
|
@@ -109,38 +105,41 @@ | |
| android:mimeType="application/octet-stream" | ||
| android:scheme="content" /> | ||
| <data | ||
| android:mimeType="application/x-keyman-package" | ||
| android:mimeType="application/vnd.keyman.kmp+zip" | ||
| android:scheme="content" /> | ||
| </intent-filter> | ||
|
|
||
| <!-- | ||
| Capture file open requests (pathPattern is honoured) where no | ||
| MIME type is provided in the Intent. An Intent with a null | ||
| MIME type will never be matched by a filter with a set MIME | ||
| type, so we need a second intent-filter if we wish to also | ||
| match files with this extension and a non-null MIME type | ||
| (even if it is non-null but zero length). | ||
| --> | ||
| <intent-filter android:priority="50"> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
|
|
||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
|
|
||
| <data android:scheme="file" /> | ||
| <data android:scheme="content" /> | ||
|
|
||
| <data android:host="*" /> | ||
| <data android:pathPattern="/.*\\.kmp" /> | ||
| <data android:pathPattern=".*\\.kmp" /> | ||
| <data | ||
| android:mimeType="application/vnd.keyman.kmp+zip" | ||
| android:scheme="content" /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
|
|
||
| <!-- | ||
| Backup MIME intents | ||
| --> | ||
| <data | ||
| android:mimeType="application/octet-stream" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally we won't need this in the future? It seems a bit broad! |
||
| android:scheme="content" /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a duplicate of line 119? |
||
| </intent-filter> | ||
|
|
||
| <!-- | ||
| Capture file open requests (pathPattern is honoured) where a | ||
| (possibly blank) MIME type is provided in the Intent. This | ||
| filter may only be necessary for supporting ES File Explorer, | ||
| which has the probably buggy behaviour of using an Intent | ||
| with a MIME type that is set but zero-length. It's | ||
| impossible to match such a type except by using a global | ||
| wildcard. | ||
| --> | ||
| Capture file open requests (pathPattern is honoured) where no | ||
| MIME type is provided in the Intent. An Intent with a null | ||
| MIME type will never be matched by a filter with a set MIME | ||
| type, so we need a second intent-filter if we wish to also | ||
| match files with this extension and a non-null MIME type | ||
| (even if it is non-null but zero length). | ||
| --> | ||
| <intent-filter android:priority="50"> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
|
|
||
|
|
@@ -149,25 +148,8 @@ | |
|
|
||
| <data android:scheme="file" /> | ||
| <data android:host="*" /> | ||
| <data android:mimeType="*/*" /> | ||
| <data android:pathPattern="/.*\\.kmp" /> | ||
| </intent-filter> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
|
|
||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
|
|
||
| <!-- http:// and https:// protocols --> | ||
| <data | ||
| android:host="*" | ||
| android:pathPattern="/.*\\.kmp" | ||
| android:scheme="http" /> | ||
| <data | ||
| android:host="*" | ||
| android:pathPattern="/.*\\.kmp" | ||
| android:scheme="https" /> | ||
| </intent-filter> | ||
|
|
||
| <intent-filter> | ||
| <!-- keyman:download// deep linking to https://keyman.com/keyboards/ --> | ||
|
|
@@ -192,35 +174,14 @@ | |
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
|
|
||
| <data | ||
| android:host="keyman-staging.com" | ||
| android:scheme="http" | ||
| android:pathPrefix="/go/package/download" /> | ||
|
|
||
| <data | ||
| android:host="keyman.com" | ||
| android:scheme="https" | ||
| android:pathPrefix="/go/package/download" /> | ||
|
|
||
| </intent-filter> | ||
| <data android:host="keyman-staging.com" /> | ||
| <data android:host="keyman.com" /> | ||
|
|
||
| <intent-filter android:priority="50"> | ||
| <!-- KMAPro should also be able to handle /keyboards/install links and convert to /go/package/download --> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
|
|
||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
|
|
||
| <data | ||
| android:host="keyman-staging.com" | ||
| android:scheme="http" | ||
| android:pathPrefix="/keyboards/install" /> | ||
|
|
||
| <data | ||
| android:host="keyman.com" | ||
| android:scheme="https" | ||
| android:pathPrefix="/keyboards/install" /> | ||
| <data android:scheme="http" /> | ||
| <data android:scheme="https" /> | ||
|
|
||
| <data android:pathPrefix="/go/package/download" /> | ||
| <data android:pathPrefix="/keyboards/install" /> | ||
| </intent-filter> | ||
|
|
||
| </activity> | ||
|
|
||
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.
What does this do?
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.
Matches both file:/// and content:// URIs. Often times, what we get between apps appears to be the
content://one.It's an OR, not an AND - allowing us to share the host and pathPattern entries for both protocols.
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.
I am not sure what this is fixing though -- does this impact the underlying reported issue?
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.
Still wondering if there is a reported issue that this is addressing?