Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[21843] Ensure mobileComposeMail attachment is not lost when Gmail app is used #6887

Merged
merged 3 commits into from Feb 26, 2019

Conversation

livecodepanos
Copy link
Contributor

@livecodepanos livecodepanos commented Feb 25, 2019

Due to recent changes in Android permission model, it was no longer possible on devices running Android >= 6.0 to send an attachment using mobileComposeMail when the receiver app is Gmail.

This patch ensures that our own implementation of FileProvider (a subclass of ContentProvider) does these necessary 3 things for successfully sharing an attachment using mobileComposeMail:

  1. Define the FileProvider in your AndroidManifest file (--> added meta-data tag)
  2. Create an XML file that contains all paths that the FileProvider will share with other applications (see android-file_provider_paths.xml)
  3. Ensure a valid URI is created in the Intent (see m_content_uri_base)

For more details, see
https://developer.android.com/reference/android/support/v4/content/FileProvider.html?hl=en

This patch is tested on 2 Android devices, running Android 5.1.1 and Android 9.

@livecodepanos livecodepanos added this to the 9.0.4-rc-1 milestone Feb 25, 2019
@@ -0,0 +1 @@
Ensure mobileComposeMail attachment is not lost when gmail app is used to send the email
Copy link
Member

Choose a reason for hiding this comment

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

@livecodepanos missing # here

@montegoulding
Copy link
Member

@livecode-vulcan review ok 224b9c7

@livecode-vulcan
Copy link
Contributor

💙 review by @montegoulding ok 224b9c7

livecode-vulcan added a commit that referenced this pull request Feb 26, 2019
[21843] Ensure mobileComposeMail attachment is not lost when Gmail app is used

Due to recent changes in Android permission model, it was no longer possible on devices running Android >= 6.0 to send an attachment using `mobileComposeMail` when the receiver app is Gmail.

This patch ensures that our own implementation of FileProvider (a subclass of ContentProvider) does these necessary 3 things for successfully sharing an attachment  using `mobileComposeMail`:

1. Define the FileProvider in your AndroidManifest file (--> added meta-data tag)
2. Create an XML file that contains all paths that the FileProvider will share with other applications (see `android-file_provider_paths.xml`)
3. Ensure a valid URI is created in the Intent (see `m_content_uri_base`)

For more details, see
https://developer.android.com/reference/android/support/v4/content/FileProvider.html?hl=en

This patch is tested on 2 Android devices, running Android 5.1.1 and Android 9.
@livecode-vulcan
Copy link
Contributor

😎 test success 224b9c7

  • try-community-armv6-android-sdk26_ndk16r15: success
  • try-community-armv7-android-sdk26_ndk16r15: success
  • try-community-arm64-android-sdk26_ndk16r15: success
  • try-community-x86-android-sdk26_ndk16r15: success
  • try-community-x86_64-android-sdk26_ndk16r15: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos12.1: success
  • try-community-universal-ios-iphonesimulator12.1: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: success
  • try-community-x86_64-win32: success

@livecodepanos livecodepanos merged commit 76e04ce into livecode:develop-9.0 Feb 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants