Limit the sharing options using native.showPopup

Hi,

Successfully implemented native.showPopup on Android. However, I’d rather limit the user to just a few apps for sharing. Is there any way to do that?

Right now on my phone I get dropbox, convert to pdf, etc, etc. A really long list.

Rather just offer the usual 3 or 4.

We don’t provide a way to add or remove items from the various social sharing plugins.

Rob

Hi conor1

I was wondering if you found a good resource for implementing this on Android.  It seems like the guide is more useful for iOS - unless I am missing something…

Here is what I have, but it does nothing on the Android device, and the simulator just says to build for an iOS device…

 local shareButton\_fishing = widget.newButton({ defaultFile = 'images/buttons/share.png', overFile = 'images/buttons/share-over.png', width = 32, height = 35, x = halfW + 155, y = 320, onRelease = function() --sounds.play('tap') --composer.gotoScene('scenes.reload\_game', {params = params.levelId + 1}) --post("onRestart", { delay = 100 } ) local shareText = "This is the fishing score I want to share" -- {service = serviceName, message = shareText, image = { -- { filename="world.jpg", baseDir=system.ResourceDirectory }, -- { filename="bkg\_wood.png", baseDir=system.ResourceDirectory } }, -- url = { "http://www.coronalabs.com", "http://docs.coronalabs.com" }} if system.getInfo("targetAppStore") == "google'"then native.showPopup( "social", {service = "share", message = shareText,} ) elseif system.getInfo("targetAppStore") == "apple" then local itemsOptions = {{type = "string", value = "This is my apple share text"}} native.showPopup("activity",{ items=itemsOptions, }) elseif system.getInfo( "environment" ) == "simulator" then print( "You're in the Corona Simulator." ) native.showPopup("social", {message = shareText,}) end end })

Thanks for your time and help.

oops, had a typo - seems to work as expected

if system.getInfo("targetAppStore") == "google'"then

"google’ " should be “google”