Announcement

Collapse
No announcement yet.

how to cloud save via Google Play Service?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to cloud save via Google Play Service?

    this is my code.

    Code:
    #if !PLATFORM_ANDROID
    	return;
    #endif
    
    IOnlineSubsystem* oss = IOnlineSubsystem::Get();
    
    if (oss->GetSharedCloudInterface().IsValid())
    {
    	//Always Fail
    }
    
    if (oss->GetUserCloudInterface().IsValid())
    {
    	//Always Fail
    }
    i couldn't get cloud interface.
    achievment, leaderboard was fine but only cloud interface fail. always.

    i think OnlineSubsystem not support Google Play cloud save.


    how can i integrate cloud save via Google Play Service without OnlineSubsystem?

    i'm already read this
    https://developers.google.com/games/...pts/savedgames

    but i'm not sure to put this;"google code" to unreal engine 4 project.
    it will working? or continue search in unreal engine 4 API?

    #2
    OnlineSubsystem support for Google Play cloud save is not implemented for Android at this time.

    Currently the GoogleApiClient.Builder in GameActivity.java does not add the .addApi(Drive.API).addScope(Drive.SCOPE_APPFOLDER). You can add this, then implement the rest of the calls in Java to call with JNI from C++.

    Comment


      #3
      I'm really appreciate about your answer. Thank you.

      but unfortunately still i don't know how..
      i don't have experience java code.
      you already give me a lot of information but i don't know what should i do with this.


      Could you give me some more information about implement google play cloud save to Unreal Engine 4?
      i'm not asking full tutorial. just little more... hints.

      at least i want to know:
      what is this code ".addApi(Drive.API).addScope(Drive.SCOPE_APPFOLDER)"?
      and what should i do with this code?

      Comment


        #4
        If you look in GameActivity.java you will find this code:

        Code:
        		// Build Google Play API Client
        		googleClient = new GoogleApiClient.Builder(this)
        			.addConnectionCallbacks(this)
        			.addOnConnectionFailedListener(this)
        			.addApi(Games.API).addScope(Games.SCOPE_GAMES)
        			.addApi(Plus.API).addScope(Plus.SCOPE_PLUS_LOGIN)
        			.build();
        what I meant was add the ".addApi(Drive.API).addScope(Drive.SCOPE_APPFOLDER)" to it.

        Then, you'll need to add the necessary Java code like in the example on the page you referenced and add JNI code to call from C++ to Java to use it.

        Comment


          #5
          I'm like the gamedna cheerleader - but very soon this is coming out - https://forums.unrealengine.com/show...rms-(Firebase) firebase will let you get/set data to ze cloud
          ZOMBIE TOWN AHHH (ANDROID/STEAM) | RIDE SHARE EMPIRE (ANDROID/GAME JAM) | NEVER NOT KNIGHT (ANDROID/GAME JAM) | TWITTER | MY UE4 TUTORIALS | ANSWERHUB

          Comment


            #6
            Thank you.
            i'm very grateful.

            i'll post my progress soon.

            thank you all !

            Comment


              #7
              Cloud Save Game plugin should be available soon
              Realtime Database Firebase | Ultimate Mobile Kit Firebase | Extended Facebook | Universal Mobile Ads | Google Analytics

              Comment

              Working...
              X