Posts

Showing posts with the label Check for app updates using Firebase in Sketchware

Check for latest app version using Firebase in Sketchware

Image
You can store the latest version of your app in Firebase realtime database, and then check and compare it with the actual version of installed app. Follow the instructions below to know how to do this. 1. In your Firebase app in sketchware, in library manager, make sure you have entered correct App ID and project ID, and that Firebase switch is on. 2. Make sure the rules in your Firebase database are read and write true. 3. On the MainActivity or the Activity in which you want to check for the latest app version, add a new FirebaseDB component called Ver:version . 4. Create three new String variables, package_name ,  your_version and latest_version , and a new Map variable map . 5. In  onCreate  event, set the string  package_name  to package name of your app. 6. Next in onCreate, use an add source directly block and put codes for getting the version of presently installed app. try { android.content.pm.PackageInfo pinfo = getPackageManage...