Note: The following information applies to i.safe MOBILE Smartphones together with ISMConfig.


Enables enterprise users to configure custom intents to be sent, when hardware buttons on our devices are pressed. This allows enterprise applications to handle the intent and perform custom actions.


MDM solution allows you to configure policies for ISMConfig through Managed app configurations. Please contact your MDM Solution provider for the details. Through these policies, custom intents can be assigned to our hardware buttons. Generally, MDM solutions provide either a GUI interface and/or JSON policies editor for your policy needs.



 

If your provider provides a GUI interface like for example SOTI. 

  1. Add a new Button Configuration

  2. Choose the desired button you want to configure through “Button” drop down 

  3. Set “Short Press Action” to “Custom intent”

  4. Set “Custom intent”  to your desired intent

  5. You have the option to multi select various flags for your custom intent. We currently support the following flags:

    1.     FLAG_ACTIVITY_CLEAR_TASK

    2.     FLAG_ACTIVITY_NEW_TASK

    3.     FLAG_ACTIVITY_SINGLE_TOP

 

 

If your MDM provider has a JSON interface like Microsoft Intune, then you have to manually write your JSON. For example The following JSON configures SOS and M1 buttons of our phone to custom intents in Microsoft Intune:

{

    "kind": "androidenterprise#managedConfiguration",

    "productId": "app:com.isafemobile.ismconfig",

    "managedProperty": [

        {

            "key": "showButtonSettings",

            "valueBool": true

        },

        {

            "key": "buttonConfigs",

            "valueBundleArray": [

                {

                    "managedProperty": [

                        {

                            "key": "buttonType",

                            "valueString": "SOS"

                        },

                        {

                            "key": "buttonAction",

                            "valueString": "20"

                        },

                        {

                            "key": "buttonIntent",

                            "valueString": "com.example.action.ACTION1"

                        }

                    ]

                },

                {

                    "managedProperty": [

                        {

                            "key": "buttonType",

                            "valueString": "M1"

                        },

                        {

                            "key": "buttonAction",

                            "valueString": "20"

                        },

                        {

                            "key": "buttonIntent",

                            "valueString": "com.example.action.ACTION2"

                        },

                        {

                            "key": "buttonIntentFlags",

                            "valueStringArray": ["FLAG_ACTIVITY_NEW_TASK","FLAG_ACTIVITY_SINGLE_TOP"]

                        }

                    ]

                }

            ]

        }

    ]

}



Please note that custom intents are only present for short press, there is no support for custom intents in long press action.