Search Unity

Resolved How can I make my game aware of Updates?

Discussion in 'Editor & General Support' started by mfatihbarut, Jun 24, 2021.

  1. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    Hi all,
    I want my android app to realize there is a new version in the store and open the update page of playstore.
    How can I do it?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,736
    You could host a version file somewhere that your program checks, then pops up a notice.

    This is probably not worth doing, since most people have auto-update on and the app will generally just get updated.
     
  3. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    hmm, but I feel getting risk in that way...
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,736
    Risk of WHAT?!
     
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
  6. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    not being updated
     
  7. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    If it is multiplayer, you reject clients of the wrong version on the server side. On the client you give them some helpful message, like wrong version please update. If single player, you could try Remote Config.
    If the game is single player, how is this any risk? You create a bigger risk of pissing off your players.

    Games with frequent required updates on mobile will anger your players. You're a passenger in a car, you just want to kill a little time playing a game on your phone during the 20 minute drive, you open it up and it demands an update. Ok, your plans are ruined, by the time the update is done you'll probably be halfway to your destination. That happens a few times, and you stop opening the game entirely. Too much hassle, not worth keeping the game.
     
  8. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    what is Remote Config?
     
  9. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    ok thk, but really not sure if rc can replace and update.
     
  10. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    No, Remote Config won't itself do the update. You can just set in Remote Config what the current version is. When the user launches your app, it can check if its version is the same as the version in Remote Config. If they are not equal, your app can tell the user that an update is available, and provide a button which goes directly to your app in the app store. All the Remote Config part is for, is to provide the value of the current app version, saving you from providing it with your own server.

    But as I just mentioned, you could also rent your own server, and host a site on it which reports the current version of the app. When your app launches, you do a UnityWebRequest to your server to get the current app version. From there on how you handle it is the same. But renting and maintaining your own server to provide a single variable is a bit wasteful when Remote Config is available.
     
  11. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    yeey, good one
     
  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, Remote Config is a good solution here, I support that product too.
     
  13. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    mgear likes this.
  14. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    btw I tried it and I couldn't make it work. First you can not test it in editor mode second it crashed in android.
    Is there any one who could make it work?
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Why and where did it crash, how are you debugging? Remote Config certainly works in the Editor. Be sure not to confuse Remote Settings (now deprecated) with Remote Config (our new service). https://docs.unity3d.com/Packages/com.unity.remote-config@2.1/manual/CodeIntegration.html