native.showPopup (Social) not working on Android 6 ( Marshmallow )

I updated my phone to the newest Android 6 version and when I open the app I develop that is already on Google Play and try to share something,  it crashes the other apps. For example, when I press the share button, the list of possible share options shows up and if I click on messenger or gmail, for example, instead of sharing my message along with a image, the selected app crashes, saying “Unfortunately gmail stopped working”. That happens to every option: gmail, facebook, twitter, sms etc. 

I tried to check further and downloaded a very popular Corona app at the moment, Laser Dog’s Hopiko, and that happens on their app as well when running on Android 6. Do you guys have any idea of what could be happening? It clearly looks like something to do with Corona x Android 6.

The behaviour of the API is perfect on previous versions of Android. 

Thanks.

First, we don’t officially support Android 6 yet. Our engineers are working on figuring out all of the Android 6 issues.  There are permissioning changes where permissions are not pulled from build.settings but are asked for on demand. It’s likely you could be running into this.

Can you put together a small sample that doesn’t work? Put it in a .zip file (include main.lua, build.settings and config.lua) and use the Report a Bug feature at the top of the page. That way Engineering can make sure this gets updated as we roll out Android 6 support.

Rob

Marcos: After reading your post I was getting worried about our own app not working properly on Android 6. But I just updated my Nexus 5 test device to Android M and I’m able to share as expected with Gmail, Twitter, etc. on Android. I believe the Android version was built with Corona 2015.2731. Obviously you’re having problems and this is a bug. But there may be ways to work around it?

Thanks for your reply. Is your app on the Google Play store? Would you mind sharing the link so I can test it on my phone and try? Maybe it is something with my phone, I don’t know. If you have a minute to spare you could download my app and try to share the bill on the last screen. The app  is here: https://play.google.com/store/apps/details?id=org.marcosmartini.splitbill

Thanks again!

Marcos: Sure! I don’t want to spam the forums, which is why I didn’t include it (probably should in the future). Here it is: https://play.google.com/store/apps/details?id=io.recent.personal.news

I installed your calculator and really like the interface. Nicely done. But unfortunately I was able to replicate your bug. I tried to share the results with Gmail via the FAB/Android sharing intent and it crashed Gmail (“Unfortunately Gmail has stopped.”)

I did give you a five star rating, though, because the app is nicely done and the crash is no fault of yours!

I’m happy to give you more details of my configuration. I’d also be interested if you get a sharing crash when installing Recent News (tap on an article to see the FAB to share).

Thanks! Downloaded your app and gave it 5 stars too! You put in A LOT OF WORK THERE LOL! Love the effort you took to conform to the material design specs! No crashes here, all good! Would be nice if you could tell me how did you code the sharing bit… I guess was standard native.showpopup stuff, but maybe there’s something I’m missing… thanks! Oh, by the way, what’s your name?

Marcos: Thanks! Kind of you to say. And I didn’t mean to be incognito–this is my personal web site: http://www.declan.io/

In terms of code, I think this (extraneous stuff removed) is our production code:

local options = {   url = sharingCluster.url,   message = sharingCluster.title,   listener = androidShareListener } recentUtils:setProcessCacheOnExit( false ) native.showPopup( "social", options )

(The process cache boolean is to skip cache cleanup and would be unrelated to your issue.)

I’m building on OS X 10.11 using I believe Corona 2015.2731, if that helps.

Thanks Declan

Hi Rob, 

I am reporting a bug with the zip file but I just want to say that I figured out what is going on. On my app, I use display.save() to save a screenshot of a group object so the user can share that image later. The problem is that with the latest Android update, my app can’t share any image that is located in a directory other than the resources directory. So if I save a screenshot in documents, cache or temporary directory, my app crashes the app used to share, for example, crashes gmail if I try to send that image by email. Sending bug report now. Thanks

Please post the Bug ID # back here (it was in the email that confirmed your submission).

Rob

Bug ID #43267

Thanks!

Hi everyone,

This issue has been fixed. The fix is actually in the Corona core, not the social plugin. This issue was actually a specific case of a more general issue related to sharing data between apps.

Anyway, the fix is available in build 2756.

Thanks Ajay!

First, we don’t officially support Android 6 yet. Our engineers are working on figuring out all of the Android 6 issues.  There are permissioning changes where permissions are not pulled from build.settings but are asked for on demand. It’s likely you could be running into this.

Can you put together a small sample that doesn’t work? Put it in a .zip file (include main.lua, build.settings and config.lua) and use the Report a Bug feature at the top of the page. That way Engineering can make sure this gets updated as we roll out Android 6 support.

Rob

Marcos: After reading your post I was getting worried about our own app not working properly on Android 6. But I just updated my Nexus 5 test device to Android M and I’m able to share as expected with Gmail, Twitter, etc. on Android. I believe the Android version was built with Corona 2015.2731. Obviously you’re having problems and this is a bug. But there may be ways to work around it?

Thanks for your reply. Is your app on the Google Play store? Would you mind sharing the link so I can test it on my phone and try? Maybe it is something with my phone, I don’t know. If you have a minute to spare you could download my app and try to share the bill on the last screen. The app  is here: https://play.google.com/store/apps/details?id=org.marcosmartini.splitbill

Thanks again!

Marcos: Sure! I don’t want to spam the forums, which is why I didn’t include it (probably should in the future). Here it is: https://play.google.com/store/apps/details?id=io.recent.personal.news

I installed your calculator and really like the interface. Nicely done. But unfortunately I was able to replicate your bug. I tried to share the results with Gmail via the FAB/Android sharing intent and it crashed Gmail (“Unfortunately Gmail has stopped.”)

I did give you a five star rating, though, because the app is nicely done and the crash is no fault of yours!

I’m happy to give you more details of my configuration. I’d also be interested if you get a sharing crash when installing Recent News (tap on an article to see the FAB to share).

Thanks! Downloaded your app and gave it 5 stars too! You put in A LOT OF WORK THERE LOL! Love the effort you took to conform to the material design specs! No crashes here, all good! Would be nice if you could tell me how did you code the sharing bit… I guess was standard native.showpopup stuff, but maybe there’s something I’m missing… thanks! Oh, by the way, what’s your name?

Marcos: Thanks! Kind of you to say. And I didn’t mean to be incognito–this is my personal web site: http://www.declan.io/

In terms of code, I think this (extraneous stuff removed) is our production code:

local options = {   url = sharingCluster.url,   message = sharingCluster.title,   listener = androidShareListener } recentUtils:setProcessCacheOnExit( false ) native.showPopup( "social", options )

(The process cache boolean is to skip cache cleanup and would be unrelated to your issue.)

I’m building on OS X 10.11 using I believe Corona 2015.2731, if that helps.

Thanks Declan