Android Question Device Owner / TaskLock - GetApplicationIntent after Locking terminal


Active Member
Licensed User
Longtime User
Hi There,

I've created an application that will work on kiosks following this guide:

The application has a screen with two buttons:

  • Lock
  • Start API Server
On the start API Server, I've this code:

    Dim pm As PackageManager
    Dim in As Intent
    in = pm.GetApplicationIntent("org.myapp.api")

    If in.IsInitialized Then
    End If

What's happening is that after I press the Lock button (and Android gets locked, no back buttons, no close application) I can't start the other application I also need to start.

Isn't this possible? Opening an application after the device has been Pinned?

Thanks in advance.


New Member
I have completed all the methods but there is a problem. I have been working on this problem for 3 days. I may not have understood the working logic.
When I click the app lock button it gives this error. Please help.

AddApplicationText(<receiver android:name="anywheresoftware.b4a.objects.AdminReceiver2"
  <meta-data android:name=""
  android:resource="@xml/device_admin" />
  <action android:name="" />
CreateResource(xml, device_admin.xml,
<device-admin xmlns:android="">
  <limit-password />
  <reset-password />
  <force-lock />


(AdminManager) anywheresoftware.b4a.objects.AdminManager@622cfe5
main_getmanager (java line: 443)
java.lang.RuntimeException: Field: dm not found in: anywheresoftware.b4a.objects.AdminManager
at anywheresoftware.b4j.object.JavaObject$FieldCache.getField(
at anywheresoftware.b4j.object.JavaObject.GetField(
at anywheresoftware.b4j.object.JavaObject.GetFieldJO(
at kiosk.otokiosk.main._getmanager(
at kiosk.otokiosk.main._btnlock_click(
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(
at anywheresoftware.b4a.BA.raiseEvent2(
at anywheresoftware.b4a.BA.raiseEvent(
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(
at android.view.View.performClick(
at android.widget.TextView.performClick(
at android.view.View.performClickInternal(
at android.view.View.access$3700(
at android.view.View$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)
Upvote 0