Android Example Check your app presence on Google Play

Your app has been removed on Google Play.
Sample code for those who have previously installed the application not to use it again.

B4X:
Sub Globals
    Dim job1 As HttpJob
    Dim xui as XUI
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    Dim appid as String
    appid="xxxxxxx"
    job1.Initialize("", Me)
    job1.Download("https://play.google.com/store/apps/details?id="&appid)

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub JobDone (job As HttpJob)
           
            If job.Success Then
        Log("there is application")
            Else
        Log("no application")
        Wait For (xui.MsgboxAsync("This application is not used.", "info")) Msgbox_Result (result as int)
        ExitApplication
            End If

End Sub
 
Last edited:

Almora

Well-Known Member
Licensed User
Longtime User
B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    Dim appid As String
    appid="xxxxxx"

    Dim j As HttpJob
    j.Initialize("", Me)
    j.Download("https://play.google.com/store/apps/details?id="&appid)
    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Log("there is application")
    Else
        Log("no application")
        Wait For (xui.MsgboxAsync("This application is not used.", "info")) Msgbox_Result (result As Int)
        ExitApplication
    End If
    j.Release



End Sub
 
Top