Android Question Work Around - How to get to About this app page for version number

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I use to use this https://play.google.com/store/apps/details?id=com.BOBs.BBS
To get to my Apps page on Google Play Store and parse the page to get the App version number

NOW, you have to click on the About this app button to get to this page:

1666364092227.png


Is there any way of directly getting to the About this app page to retrieve the version number?
 

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I use to use the code from these (Check App Version) post to find my what version of my app was on Google

But because all that information is now in the About this app page (and I can't figure out how to get to it) I am doing this

In my Release Notes I always put the version number:
B4X:
v8.036 - Remove Update App from my Website               
              Changes to Sponsor Paid Screen               
              Make Sponsors, PlayerInfo draggable               
              Pay Sponsors with minus balance in progress

So now I search for "What's new" and parse my version number out of that
B4X:
[HEADING=1]What's new[/HEADING]
v8.036 - Remove Update App from my Website               
              Changes to Sponsor Paid Screen               
              Make Sponsors, PlayerInfo draggable               
              Pay Sponsors with minus balance in progress

B4X:
#region CheckVersion
Private Sub Check_Version
            Dim Job            As HttpJob
                
            LogColor("Check Version", Colors.Magenta)
                            
            '---------------------------------------------------------------------
            '  Do a version check
            '---------------------------------------------------------------------
            Job.Initialize("", Me)
            Job.Download(cBBsGlobals.gGoogleStoreListingAddress)

            LogColor("Wait for Job", Colors.Magenta)
            
            Wait For (Job) JobDone(Job As HttpJob)

            LogColor($"Return from Wait for Job - Success:${Job.Success}"$, Colors.Magenta)

            '---------------------------------------------------------------------
            '  Was version check successful
            '---------------------------------------------------------------------
            If     Job.Success Then
                Dim Data                    As String     = Job.GetString
                Dim IndexTo                 As Int         = Data.IndexOf(">What&#39;s new<")        '    Look for What's new
                Dim GoogleCurrentVersion    As String    = ""
                    
                Job.Release                    
                
                If  IndexTo =  -1 Then
                    LogColor("Could not find Whats New to check version", Colors.Magenta)
                    Return
                End If
                
                
                Dim Look4Description  As String = "<div itemprop=""description"">"                '    Used to Search for description of changes
                        
                Data     = Data.SubString(IndexTo)                                                '    dump beginning of string 
                        
                IndexTo = Data.IndexOf(Look4Description)                                        '    Search for description of changes
                        
                If  IndexTo <> -1 Then
                    Data = Data.SubString(IndexTo + Look4Description.Length)
                        
                    '----------------------------------------------------------------------------------------------------------------------------------------------------
                    '    Main     #VersionName                     : B*Bs-v8.036                                        
                    '
                       '                Dim pm                         As PackageManager                                '  Done in Main Activity_Create
                       '                cBBsGlobals.gVersionName     = pm.GetVersionName(cBBsGlobals.gPackageName)    '  Done in Main Activity_Create
                    '
                    '    Release notes version number            : v8.036        
                    '----------------------------------------------------------------------------------------------------------------------------------------------------
                    If  Data.CharAt(0) = "v" Then                                                '    My release notes always start with a small v then the version number
                        IndexTo = Data.IndexOf(" - ")                                            '    My release notes version number always ends with " - " before the actual notes
                                
                        If  IndexTo <> -1 Then                                                    '    If all these things work out then I have a version number
                            Dim VersionNumber As String = Data.SubString2(1, IndexTo).Trim        '    Now pull out actual version number
                                    
                            If  IsNumber(VersionNumber) Then                                    '    Is this version number a actual number?
                                GoogleCurrentVersion = $"B*Bs-v${VersionNumber}"$                '    Format to look like main #VersionName                                     
                                    
                                LogColor($"Google Version:${GoogleCurrentVersion}${CRLF}  This Version:${cBBsGlobals.gVersionName}${CRLF}       Compare:${GoogleCurrentVersion.CompareTo(cBBsGlobals.gVersionName)}"$, Colors.Magenta)
                
                                If  GoogleCurrentVersion.CompareTo(cBBsGlobals.gVersionName) > 0 Then
                                    wait for (mMsgBox.MessageBox_AltColor($"Version: ${GoogleCurrentVersion}${CRLF}Is available in Google Play Store"$, "Google Play Store has New Version")) Complete(MsgBoxRC As Int)
                                End If                            
                            Else
                                LogColor($"Version Number Not a Number [${VersionNumber}]"$, Colors.Magenta)                                                        
                            End If
                        Else
                            LogColor($"Could not end of version [${Data.SubString2(0, 20)}]"$, Colors.Magenta)                                            
                        End If
                    Else
                        LogColor($"Could not v [${Data.SubString2(0, 20)}]"$, Colors.Magenta)                                            
                    End If
                Else
                    LogColor("Could not find description", Colors.Magenta)                    
                End If
                
                Return
            End If
            
            LogColor("Check Version Failed", Colors.Magenta)
            
            Job.Release
End Sub
#end Region

This is working for me. Not sure if it will help anyone else

If I ever figure out how to navigate to the About this app page I will post it

BobVal
 
Upvote 0
Top