Hi all
I have an app based on the Kiosk mode from here:
https://www.b4x.com/android/forum/threads/device-owner-tasklock-kiosk-apps-2017.81765/
I want the device to also receive phone calls. I didn't realize that kiosk mode would prevent the phone app
from appearing.
As a workaround, I'm using this code to detect when the phone rings:
The call to 'btnUnlock_Click' takes the app out of kiosk mode while the call is ringing. My problem is that the call does not appear on the screen, its in the background. This app will be the default Launcher on the device so I really need to call to just appear on top.
I can't work out how to get the 'active phone call' activity to come into focus though so the user can answer it.
Any ideas or alternatives greatly appreciated!
Andy
I have an app based on the Kiosk mode from here:
https://www.b4x.com/android/forum/threads/device-owner-tasklock-kiosk-apps-2017.81765/
I want the device to also receive phone calls. I didn't realize that kiosk mode would prevent the phone app
from appearing.
As a workaround, I'm using this code to detect when the phone rings:
B4X:
'call processing
If StartingIntent.Action = "android.intent.action.PHONE_STATE" Then
Select StartingIntent.GetExtra("state")
'onhook - call ended or phone idle
Case "IDLE"
Log("Call ended")
'outgoing call processing
Case "OFFHOOK"
'incoming call processing
Case "RINGING"
Log("CallerID="&StartingIntent.GetExtra("incoming_number"))
CallSubDelayed(Main,"btnUnlock_Click")
The call to 'btnUnlock_Click' takes the app out of kiosk mode while the call is ringing. My problem is that the call does not appear on the screen, its in the background. This app will be the default Launcher on the device so I really need to call to just appear on top.
I can't work out how to get the 'active phone call' activity to come into focus though so the user can answer it.
Any ideas or alternatives greatly appreciated!
Andy