native.canShowPopup not showing correct results on android

Hi,

When trying out the “social” plugin of corona I noticed that my android test devices (galaxy a3 and s4 mini) always return false when native.canShowPopup is executed, even while Facebook and Twitter are installed. whatever params I use, everything returns false. 

 native.showAlert("test", tostring(native.canShowPopup("activity", "facebook")).." ".. tostring(native.canShowPopup("activity", "twitter")).." ".. tostring(native.canShowPopup("activity", "sinaWeibo")).." ".. tostring(native.canShowPopup("social", "facebook")).." ".. tostring(native.canShowPopup("social", "twitter")).." ".. tostring(native.canShowPopup("social", "sinaWeibo")).." ".. tostring(native.canShowPopup("activity", "share")).." ".. tostring(native.canShowPopup("social", "share")) , {"Ok"}, function() end)

Does it work with anybody else? On my iPhone it works just fine

Ps. im using the latest daily build

The Activity plugin is iOS only. All of your entries should be “social” and not “activity”.

Rob

Ah sorry, I should have been clearer.
The “activity” logging where just for my own testing.

I meant that also all the “social” logs return false when they are used on my android phones

I think there is some confusion in the docs. The Social plugin on iOS the plugin does different services, like Facebook, Twitter and SineWeibo as separate popups. The purpose of the canShowPopup() API is to let you know if SineWeibos is configured or not. On Android, the popup itself does all those checks at the OS level. You don’t need to test services on Android.

Rob

Aha, this was not clear for me indeed.
So canShowPopup only works on iOS?

I was trying to use it to show only the social buttons for the providers the user has. So only show facebook if the user actually has facebook

But this is not possible then?

On Android, the OS will limit the buttons it shows to what’s installed. You don’t need to worry about it.

Rob

Well my usecase is a little different I think. On the title screen of my app I want to spawn social buttons depending on the social apps that are installed on the device.

I know that within the popup of android only installed apps will be shown, but I would like to know if the app is installed without opening the popup.

See this thread:  https://forums.coronalabs.com/topic/33636-my-android-app-needs-to-check-if-another-one-of-my-apps-is-installed-on-the-device-on-ios-i-use-url-schemes/?p=174720

It has a way to check to see if another app is installed or not.

Rob

The Activity plugin is iOS only. All of your entries should be “social” and not “activity”.

Rob

Ah sorry, I should have been clearer.
The “activity” logging where just for my own testing.

I meant that also all the “social” logs return false when they are used on my android phones

I think there is some confusion in the docs. The Social plugin on iOS the plugin does different services, like Facebook, Twitter and SineWeibo as separate popups. The purpose of the canShowPopup() API is to let you know if SineWeibos is configured or not. On Android, the popup itself does all those checks at the OS level. You don’t need to test services on Android.

Rob

Aha, this was not clear for me indeed.
So canShowPopup only works on iOS?

I was trying to use it to show only the social buttons for the providers the user has. So only show facebook if the user actually has facebook

But this is not possible then?

On Android, the OS will limit the buttons it shows to what’s installed. You don’t need to worry about it.

Rob

Well my usecase is a little different I think. On the title screen of my app I want to spawn social buttons depending on the social apps that are installed on the device.

I know that within the popup of android only installed apps will be shown, but I would like to know if the app is installed without opening the popup.

See this thread:  https://forums.coronalabs.com/topic/33636-my-android-app-needs-to-check-if-another-one-of-my-apps-is-installed-on-the-device-on-ios-i-use-url-schemes/?p=174720

It has a way to check to see if another app is installed or not.

Rob