How to capture screen and open native share in Cocos2d-JS?

Hello,
Is there any demo code that help us capture current game screen and then open NATIVE SHARE (depend on iOS, Android) ?
Thanks for any help… :smiley:

We have native share in our Cocos Helper https://github.com/SonarSystems/Cocos-Helper

1 Like

Thanks for your suggestion, but can you point it for me what exactly work I have to do? I can’t find what module do this

Use this video for Android native sharing

use http://www.sonarlearning.co.uk/coursepage.php?topic=game&course=sonar-cocos-helper-js&videoindex=6491#6491

It’s twitter but it will achieve what you want.

For iOS setup the project using this video http://www.sonarlearning.co.uk/coursepage.php?topic=game&course=sonar-cocos-helper-js&videoindex=6479#6479

then call it via
SonarCocosHelper::IOS::Share( “string to share”, “image path” );

2 Likes

Thanks you! I’ll try it

If you have any problems we are more than happy to help you integrate it over Skype.

@SonarSystems I think tweeting an image on android is not supported within CocosHelper? Is there any way to do it?

No it’s not supported ATM.