If you want to preserve an older world you created without risking that world experiencing corruption or update problems when you move to a newer version of Minecraft, you'll need to lock the profile to the older version. Here are but a few examples of why you might need or want to manage your version number. For many players that's just fine because they always want the most current version, they play by themselves on their computer (with no multiplayer), and/or they don't mod.įor other players, however, managing your version number (and creating separate profiles for different purposes) is an important component of the Minecraft experience. This profile is named after your Minecraft username and it automatically updates to the most current version of Minecraft without any intervention your behalf. dependencies catch ( default the Minecraft launcher has one profile. Īdd JSOUP dependency to your module adle. Make sure you have INTERNET permission on your AndroidManifest.xml file. But if you got here and you try to cut and paste his code you'll go through the same issues I just had, so I might as well just post it here to help others like me. Avoid this solution or be ready to patch your app whenever Google Play pages change.Īhmad Arlan's answer is the best answer so far. It works on Lollipop+ and gives you the ability to ask the user for an update with a nice dialog (FLEXIBLE) or with the mandatory full-screen message (IMMEDIATE).ĮDIT They have recently changed Google play website and now this code is broken. It could take time to be propagated (probably because of cache). Keep in mind that everybody won't see the new version in the same time. Toast.makeText(this, "New version available on play store", Toast.LENGTH_SHORT) įor the HTML parsing part, have a look here String version = this.getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName Once you find this part of the page, you can extract the version number and compare it with the one available in your app : try Once you get the page content you should parse it ( jsoup is a good solution) and search for : 2.2.0 To make the request you can use DefaultHttpClient Nevertheless, you can make an http request on the web version of the playstore ( )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |