问题标签 [android-screen-pinning]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - 更改 Lollipop 的屏幕固定呈现的敬酒
我一直在寻找一种方法来更改当用户尝试离开固定屏幕时 Lollipop 的屏幕固定显示的默认消息,但我在任何地方都没有找到答案......我找到的最接近的东西就是这个问题.. .所以我认为在这里发布是一个很好的问题,以防万一其他人以前做过这种定制,或者确定这是否不可能实现。
提前致谢!
android - COSU: Cannot find Activity any more after pin and then restart
I'm developing an App that can be Screen Pinned aka Corporate Owned Single Use aka Lock Task Mode.
If I pin it and then:
- I close it (killing it) and then I launch it again
- or after some code modification in android studio and then perform Run
- restart after pin and unpin
I get the following error:
This is my Manifest:
If I don't ever pin the app I can restart/upgrade&run it many times I want.
The nice thing is that is not even possible to uninstall the app because it has been configured as Device Owner, and so, it cannot be uninstalled unless a factory reset.
I dont understand how is possible that my activity disappears after an app restart. Can be something related to the intent category or action
?
If anyone else encountered this behavior can tell me I will submit an issue to the bug report site.
Thanks.
EDIT 18/3
I think maybe this is happening because at a certain point, I kill the home category activity
that in my case is the missing StartActivity in question, and it is not restarted even if I restart the app.
android - 什么会导致 startTaskLock 固定然后立即取消固定活动?
我一直在尝试使用 android 6.0 任务锁定/锁定来锁定我的活动。它似乎工作不可靠。有时,当我启动我的应用程序时,它会固定并且一切都像它应该隐藏的那样。其他时候它会尝试,但实际上并不需要。例如,我得到一个说“Screen Pinned”的吐司,然后是一个说“Screen Unpinned”的吐司。最终结果是应用程序没有完全固定(隐藏主页和任务切换器图标)。但是一旦进入这个循环,即使我继续尝试,它似乎也不起作用。这也是启动时的问题,类似于此处报告的内容:
有什么方法可以判断是什么导致 android 取消固定我的活动?这是令人沮丧的,因为它没有说明为什么它不起作用。
java - Cordova plugin-locktask
I am working on a cordova project and I want to use the plugin locktask provided by cordova itself to pin an android app. I could use other plugins successfully but this plugin does not work for some reason.
Another solution could be implementing the startlocktask() method using the native java class but I still didn't know how to invoke this method into the javascript code
After addding the cordova plugin using cordova plugin add cordova-plugin-locktask
a plugin file is downloaded.
However, when I use this line in the javascript, it deosn't work
window.plugins.locktask.startLockTask();
P.S. there is a java function StartLockTask() that would solve the problem but I do not know how to invoke a java function inside the javascript code
android-screen-pinning - 我们可以在没有用户交互的情况下对 android 棒棒糖设备进行屏幕固定吗
我正在我的应用程序中尝试屏幕固定。但是在棒棒糖设备中,在屏幕固定和取消固定其询问用户交互之前。如果我们单击“确定”,则只有屏幕固定有效。
有没有办法在固定屏幕时删除用户交互对话框?
android - Activity.startLockTask() 从一个 Activity 到另一个 Activity
我正在使用Activity.startLockTask()
并注意到如果我将屏幕固定在活动 A 中,我将无法转换到活动 B。似乎我必须startLockTask()
然后stopLockTask()
再startLockTask()
一次在活动 B 上转换。
有没有更好的方法来处理这个问题,这样我就可以固定整个应用程序,而不管我在做什么活动?
这就是我固定应用程序的方式:
这就是我停止固定的方式
android - 如何关闭“屏幕固定”和“已启用 Kiosk 模式”对话框?
背景:
我正在制作一个在 Kiosk 模式下运行的应用程序(通过使应用程序成为设备所有者来启用)。该应用程序仅供我使用,不会在 Google Play 上提供。
问题:
当我打开 Kiosk 模式时,它会在对话框中显示“已固定屏幕”和“已启用 Kiosk 模式”,每个持续 3 秒。当我关闭 Kiosk 模式时,它会在每个持续 3 秒的对话框中显示“屏幕取消固定”和“Kiosk 模式已禁用”。当应用程序需要连续多次切换 Kiosk 模式时,仍然会显示所有对话框。因此,如果切换 5 次,则将有 30 秒的对话(2 条消息 * 3 秒 * 5 次 = 30 秒)。如何关闭这些对话框?
额外信息:
应用需要切换 Kiosk 模式的原因是,当它首次打开时,它会询问用户访问 USB 设备的权限。当屏幕固定时,Android 不会显示此请求,并且它不会记住我在下次重新启动平板电脑时授予了权限(即使我选中了询问我是否希望它记住的框)。因此,必须暂时禁用此对话框的 Kiosk 模式。
我尝试在应用设置中关闭所有通知。这确实摆脱了“Kiosk Mode enabled/disabled”对话框(不是“Sceen Pinned/Unpinned”),但它也摆脱了我为应用程序制作的对话框。所以这不起作用。
java - 无法解析符号“@xml/device_admin”
我正在尝试在 Android 5.1 设备上实现屏幕固定。我遇到了This Answer,并在尝试将 a 添加intent-filter
到我的 Manifest 时,出现此错误:Cannot resolve symbol '@xml/device_admin'
。
我认为这是因为xml/device_admin
不存在,所以如果是这种情况,我在哪里创建它?
我的清单
我的主要活动
android - Android取消固定屏幕-即使启用了某些辅助功能服务,如何始终需要两个键
我正在为孩子们制作一个简单的应用程序,我想使用 Android API 中内置的屏幕固定方法 startLockTask()。问题是当启用任何无障碍服务时,只需触摸并按住一个键即可取消固定屏幕。解锁应用程序太容易了。如果它总是需要同时按下 2 个键(就像没有启用无障碍服务时那样),那将是完美的。屏幕固定有什么方法会忽略可访问性模式?
设备所有者应用程序不是我正在寻找的解决方案。我知道我可以使用辅助功能和其他技巧来禁用按钮,但我听说 Google 将检查 Google Play 应用程序并删除那些不恰当地使用辅助功能服务的应用程序。
android-screen-pinning - 如何检查是否从设置中启用了屏幕固定?
我想知道如何检查是否从设置中启用了屏幕固定/固定窗口选项?如果有人知道如何以编程方式做到这一点,请告诉我。对不起,我的英语不好,谢谢