Disabling or hiding the home and recents buttons in android navigation - java

My goal is to disable or hide the home and recents buttons hence forcing the user to press the back button to quit the app. Attached is a screenshot (edited via Photoshop) to show my desired user interface.
Is there anyway to do it?
My app won't be published to the Google Play Store.
I don't mind requesting specific permissions for this to be feasible.
Screenshot below:-

Related

How to launch my app programmatically, if an another app opens?

I want my app automatically open when user click (for example) chrome or any other apps.
How to do this?
My app is for preventing people use cell phone all the time.
Explicitly, there is a mission in my app. when user starts this mission, user cannot use other app until they give up the mission.
User can minimize my app, but when user click another app, my app will prompt programmatically to tell user not to use the cell phone.
Instead of preventing user to launch other apps, I think you should use activities' life cycle. You can add code in onPause() and detect user press home button or back button. And when your activity is not on foreground, you can pop a dialog or something to remind your user focus on his work not his phone. BTW I do see the positive side of your app.

How does Facebook Chat heads detect a home/menu press?

I've been trying to implement a service that displays UI similar to how facebook chatheads work. I noticed that I can detect a backpress inside of the View but I am unable to detect home presses.
I played around with the facebook chat head and I noticed that they're able to handle home presses and recent activity button presses seemlessly.
I've read this post: Detect 'home button pressed' event in android service displaying a UI (similar to facebook chatheads)
but it does not seem to help
How do you detect it?
Hi have you tried registering a BroadcastReceiver to listen to this particular intent Intent.ACTION_CLOSE_SYSTEM_DIALOGS. This will be called whenever android needs to remove temporary dialogs from the screen when home or recent apps key is pressed you can register a receiver with this intent to detect Home and Recent Apps key

How to open my Android app on a long press of home, back or recent apps button?

I want my users to be able to launch my app by long pressing back button, recent apps button or home button. Or even long press on volume up/down or power button.... something which would allow users to execute my app without touching a screen icon.
I offer similar voice solution to Google Now, which btw. opens after a long press on home button. Any way I can do the same? I get this question from my users almost daily...
I don't think your users will be able to do this without rooting. I found this thread which is worth reading:
http://forums.androidcentral.com/samsung-galaxy-s3/183113-button-remapping.html
alternatively they mentioned Go Launcher app
I've read through the list of ACTIONs that you can use for starting an activity through intents, but can not find any of the ones you wanted. If you do find any other ACTION useful there is more info on how to actually do it here.

The Android "back" button

I am an Apple iPhone user. I have never owned an Android of any type so I am used to the button I have to tap on the screen to go back a screen instead of the physical "back button" that Android has. An iPhone developer has to code the back button in for the user to operate the game but an Android developer does not necessarily have to code a back button and can just rely on the physical button on the phone.
My question is if it is okay for me not to code a button for my Android app and just let the user use the hardware back button on their phone? If there is no back button to tap, will an Android user instinctively know to hit the physical back button to jump back a screen? I don't really know this answer since I have never owned an Android and always rely on the iPhone coded in buttons.
The picture below is me coding in the back button instead of relying on the physical button on the phone. I am wanting to back out the back button from my code.
You shouldn't code a back button on your app. See the pure android guidelines here for more info on android apps look and feel.
Every Android Device contains Back Button. And Android users using the Back button since first version of android released. They All have idea on Back button , No need to implement it separately, User already Habituated it.
I have developed for both iOS and Android, and find the best answer to be using both. Android users know to use the hardware back button, but new users, or former iPhone users, often expect an on-screen button. There is no harm in having both, and an on-screen button may be a nice visual touch.
Cases where you may decide not to have a back button include layout for smaller screens - when screen real-estate is very precious. Just keep in mind that the most important part of an application is the user experience.
The key is to make your app as user friendly to all users - but don't take away the expected experience from dedicated Android users (for instance, if you are developing a single-activity app with multiple popup Views, the ideal performance of the back button will close the view, rather than closing the whole app).
Also if you want to have a button to go back at the top right of the activity, there is a way to add one on the action bar. Take a look at the Android Developers page if you want.

In Android how do I prevent the user from holding the home button to display recently launched apps?

In Android how do I prevent the user from holding the home button to display recently launched apps?
I'm assuming I need to override the onKeyDown method or have an intent filter in the Android Manifest?
This is a duplicate of Home button disable
These two questions achieved what I needed:
Home button disable
I had to do this as well Disable Lock Screen

Categories

Resources