murraycu / android-galaxyzoo

This Android app lets you classify Galaxy Zoo subjects. It is available in the Google Play Store: https://play.google.com/store/apps/details?id=com.murrayc.galaxyzoo.app . Try beta versions early here: https://play.google.com/apps/testing/com.murrayc.galaxyzoo.app . See also the iPhone app for Galaxy Zoo: https://github.com/murraycu/ios-galaxyzoo/
GNU General Public License v3.0
11 stars 13 forks source link

Share the image via the Share menu item #30

Open murraycu opened 8 years ago

murraycu commented 8 years ago

The app now has a Share menu item, but it just shares the URI of the discussion page.

This branch tries to share the image itself, but it isn't working. https://github.com/murraycu/android-galaxyzoo/commits/share-image

With that code, the Share menu item does nothing. If we comment out the intent.setData() line then we can share to other apps, but they then fail with errors or crashes, presumably due to lack of permission, though we are granting them permission.

murraycu commented 7 years ago

Fixed by pull request #36 : https://github.com/murraycu/android-galaxyzoo/pull/36

murraycu commented 7 years ago

Unfortunately, SubjectFragment.updateShareActionIntent() is always called from onCreateOptionsMenu(), and updateShareActionIntent() always executes the GetImageBitmapAsyncTask, getting the image just in case the user wants to share it.

That's unnecessary work in most cases and it causes us to ask the user for photos/files permission. We really should delay that permission request (and the actual downloading) until the user actually tries to share something. If I can't fix that, I'll have to revert this for now. Sorry.