how to show version Name of app in sketchware

Hello friends, today I am going to tell you how to show Automatic App Version Name in your app Yes! follow me step by step.
Step-1
First you have to bring a textView Component drag in the View section as you see it in the image below!
Step-2
Now you have to go to the event section, after that the oncreate activity will go and create two variable string list as if you are appearing in the image below in image-2 and image-3.

🔘Create Two variable String List

(1) ver
(ver mean your app version .it is showing in your app)

(2) package_name
(package name is your app package name)





Step-3
Now you have to set some block according to image!

(1) set  Variable String List
    ( This List Required to inter Your App Package Name)

(2) Set Add Source Directly
     (In this you have to copy and paste the code below)
           
                        Copy This Code
_________________________________________________

try {
android.content.pm.PackageInfo pinfo = getPackageManager().getPackageInfo( package_name, android.content.pm.PackageManager.GET_ACTIVITIES);
ver = pinfo.versionName; }
catch (Exception e){ showMessage(e.toString()); }

_________________________________________________

(3) Set Textview component
     (This is Your App VersionName Showimg Component )

Note !
  According To Image Set All Components




Friends, if you have any problems in it, definitely tell us.
  
                             Thanks For Supporting.

how to show version Name of app in sketchware how to show version Name of app in sketchware Reviewed by Anonymous on December 25, 2018 Rating: 5

No comments:

Thank You For Comment...

Powered by Blogger.