I have a problem that I don't really know how to solve and also the threads here at SO haven't fully helped me.
Here's the issue: I want to have an android app that I can start whenever I want, and then, when I click on a button, I want the app to be somewhat "locked". By that I mean: after this button was pressed, the user is not able to close(see edit below) the app. Also, the app should immediately start after rebooting the device.
This lock can then be revoked by, say, entering a passcode, which makes the app run normally again.
So far I understand how to build kiosk applications. However, a kiosk application needs a particular manifest which will make it always a kiosk app, and not "on demand".
I'd greatly appreciate any hints and tips on this topic. Thank you so much!
EDIT: by "close" I really only mean completely turning the app off, not only going back to your home screen. Such that the app is always running in the background
You can programmatically lock and unlock the App in Android 5.0 http://developer.android.com/about/versions/android-5.0.html#ScreenPinning
Related
problem:
My flutter app did not launch or more precise was stuck in launch screen because I had to many other apps in the background e.g. Gallery, Camera, Browser etc. and so on. After closing those sleeping background tasks my flutter app launched like expected.
Questions:
A) Is it possible to e.g. open a dialog and inform the user of the nature of the problem. E.g. close some apps, please. Your cell phone ran out of Memory? If so, how? There are alot „change splash screen“ tutorials, would this be the correct place to implement such logic or is another widget preferable?
B) I know closing other apps is not possible due to android OS restrictions. But may be someone has another idea to atleast inform the user about the issue?
Best regards
Hugo
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 was studying some tutorials on Android programming and I realized that pressing the Home button on the emulator takes me tot he phones Desktop, but my sample that was running at the time only goes to the background and does not get destroyed. However, if I press the return button, the app is destroyed as well. So I am assuming there might be other apps running int he background as well, those which I am not aware of. Is there something in the android emulator resembling the task manager from windows, which shows what apps are currently running on the phone? I don't have a smartphone with me, but I remember seeing something like that on my friend's smartphone a few days ago. It wasn't an external app but was something built into the phone, I could access it by going to Settings or something.
Is there a task manager built into the android emulator, or is there any other way I can see such things through the SDK debugger?
Inside the settings, there is a list of currently running processes.
First , Leaving the activity does not mean the process ends, It is just not invisible . When the Os needs more memory ,it will be recovered.
If you want to have a backup process, you can start a back service.
http://developer.android.com/reference/android/app/Service.html
Here is how I end a process (only works on Android 4.0+).
Instead of pressing home, press recent and swipe away the process you want to end. Then press home (or back).
You can also use this to close those nasty apps that prevent you from closing them by not allowing back button to work on their main screens.
This is much quicker than having to go to settings, etc.
i have a Phonegap and JQM app.
Problem is, if I switch to another app and then back to my app, App is completely reloaded and start again.
Is posible this disable?
Thanks for any advice.
This is happening because there is a lack of memory for the app to run. So as soon as u go to home the app dies and on opening again it reloads the app from the start. To confirm that this is indeed happening i would suggest that you close all running apps on your phone and then run your app. Im sure it would run properly even after switching to home screen and coming back.I don't think its possible to get around this behavior. Design your app so that it has a small startup time so that its usable even on phones with less ram where such problems would come.
On an android App I made, whenever the user turns the app to the side, the app turns sideways and restarts (this was on the droid). I don't want to this to happen. I want the app to not restart when the device is turned sideways.
Also I would prefer the app to be locked in the vertical position.
How would I go about this two thing?
Thanks in advance.
This has been covered numerous times Android, how to not destroy the activity when I rotate the device?