Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Cloud Save on Android

Discussion in 'Cloud Save' started by TheEugeneL, Sep 7, 2022.

  1. TheEugeneL

    TheEugeneL

    Joined:
    Dec 7, 2017
    Posts:
    33
    Hello,

    On iOS, I only send saves when the player minimizes the game, and it works perfectly.

    Code (CSharp):
    1. void OnApplicationPause(bool pauseStatus)
    2.     {
    3.         if (pauseStatus)
    4.         {
    5.             //Save Player Data
    6.             await SaveData.ForceSaveAsync(CachedData);
    7.         }
    8.     }
    On Android, if the player minimizes the game with a swipe, it also works. But if the player minimized the game with the Home button, it does not work and data is sent only if the player returned to the game.

    Perhaps there is some way to do this?
     
  2. MileyUnity

    MileyUnity

    Unity Technologies

    Joined:
    Jan 3, 2020
    Posts:
    73
    Hi there, this would be better to ask in the Android part of the forums as it's not really about CloudSave but rather detecting the home button minimization on Android :)
     
  3. TheEugeneL

    TheEugeneL

    Joined:
    Dec 7, 2017
    Posts:
    33
    Hi! Ok, thanks!
    I just thought that maybe some of the developers here could have a similar experience.