Salvatore Piras
Jan 22, 2016
10:36 am

kiosk mode and Intent.ACTION_ASSIST

I've noticed that switching on/off kiosk mode overrides default package for Intent.ACTION_ASSIST. Is this the expected bahaviour or is there any way I can prevent it without dropping the use of kiosk mode entirely?

After switching on default package for that is android system default package

Steps to reproduce:

1) set custom app for Intent.ACTION_ASSIST

2) switch kiosk mode on

3) check default app for intent:

public void showAssistant() {
    if (Build.VERSION.SDK_INT > 15) {
        Intent i = new Intent(Intent.ACTION_ASSIST);
        i.addCategory(Intent.CATEGORY_DEFAULT);
        PackageManager pm = this.getPackageManager();
        final ResolveInfo mInfo = pm.resolveActivity(i, 0);
        Log.d(TAG, "default device search assistant is " + mInfo.activityInfo.packageName);
    }
}

 

Thanks in advance for every reply

Similar topics

No similar topics found.
Kamil K.Samsung SEAP Moderator
Jan 22, 2016
12:01 pm

Hi,

I am currently looking into this and will get back to you as soon as possible.

Kamil K.Samsung SEAP Moderator
Jan 22, 2016
12:12 pm

Hi,

 

Can you please give us below information:

1. Which device model/models are affected? (build numbers will be helpful)

2. Is only default package for ASSIST intent changed or other packages are changed too?

Salvatore Piras
Jan 25, 2016
10:08 am

It seems like only the ASSIST intent package is affected (no other default behaviours seems to change) 

I've tested it on a SM-T230 tablet running android 4.4.2 (build number: KOT49H.T230XXU0AOD2)

Kamil K.Samsung SEAP Moderator
Jan 26, 2016
9:36 am

Hi,

I was not able to reproduce your issue on device with the same build.

Can you please tell me if you are using any other API in your app? Also you can check with my test app if issue occurs.

https://www.dropbox.com/s/urmul0j7v57q77p/assistIntentTest.apk?dl=0

Please follow below steps.

1. Remove default app for Assist Intent

2. Install my test app -> activate admin -> activate license

3. Check default Assist app (4th button)

4. Use 3rd button to set test app as default app for Assist intents

5. Get back to test app and check if default package name was changed (4th button)

6. Enable Kiosk mode with 1st button - wait few seconds

7. When Kiosk mode was enabled open my test app and check default package name for Assist intent(4th button)

Please give me feedback about results

Salvatore Piras
Jan 26, 2016
10:32 am

Kamil

thanks for looking into it. It seems that with your apk the issue doesn't come out even after my tests. The only different thing I can think of is that my app package is the package set for the kiosk mode, the default launcher and the default assist intent receiver at the same time, may it cause any issues in the kiosk behaviour? I'm just activating kiosk with the standard knox api with my app package name as argument, with no extra options and receiving ERROR_NONE from the kiosk intent enabled (everything else works, it just changes the assist package as a side effect)

Kamil K.Samsung SEAP Moderator
Jan 26, 2016
2:47 pm

Hi,

I will investigate that and update you as soon as possible.

Kamil K.Samsung SEAP Moderator
Jan 27, 2016
1:25 pm

Hi,

I modified test app to be MDM app, kiosk mode launcher and handle Assist intents.

https://www.dropbox.com/s/tp15uzl88m9jhnq/assistIntent_kiosk.apk?dl=0

As before please follow below steps.

1. Remove previous test app

2. Remove default app for Assist Intent

3. Install my test app -> activate admin -> activate license

4. Check default Assist app (4th button)

5. Use 3rd button to set test app as default app for Assist intents

6. Get back to test app and check if default package name was changed (4th button)

7. Enable Kiosk mode with 1st button

8. When Kiosk mode was enabled use 2nd buton to check if default package name was changed

Please give me feedback about results

 

Salvatore Piras
Jan 27, 2016
5:55 pm

Your test app works perfectly. I will try to investigate further if there's something interfering during the setup of the kiosk mode and get back to you if I find something

Thanks