Android Question b4a server redirect after loading

walmo

Active Member
Licensed User
Longtime User
Hi
Im using the b4a ServerService with this Server HandleRequest
B4X:
Sub Server_HandleRequest (Request As ServletRequest, Response As ServletResponse)
    Try
        Log("Client: " & Request.RemoteAddress)
        Log(Request.RequestURI) 'handle the request based on the URL
        Select True
            
            Case Request.RequestURI = "/"
                HandleMainPage (Response)
            Case Request.RequestURI = "/Reboot/"
                reboot
                
            Case Request.RequestURI ="/Relink/"
                restartlink
            Case Request.RequestURI="/adb/"
                adb
            Case Request.RequestURI="/callme/"
                call_me
            Case Request.RequestURI="/shutdown/"
                shutdown
                        
        End Select
    Catch
        Response.Status = 500
        Log("Error serving request: " & LastException)
        Response.SendString("Error serving request: " & LastException)
    End Try
End Sub

Now the problem is i need a redirect after loading a link, like say /shutdown/ . The phone restarts but the page on device stays on shutdown.
when opening browser it is still on shutdown .

need to redirect back to mainpage before shutdown , how to i call a url back to the main screen again. Must it be in the html file or can i do it in the server.
Thanks
 
Top