Best way to Google Login using SDKBOX in cocos2dx

I’m working with Cocos2d-x 4.0 in Android Studio 3.6.2 using SDKBox v1.3.1.0

My compilation error says:

Please help…

Thanks for report.

you can try sdkboxplay plugin if you only need google login.

Thanks.

@yinjimmy thanks for your Reply
I have installed sdkbox in my system, can you please let me tell how to integrate sdkbox sdkboxplay in my project, like this:-
E:\OfficeProject\TestProject2>sdkbox import sdkboxplay
to my project or there is another way to integrate…
i dint find any proper tutorial of this…
please help…

sdkbox import sdkboxplay

http://docs.sdkbox.com/en/plugins/sdkboxplay/

for gpg, plz edit cmakelists.txt, add bellow lines after setup_cocos_app_config(${APP_NAME})

# ext_gpg
if(ANDROID)
    add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/jni/gpg/)
    target_link_libraries(${APP_NAME} ext_gpg)
endif()

@yinjimmy thanks for your reply, now my project is working fine, no error after integrate sdkboxplay in my project…
sdkbox import sdkboxplay
Now i want to do login through this sdk…

  1. what to do to get google login in my code. (AppActivity.java)
  2. Any demo APP_ID.
  3. I want to integrate google login in my iOS app also.
    Please help…

@yinjimmy Any lead for iOS google sign-in integration ?

@yinjimmy now i get this error while running my game-

359/com.games.glass D/cocos2d-x debug info: Here i AM
2020-04-07 21:10:19.484 16341-16359/com.games.glass D/cocos2d-x debug info:  Is Connected: 0 
2020-04-07 21:10:19.484 16341-16341/com.games.glass D/SdkboxGPGAuthentication: CloudSave status:false
2020-04-07 21:10:19.500 16341-16341/com.games.glass D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=false
2020-04-07 21:10:19.501 16341-16341/com.games.glass D/Cocos2dxActivity: onPause()
2020-04-07 21:10:25.794 16341-16341/com.games.glass W/SdkboxGPGAuthentication: sign in failed:4 null https://developers.google.com/android/reference/com/google/android/gms/common/api/CommonStatusCodes
2020-04-07 21:10:25.795 16341-16341/com.games.glass D/Cocos2dxActivity: onResume()
2020-04-07 21:10:25.825 16341-16341/com.games.glass D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=true
2020-04-07 21:10:49.911 16341-16341/com.games.glass D/Cocos2dxActivity: onPause()
2020-04-07 21:10:54.577 16341-16341/com.games.glass D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=false  

And in my HelloWorld the code is:

CCLOG("Here i AM");
    if( sdkbox::PluginSdkboxPlay::isSignedIn())
    {
        sdkbox::PluginSdkboxPlay::signout();
    }
    else
    {
        sdkbox::PluginSdkboxPlay::signin();
    }
CCLOG(" Is Connected: %d ",sdkbox::PluginSdkboxPlay::isSignedIn() ? 1 : 0);

can not use google sign-in on iOS.