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
Related
I want to lock my application in recent applications in oppo phones as shown in the image programmatically so that I can run my services in the background after the application has been killed. is it possible?
Make sure app is on.
Go to recent apps (which is the square button you always press to clear background apps).
Instead of swiping up to clear the app, you swipe down to lock/unlock the app.
You are not allowed to this programmatically :)
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.
I'm building my app with Phonegap. What I want to do is create a button on the screen and add a lock-screen event onclick. I searches on other posts but everyone tries to check if the screen is locked and execute then or before something. I only need the event (lock screen) to happen when clicking that button. It's exactly like you would lock it from the physical button on the iPhone but only it happens by clicking a button.
I need it both for iOS and Android but if you could give me a hint for only one, is welcomed.
Thank you!
For Android side;
As far as i know you app need to be registered on the device as an admin app. Then you can use the Device Administration API to lock the screen by DevicePolicyManager.lockNow()
Hi I am planning to create an android app which is similar to the
Samsung Kids Mode- parental control
If you can see the link I gave, it is obvious that the app overrides the Home button when inside the app... I wanted to create a similar app for friends mode and stranger mode and should not come out of the app when home button is pressed... is it possible without root access?? My ultimate aim is to not come out of the app without entering a password, So if it is just an app after android 4.0 it just comes to the home screen when home button is pressed, So If I create a custom launcher and make it default even after pressing home button it will be inside the app if I am right, but is there any way I can do the same without a launcher
Also to avoid the phone number suggestions which happens when we dial parts of numbers in the dialler, should the phone be rooted to so it or is it possible without that?
Thanks in advance to everyone for taking time to read this, hoping a positive solution
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.