Merge pull request #1671 from kiwix/feature/macgills/1670-handle-content-uris

Feature/macgills/1670 handle content uris
This commit is contained in:
Seán Mac Gillicuddy 2019-12-20 11:31:45 +00:00 committed by GitHub
commit f9c5f8998b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -167,8 +167,9 @@ class KiwixMainActivity : CoreMainActivity() {
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
if (intent?.data != null) {
openZimFile(intent.data.toFile())
intent?.data?.let {
if ("file" == it.scheme) openZimFile(it.toFile())
else toast(R.string.cannot_open_file)
}
}

View File

@ -3,4 +3,5 @@
<resources>
<string name="file_system_does_not_support_4gb">Your file system doesnt support files over 4GB</string>
<string name="detecting_file_system">Detecting if file system can create 4GB files</string>
<string name="cannot_open_file">Failed to open file\nPlease try looking for this file in the Device Tab of your Library</string>
</resources>