I'm in need to stop entering safe mode on my nexus 7 tablet, because I implemented an Kiosk based application simply overriding home screen. Once default home screen changed to my custom home screen, user not allowed to take reboot device for safe mode. Is there any possibility to implement these feature without changing firmware OS.
Thanks in advance!
Related
I'm working with a client who would like their app to always be visible on the tablet screen for their in-shop/display model. They would like this app to be locked on the screen so that if a person presses the home button it will go home and the app will stay open. Basically they want the app to be the only thing on this tablet. Are there any solutions from a software perspective that I can implement?
Set the application to kiosk mode
https://developer.android.com/work/cosu.html
https://sdgsystems.com/blog/implementing-kiosk-mode-android-part-1
I have developed a custom launcher/homescreen and it has been working perfectly on all android version for nearly two years. So far this launcher has been used in various Samsung devices.
Currently I am testing it in new huawei lua-u22 device. My launcher runs, can be set as default and shows up other apps on top of launcher too. But if I run another app (for example Gmail), screen lock(Swipe only) for 20-30 second, unlock device then press back button then instead of bringing it back to my launcher it goes back to default huawei homescreen. I checked by going to the settings-> home and there my launcher was still set as default. It only brings back my launcher home screen when I press home button again.
Is this problem of huawei device that is always redrawing default huwaei home as homescreen? Is there anyway I can track default selected home change at any time?
I found out the reason. In huawei after screen is tuned off my app was getting killed.
Huawei has a feature Protected Apps which allows application that is enabled in the list to keep running when screen is turned off. After I allowed my app in Protected apps it was not getting killed after screen turned off and everything now working properly.
To enable this feature go to System settings (which you can either find in the quick toggles portion of the notification shade by pulling down the status bar on the top portion of the screen). Go to All tab, Scroll down to Privacy and Security section, go to to Protected Apps and enable your app(this will control what’s allowed to run when the screen is off and what isn’t)
In stackoverflow there are few codes available to run this screen pro-grammatically which I do not find reliable enough as it may change in any new version of device.
As it's said in android developers blog:
By itself, the touch mode is something very easy to understand as it simply indicates whether the last user interaction was performed with the touch screen. For example, if you are using a G1 phone, selecting a widget with the trackball will take you out of touch mode; however, if you touch a button on the screen with your finger, you will enter touch mode. When the user is not in touch mode, we talk about the trackball mode, navigation mode or keyboard navigation...
But android is booting by default in touch mode. How can I switch device into keyboard navigation mode, or make it a default one?
I'm developing app for a specific device, so it's rooted and I can also modify firmware.
You can force an Android device in or out of touch mode using Instrumentation.setInTouchMode(boolean).
new Instrumentation().setInTouchMode(false);
Running this as part of a boot receiver would probably achieve what you are looking for.
I am building an app that will be in kiosk mode and must be over the lock screen its is possible using:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
However, I now need to programmatically lock the screen when the app is starting, looking at this link, I see it needs administrator privileges that are a bit more complicated on the lollipop version, has anyone managed that?
For your need, you can use the Screen Pinning. It's a new functionnality added in Android 5 to limit the application a task.
Programmatically, you can use Activity.startLockTask() and Activity.stopLockTask() to pin/unpin the application.
Some things to know :
If your application is not an Admin app, a popup will appear and you'll have to manually confirm the pinning mode.
No notifications will be shown in this mode.
The Home and Recent Apps buttons will have no effects.
you can unpin the application with no confirmation, and if you have set a Keyguard screen, you'll need to unlock it to go back to your Home application.
We have a large fleet of android devices (Archos 70, running android 2.2) that we develop apps for to be used in the live events market.
One big problem we encounter is users touching the power key and turning the screen off, which generally they cannot find the key to turn them back on.
Is there any way in our flash air app that we can capture this key press and discard it?
Any help would be greatly appreciated!
No, actually this is impossible. This functionality is a part of Android. If you press power button everything is disabled. Even if you have wakelocks in your application they are all released when a user presses the power button. And I think that Google do not want to add such type of wakelock to their system because buggy applications can in this case block the ability to disable screen.