Disable Android navigation in Kiosk Mode (Android Management API) - android

We have a Kiosk mode setup completed using Android Management API with our launcher app acting as kiosk app. However customizations applied through policy are not working as per expected.
"kioskCustomization": {
"systemNavigation":"HOME_BUTTON_ONLY",
"statusBar":"SYSTEM_INFO_ONLY",
"deviceSettings":"SETTINGS_ACCESS_BLOCKED"
}
We have this in the policy and it is getting synced to device but still all buttons in navigation bar working and still we can able to access settings.
What we need to do in order to disable navigation bar in kiosk mode? If we have app in full screen it is just hiding them but not disabling them.
Also is there way to disable gestures also?

I also noticed that when I applied:
"kioskCustomization": {
"systemNavigation":"NAVIGATION_ENABLED"
}
That it didn't work when I had the "installType":"KIOSK" set for an app, so this might indeed be a bug. Are you in kiosk mode via installType, then?
A workaround is to set "kioskCustomLauncherEnabled":true and then manually launch the app. This sort of defeats the purpose of having an app that can launch into kiosk mode on boot, but I've noticed with my app that if I am in kiosk mode via "kioskCustomLauncherEnabled":true, then it will properly apply the kioskCustomization settings.

I've been struggling with this issue for days! Finally found that it was the App I was using as my launcher app that was causing the issue.
For anyone else struggling with this, I suggest you set the Calculator app (com.google.android.calculator) as your Kiosk app and see if you're still getting the same issue. If not you know it's something to do with the app you're setting as the KIOSK app.
For me, the issue came from me including the following in the main actiivty intent-filter:
category android:name="android.intent.category.HOME"
As soon as I removed that the kioskCustomization worked perfectly.

Related

Create custom LockScreen for Android

I'm trying to create a custom lockscreen for Android version 7.1.1. (Nougat). I know that there are a lot answers on how to create a custom lockscreen, but whatever code I try to use, it's not really working.
The problem appears because of using deprecated methods. The app crushes, and there are no methods to replace the deprecated ones.
Does anyone know a way that this still works?
These are some of the links I've tried to use (there were a few older ones also but I didn't save them):
how to make our own lock screen in android instead of default lock screen
https://github.com/thomasvidas/Simple-Lockscreen/tree/master
developing an android lock screen application
Create custom lockscreen for android 4.0 or above?
At the end I managed to make this app working. My biggest problem was to put my device in kiosk mode (disabling hardware buttons when the lockscreen is displayed). The solution that worked for me was enabling device owner mode using Android Debug Bridge. It wasn't the best solution, but it was the most acceptable one for this project.
Here are some of the links that I used to achieve this:
https://documentation.meraki.com/SM/Device_Enrollment/Enabling_Device_Owner_Mode_using_Android_Debug_Bridge_(ADB)
http://www.sureshjoshi.com/mobile/android-kiosk-mode-without-root/

How to block Android keys for public Tablet?

I want to disable Android keys. I developed an application for tablets. But I want to disable tablet or android keys. In addition,customer have to use only my single application.
I am aware of kiosk but still have some problem. Could you help me please ?
You are looking for something like site kiosk mode:
Check here: Kiosk mode in Android
or here: http://www.andreas-schrade.de/2015/02/16/android-tutorial-how-to-create-a-kiosk-mode-in-android/
and here: Prevent status bar for appearing android (modified)

Multiwindow playground sample in Android Automotive N

Iam trying to run Android multiwindow sample https://github.com/googlesamples/android-MultiWindowPlayground on Android Automotive N. Inorder to switch app into split screen mode, it is suggested to long-press the recents button. Though the resizableactivity attribute is set true in Android manifest, it doesnot works in split screen mode in Headunit.
Please let me know how can I enable split screen mode in Android N Automotive Headunit?
Hope I understand your question, but fairly sure the point of Android Auto is to provide 'safe' access to some phone features, multi-window kinda defeats that purpose so I'm guessing the force it off in the Android Auto app.

Immersive mode locking app on Nexus Tablet

I just ran in to to an issue with immersive mode locking my app when testing on a android tablet (nexus7).
The only way to exit the lock was to swipe up to get back the software navigation bar and exit immersive mode.
How do I prevent this? What is happening?
The issue only appears when trying to enter immersive mode on a non-owner account. Android tablets support multiple users but apperently only one of them is considered "owner" According to issue https://code.google.com/p/android/issues/detail?id=62366 the problem is known by google but no fix as of yet.
The problem is that the helpscreen that pops up is hidden/invisble but is still receiving the touchevents. It can be removed by clicking in the correct location but it can be somewhat tricky to find it when you have no visual clues as to where to click.
Hope this helps save someones time!

Blocking a pull-down menu in Android

We have an industrial app running on stock Samsung Android devices. Because it's an industrial app we are trying to have it "take over" the device. We've got this pretty well working by setting in the manifest
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
and by intercepting the Android "back" key via onBackPressed and doing nothing.
Our one remaining conundrum is that Samsung's UI layer, 'Touch Wiz', has a pull-down menu that the user can pull down over the top of our app and access other features from. We're trying to disable that.
Is there anything we can intercept that the way we did the the back button to block that? Any other way to block it?
(if someone suggests "rooting" the device, what could I do as root that would help here?)
Thanks in advance!!
Which stock samsung device are you working with?
and by pull down menu are you speaking of the Notification Bar?
If so this is not a UI feature that is specific to TouchWiz, they may have modified what all can be accessed from the expanded notification bar. But this element exists in stock android as well.
If this is what you are referring to you can set a full_screen flag on your activity or application elements in your manifest. This will hide the notification bar while inside your application.
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
If it does not work with fullscreen mode home app:
A stock Android has no way to do real kiosk mode and I guess it's not a goal of Android to allow this since you could do evil things with that like build apps that force you to pay money before you can leave them again.
Root will not help here too since that's about the underlying Linux which allows you to access internal files etc. That does not unlock some magically hidden APIs.
What you would need to do is build your own firmware for the device (there might exist something for the device - look in http://forum.xda-developers.com/). In that firmware you are free to change those internals that allow users to escape your app.

Categories

Resources