Configure Intents

IT administrators may need to execute remote commands on mobile devices. On Android, commands are executed via “Intents,” which enable remote interaction with the device by triggering specific actions, such as starting a service or launching an application.

To create an intent, log in to your TinyMDM console, go to the Intents tab, and click on the Configure a new intent button.

  • Name: Type the display name of your intent. For example: Launch My App.
  • Intent type: Choose Activity, Broadcast or Service.
    • Activity: launch a specific activity. The command basically describes the activity to start and carries any necessary data, such as dialing a number, launching a map based on address, launching contacts etc…
    • Broadcast: send a message that any app can receive. The system delivers various broadcasts for events, such as when the system boots up or the device starts charging…
    • Service: launch a service in an installed app that can perform long-running operations in the background (it does not provide a user interface), such as handling network transactions, playing music, starting service to display notifications…
  • Action: Enter the action string for the command to be performed. For example: android.intent.action.MAIN.
  • Data: Enter any additional data, in the form of Data Uri. For example: tel:0842165975).
  • Categories: Enter contextual information that will be passed along with the intent, separated by “;”. For example: android.intent.category.DEFAULT;android.intent.category.DESK_DOCK.
  • Mime Type: Specify the format of content expected in the data. For example: image/jpeg
  • Component name: Target class or activity. For example: com.example.myapp/.Service
  • Extras Bundle: Additional information following JSON format. For example: {“keyA”:”valueA”,”key1″:”value1″,”key2″:”value2″}
  • Package Name: Enter the targeted application. For example: com.example.myapp
  • Flags: Flags can include instructions such as starting a new activity task or defining particular launch modes.
  • Don’t forget to check the associated box if the service must be started foreground (for services requiring higher priority and user visibility). Only available on Android 8+.
  • Click OK.

Prerequisites: update devices on TinyMDM version X.0000.

To execute an intent, you can do so either one of two ways:

  • From the device: once the intent has been created in the console’s Intents tab, you can approve it in your security policies where kiosk mode is enabled. An icon will then be visible on the device’s kiosk. The intent will be executed when the user clicks on the icon shortcut.
  • From the console: once the intent has been created in the console’s Intents tab, you can execute it on one or several devices by selecting the device(s) from the Devices tab, and select Execute Intent. Then choose the intent you want to execute from the list, and click OK.

In the Intents tab, if an intent has encountered execution errors, you can check them by clicking on the See errors link. From here, you can view the complete list of errors going back up to a maximum of one month, and sort them by date, from the most recent to the oldest.

For each error, you can see the device affected, and the error details. Once consulted, you can delete the error to remove it from the list.