Cocos Helper - Add Chartboost, AdMob, Google Play etc easily With Video Tutorials With Free Skype Assistance

What device are you using?

You could do a check so if its been pressed and logged in then show the leaderboard

Iā€™ve tested on iphone 5, simulator, iphone 6s and iphone 6+. all with same result.

I have check debugged with break points and it goes through the submit score and show leaderboard doing nothing. The leader board still have the old points. Iā€™ve modified your API to work in the way I need. Iā€™ve added a method to your classed to return the _gameCenterEnabled property.
Then I do this:

if(SonarCocosHelper::GameCenter::isPlayerLoggedIn().getValue()){ SonarCocosHelper::GameCenter::submitScore(TheGame::Instance()->getScore()->getBestScore(),"IDLeaderboard"); SonarCocosHelper::GameCenter::showLeaderboard();
}else{
    SonarCocosHelper::GameCenter::signIn();
}

The player may have to press the button twice but it works better than when there was no check, like the code I posted above.

Iā€™ve removed the facebook app from my phone and the API works again, the screen comes up with all the text I set on the code, but complains that facebook app/account doesnā€™t exist, etcā€¦
Installing the facebook app the screens comes up blankā€¦

Could you submit a GitHub request so we can get this great addition to the community.

I will as soon as I have timeā€¦

You may want to check it out https://www.facebook.com/invasiondefender

Will do :smiley:

Hi @SonarSystems!

Iā€™ve integrated Facebook via Cocos Helper into my game.
Share function works fine both for iOS and Android versions of the game.

The problem is when I run the game on a device with no Facebook app installed on it, then game crashes.

How to handle this situation gracefully, what would you recommend?

Very interesting, is this on Android or both platforms?

Only on Android for now as I havenā€™t test this scenario on iOS.

You could integrate something like this into Cocos Helpers back end Java code

http://code2care.org/pages/how-to-check-if-facebook-application-is-installed-on-android-device/

As Cocos Helper is open source it shouldnā€™t be difficult.

1 Like

Iā€™ll definitely try this.

Anyway Cocos Helper rocks! :slight_smile:

1 Like

It rocks so much the roof comes off :smiley:

We are readying a new Cocos Helper product launch and Im certain the community will love it and like our other stuff it will be free :smiley:

Hi, @SonarSystems!
Iā€™ve added Facebook package check as in the link and it seems to work fine.
But when I want to show an alert dialog to a user (in case fb not present on his device):

if (!isFbAppInstalled())
{
   if (this.activity == null) return;

   new AlertDialog.Builder( this.activity )
         .setTitle( "No Facebook Account" )
         .setMessage( "There are no Facebook accounts configured." )
         .setNeutralButton( android.R.string.ok, null )
         .create()
         .show();

   return;
}

I get an error from the following code path:

// Other errors typically mean that the current surface is bad,
// probably because the SurfaceView surface has been destroyed,
// but we haven't been notified yet.
// Log the error to help developers understand why rendering stopped.
EglHelper.logEglErrorAsWarning("GLThread", "eglSwapBuffers", swapError);

synchronized(sGLThreadManager) {
    mSurfaceIsBad = true;
    sGLThreadManager.notifyAll();
}
break;

Please help, how to show alert dialog properly?

@SonarSystems, can you recommend me something please?

Itā€™s hard to see the issue as it wasnā€™t developed by us. Does it work when FB is present on the device.

Yes it does work when FB is present on the device. (When FB is not present on the device it is simple crashes which is probably not the most right way to go)

I saw that in your code you do show alert dialog and I thought that maybe you can help me to add alert dialog of my own into yours code.

hi, @SonarSystems

I currently have AdMob integrated into my game via Cocos Helper.

Now Iā€™m considering to add reward video option to my game as well.
Is it possible with Cocos Helper?

Regards.

Yes it it, what video network are you thinking of using?