android-screen-pinning

startLockTask() without request user action

被刻印的时光 ゝ 提交于 2021-02-07 19:44:30
问题 I want to activate startLockTask() without any request for users. So at first i read this Device Administration and create small sample application. In result i have my application in device administrators list but when i call startLockTask() it still execute not in silent mode. When i'm trying to call it so: DevicePolicyManager myDevicePolicyManager = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE); String[] packages = {this.getPackageName()}; myDevicePolicyManager

Screen pinning 3rd party apps programmatically

怎甘沉沦 提交于 2019-12-29 03:29:07
问题 After achieving device ownership, I am trying to implement a method to instruct the device to lock any given app into kiosk mode (or screen pinning mode). Since I have device ownership, the user is not asked for the permission to do so. From the developer website, brief description tells me that it is possible to do what I am trying: http://developer.android.com/about/versions/android-5.0.html#ScreenPinning Programmatically: To activate screen pinning programmatically, call startLockTask()

Open other application in startLockTask mode using setLockTaskPackages() string array params in Android 5.0 (Lollipop) is not working

爱⌒轻易说出口 提交于 2019-12-11 15:06:43
问题 Motive: Building a KIOSK App for 5.0 & 6.0+ devices Method followed: adb to run the “dpm set-device-owner” command. By using startLockTask(); my app entered into authorised pin mode successfully. I had other challenge which is, I have to open other of my installed application from KIOSK app. I achieved this by constructing array of string packages and set it to DPM's setLockTaskPackages below is the code sample mDevicePolicyManager.setLockTaskPackages(mAdminComponentName, getKioskApps());

Kiosk Mode / Screen Pinning in Android wear

雨燕双飞 提交于 2019-12-11 01:13:00
问题 I am developing an Android wear app for Sony Smartwatch 3 with Android Lollipop and can't seem to find a way implement a working kiosk mode. I've looked everywhere but nothing seems to work. Also tried screen pinning but there isn't an option to do it on the watch (manually) and adding startLockStart() to my onCreate doesn't seem do to anything - I can still exit the app. Any help or confirmation that it is not possible will be greatly appreciated 回答1: Make sure you run Android L MR1 (Android

How to exit from Screen Pinning - Android 5 (Emulator)

混江龙づ霸主 提交于 2019-12-07 08:37:19
问题 Screen Pinning (as mentioned on this page) is a new feature introduced in Android 5 (Lollipop) which lets its users to temporarily lock only one Activity to the screen. All other notifications are hidden when screen pinning is activated. Following steps can be taken to activate Screen Pinning Users can enable screen pinning in Settings > Security > Screen Pinning, and select the tasks they want to pin by touching the green pin icon in the recents screen. And to exit from Screen Pinning user

How to check if an activity is locked (app pinning) in android Lollipop

拟墨画扇 提交于 2019-12-06 19:34:39
问题 I would like to know whether an activity is locked under app pinning in android 5.0 and above programatically. Please help me in this! Thanks! 回答1: Method to get if the activity in lock task mode. activityManager.isInLockTaskMode() API is deprecated in API level 23. Use the method activityManager.getLockTaskModeState() http://developer.android.com/reference/android/app/ActivityManager.html#getLockTaskModeState() public boolean isAppInLockTaskMode() { ActivityManager activityManager;

How to build software limiting user action to one single App on Android?

泪湿孤枕 提交于 2019-12-06 06:36:56
问题 I want to build an app for android and ensure that the user can only use this app. (i.e. user should not be able to open or install any other app.) Is it possible to force such restrictions on an Android device ? And if it is where should I start ? 回答1: What you are looking for is called the "kiosk mode" (just to help you googling the appropriate term). There is no such thing in the standard android api (at least... not yet : see the Edit ). User always have the ability to press the home

How to exit from Screen Pinning - Android 5 (Emulator)

荒凉一梦 提交于 2019-12-05 11:50:12
Screen Pinning ( as mentioned on this page ) is a new feature introduced in Android 5 (Lollipop) which lets its users to temporarily lock only one Activity to the screen. All other notifications are hidden when screen pinning is activated. Following steps can be taken to activate Screen Pinning Users can enable screen pinning in Settings > Security > Screen Pinning, and select the tasks they want to pin by touching the green pin icon in the recents screen. And to exit from Screen Pinning user can do the following the user can exit by holding both the Back and Recent buttons What I wanted to

How to be notified when screen pinning is turned off in Android 5.0 Lollipop?

孤街醉人 提交于 2019-12-05 05:52:26
问题 I have an app that runs in the background and starts an activity when a certain event occurs on the phone. I'm finding with Android 5.0 that when the user has screen pinning turned on with another app, the startActivity(intent) call is ignored completely. My app doesn't know that the activity didn't start, so the user then won't have another chance to see the activity until they manually reopen my app. Is there any sort of event I can register for to be notified when screen pinning is turned

How to check if an activity is locked (app pinning) in android Lollipop

让人想犯罪 __ 提交于 2019-12-05 01:02:48
I would like to know whether an activity is locked under app pinning in android 5.0 and above programatically. Please help me in this! Thanks! Sarangan Method to get if the activity in lock task mode. activityManager.isInLockTaskMode() API is deprecated in API level 23. Use the method activityManager.getLockTaskModeState() http://developer.android.com/reference/android/app/ActivityManager.html#getLockTaskModeState() public boolean isAppInLockTaskMode() { ActivityManager activityManager; activityManager = (ActivityManager) this.getSystemService(Context.ACTIVITY_SERVICE); if (Build.VERSION.SDK