Android Question Run kiosk

warayTek

Member
Licensed User
Hello everyone, I want to ask if my application is running as a service, how can I call the kiosk application? The purpose is to block the screen.
 

DonManfred

Expert
Licensed User
Longtime User
how can I call the kiosk application?
You can raise an Intent to start a App.

But for it to work you need to know the packagename of the app you want to start.

Do you know which app is the Kioskapp?
 
Upvote 0

warayTek

Member
Licensed User
You can raise an Intent to start a App.

But for it to work you need to know the packagename of the app you want to start.

Do you know which app is the Kioskapp?
Hi DonManfred, I was thinking the same thing. The package name of the test kiosk app is "gota.com", but it can not be located.
It must be different from a regular application.
 
Upvote 0

warayTek

Member
Licensed User
I can't find a solution to call an application if the app (caller) is in the service. Is there a way to open the app(caller)?
The code below counts down, after it triggers the notification I want the app to open in the foreground. Is this possible?
B4X:
Sub Timer1_Tick
    Dim t As Long = Max(0, targetTime - DateTime.Now)
    Dim  hours, minutes, seconds As Int
    hours = t / DateTime.TicksPerHour
    minutes = (t Mod DateTime.TicksPerHour) / DateTime.TicksPerMinute
    seconds = (t Mod DateTime.TicksPerMinute) / DateTime.TicksPerSecond
    Log($"$2.0{hours}:$2.0{minutes}:$2.0{seconds}"$)
    If t = 0 Then
        Log("Done..")
        Dim n As Notification = CreateNotification("Done Timer")
        n.Notify(nid)
        timer1.Enabled = False
'        Dim cs As CSBuilder
'        cs.Initialize.Color(Colors.Blue).Size(20).Append("Testing toast message").PopAll
'        ShowCustomToast(cs,True,Colors.White)'
'      
    End If
End Sub
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I want the app to open in the foreground. Is this possible?
You want YOUR APP to go to foreground?
So YOUR APP is the Kiosk-app?

If you want to open an activity from your app) from the background you need to have a special permission.

StartActivity from a service will not work if there is no visible activity. As a workaround you can request the special "draw over apps" permission: https://www.b4x.com/android/forum/threads/draw-on-top-of-other-apps-permission.90513/
It will allow StartActivity to work.
 
Upvote 0
Top