Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
 
LinkBack Thread Tools
Old April 19th, 2012, 10:29 PM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Apr 2012
Posts: 8
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Automatically disable buttons (menu/home/back/search) during fast thumb typing to prevent accidents

Here's the situation:

Problem: Some of us fast thumb typists get very frustrated when accidentally hitting buttons (i.e. Search) that interrupt our email or text message.
(I'm a thumb touch typist -- google "BlackBerry 75 WPM" to find my YouTube video)

Solution: An application that automatically disables the buttons (Home/Menu/Back/Search) when typing is detected. For a brief moment, until typing stops. That way, accidental touches of the buttons are ignored during fast typing.

Existing Precedent: On iPhone's, Apple's microphone button automatically behaves as a spacebar button if fast typing is detected. ( Mystery Behind The Change In Color Of Siriís Dictation Key Solved ) -- that's why on iPhones you don't get microphone app interruptions while you're doing fast typing and then hit the microphone button on the onscreen keyboard by mistake.
_____________________

If it's feasible to do so, I want to write an app to be able to hook into the buttons (Home/Menu/Back/Search) regardless of what app is running in the foreground, and ignore these button presses if any text has just been typed (i.e. less than 500 milliseconds ago).

My question to developers....
Can this be done as an app?
Non-rooted or rooted app?
Or does it require modifying the OS? (obviously, a custom OS build)


Although I'd rather Google do this in their OS.... I need to create an app that automatically disables the buttons when fast thumb typing is detected. It would make it so much easier to type long emails, without accidentally hitting keys that interrupt typing. The time delay would eliminate a lot of annoyances of sudden interruptions during the middle of typing long emails. If you pause your typing just for half a second, then the button will work normally. This time period could be configurable, to accomodate slower or faster typists, defaulting to probably 500 milliseconds.

It would be a big, big sanity saver for thumb touchtypists like me -- especially those who converted from BlackBerry to Android. (gotta welcome the BlackBerry refugees!)

Thanks,
Mark Rejhon

mdrejhon is offline  
Last edited by mdrejhon; April 19th, 2012 at 10:37 PM.
Reply With Quote
sponsored links
Old April 20th, 2012, 08:38 AM   #2 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

I would think that this would need to be something the developer of the particular keyboard app would need to implement. I don't think just any ol' app could remedy this.
jonbonazza is offline  
Reply With Quote
Old April 20th, 2012, 09:05 AM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Apr 2012
Posts: 8
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

If a keyboard app was done (or I worked with a developer of an existing one), would I be able to do it system-wide? And can I do it with the physical thumb keyboard?

If that is not possible, another method might be a low level code (ie driver level) which would require creating my own custom firmware modification on a rooted device. I'd rather avoid having to do it at the operating system level.
mdrejhon is offline  
Reply With Quote
Old April 20th, 2012, 06:15 PM   #4 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

If a user declares the keyboard you developed as the default keyboard in the phone's settings, then yes it will be system wide.
jonbonazza is offline  
Reply With Quote
Old April 22nd, 2012, 11:54 PM   #5 (permalink)
New Member
Thread Author (OP)
 
Join Date: Apr 2012
Posts: 8
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. That helps answer my question.

And if I am the default keyboard, I can override the buttons in order to filter them as needed?
mdrejhon is offline  
Reply With Quote
Old April 23rd, 2012, 08:14 AM   #6 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

Yep.
jonbonazza is offline  
Reply With Quote
Old April 23rd, 2012, 01:36 PM   #7 (permalink)
New Member
Thread Author (OP)
 
Join Date: Apr 2012
Posts: 8
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jonbonazza View Post
Yep.
Ok, excellent, now I see a roadmap that allows this to be accomplished in a non-root manner:

1. Create an Android Input Method. (There's a sample in the SDK)
2. Use a zero height for the on-screen part, since we don't need an on-screen keyboard. (Which seems to be possible, because it also can interface with external input methods, special voice input methods, or assistive devices)
3. Monitor key press events (or text change, or spellcheck plugin, or any other non-root method of detecting text being added to the currently-focussed field)
4. If key presses have been occuring (from the hardware keyboard) recently, basically filter the presses of Menu/Home/Back/Search buttons. Unless there's been a brief idle (of say, at least 500 milliseconds). In which case, pass through the button events normally.

The hardware keyboard runs concurrently with the input method (this commonly occurs if you use a different screen orientiation, i.e. horizontal onscreen keyboard and a portrait hardware keyboard).

The devil will be in the details (i.e. how to automatically invoke somebody else's input method, such as the device's native popup keyboard) whenever I'm in landscape orientiation, since I don't need to filter the Menu/Home/Back/Search buttons while the hardware keyboard is sideways.

If somebody else beats me to writing an app, please contact me.

Thanks!
Mark Rejhon
mdrejhon is offline  
Reply With Quote
Old April 23rd, 2012, 07:14 PM   #8 (permalink)
Over Macho Grande?
 
alostpacket's Avatar
 
Join Date: Nov 2009
Location: NY
Posts: 7,873
 
Device(s): GlassXE, MotoX, N5, N4, N7'12, GNex, N1, SGT10.1, Revue, Xoom, Eris, OG Droid
Carrier: TMO

Thanks: 4,582
Thanked 3,563 Times in 1,522 Posts
Default

Just FYI: as far as I know you can't hook into the home button on a non-rooted device.

I guess you you could however replace the launcher.... but that's.... well a bit crazy

You can hook into the back button.

I dont know about menu but I suspect it would be inconsistent. Long-pressing the old menu buttons used to bring up the software keyboard, and (I think) could also hide it.

Search I think would be like menu, inconsistent.

No idea about the new task switch button in ICS.
alostpacket is offline  
Reply With Quote
Old April 23rd, 2012, 10:44 PM   #9 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

Quote:
Originally Posted by alostpacket View Post
Just FYI: as far as I know you can't hook into the home button on a non-rooted device.

I guess you you could however replace the launcher.... but that's.... well a bit crazy

You can hook into the back button.

I dont know about menu but I suspect it would be inconsistent. Long-pressing the old menu buttons used to bring up the software keyboard, and (I think) could also hide it.

Search I think would be like menu, inconsistent.

No idea about the new task switch button in ICS.
That's correct. The Home button is off limits to developers as it is a crucial part of the Application Lifecycle.
jonbonazza is offline  
Reply With Quote
Old April 24th, 2012, 06:35 PM   #10 (permalink)
New Member
Thread Author (OP)
 
Join Date: Apr 2012
Posts: 8
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh, that is bad news.

Can I hook into all 4 buttons if I am rooted?

If not, can it be a simple mod in a custom ROM?

If custom ROM, can I donate a code modification to Motorola or Google, since this is a feature they should evaluate: to help steal more BlackBerry users!

Accidental tap elimination algorithm that will make it unobtrusive and usability enhancing for 99%+ of users:

DEFINITIONS
- 'button' here means the menu/home/back/search buttons
- 'keyboard' here means the physical keyboard
- 'accident prone key press' is defined as being top row characters only (Q,W,E,R,T,Y,U,I,O,P) as it is the keyboard row below the buttons. This is where all the accidental button presses occur.
- 'threshold' is defined as a minimum delay allowed between an accident prone key press and a button press/tap, for normal function
- 'tap of button' assumes buttons are touch buttons. Some older Android devices may use pressable keys for the buttons, but this is rare.

ALGORITHM
- button tap ignored if accident-prone key presses occurs either immediately before and/or immediately after, within threshold.
- button tap allowed instantly if no accident-prone key presses has occured since threshold.
- last-tap allowance: taps of button made immediately after accident key presses, is allowed if no further typing occurs. (Button tap is buffered till end of threshold, to make sure no further typing occurs). This accomodate situations of people who immediately tap the buttons right after composing text, for some menu/search feature. (There would just be a short lag of a fraction of a second that only occurs in this situation)
- threshold could theoretically be somewhat adaptive, based on the average typing speed in the last little while, with an upper cieling that could be configurable.

I am typing this in Tapatalk, being that I thumb type faster than most people can type at the desktop. I have interrupted myself about 25-30 times trying to type this message. I even lost a message once, due to some accidental menu action that discarded the text, because I continued to type several characters after the accidental menu press. This is a frustration big enough for me to create a custom ROM just so I dont have to pull out my laptop instead of my Android. :-) and you know how us power users give good references to other people to increase sales of a device, etc.

A way shall be found...
mdrejhon is offline  
Reply With Quote
sponsored links
Old April 24th, 2012, 07:10 PM   #11 (permalink)
Over Macho Grande?
 
alostpacket's Avatar
 
Join Date: Nov 2009
Location: NY
Posts: 7,873
 
Device(s): GlassXE, MotoX, N5, N4, N7'12, GNex, N1, SGT10.1, Revue, Xoom, Eris, OG Droid
Carrier: TMO

Thanks: 4,582
Thanked 3,563 Times in 1,522 Posts
Default

Well they intentionally made it so you can't change the home button to prevent a malicious app from taking complete control. I think you could definitely modify it in a ROM, but I don't know how hard or easy it would be.
alostpacket is offline  
Reply With Quote
Old April 25th, 2012, 08:25 AM   #12 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

You would need to change that functionality in the ROM itself. It's not something you can do via application, whether you are rooted or not. Why can't another button perform this functionality? Such as the search button?

EDIT: Actually, the search button isn't required to be implemented by all devices, so that may be a bad idea after all.
jonbonazza is offline  
Reply With Quote
Old April 25th, 2012, 02:18 PM   #13 (permalink)
New Member
Thread Author (OP)
 
Join Date: Apr 2012
Posts: 8
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

How? All four buttons can be accidentally tapped.

Thumbs are big.
-- The menu button can be accidentally tapped while successfully typing letter Q or W or E
-- The home button can be accidentally tapped while successfully typing letter R or T
-- The back button can be accidentally tapped while successfully typing letter Y or U
-- The search button can be accidentally tapped while successfully typing letter I or O or P

My thumb edge often touches a button while successfully pressing a key. Accidental-tap filtering fixes the problem and produces mostly error-free typing.

This is, so I can thumb touch type without looking, without worrying about unknown accidental popups caused by accidental presses because my thumb tapped a button simultaneously with the letter.

I am a deaf software developer and thumb keyboards are my livelihood. I develop for various mobile platforms for a living.

If employees are reading this, please feel free to forward this thread to your contact at Google or at Motorola.

Note: I typed this message almost two times in Tapatalk. My first draft got lost in a select-all accident that would not have happened with accidental tap filtering.

For this, I am willing to pay $500 paypal for a software developer to solve this problem with an accidental-tap filtering algorithm as an app (or rom modification that I can install in less than half an hour on a rooted device, over ssh replacing operating system file if needed). You get to keep and sell the app.

Sincerely,
Mark Rejhon

mdrejhon is offline  
Last edited by alostpacket; May 1st, 2012 at 08:21 PM. Reason: signature removal
Reply With Quote
Old April 25th, 2012, 03:02 PM   #14 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

Like I said, this can't be done via application, whether the device is rooted or not. You will need to develop an entirely new ROM (which is in no way easy and would have to be tweaked for every device out there). In sumary: can't be done.
jonbonazza is offline  
Reply With Quote
Old April 25th, 2012, 03:03 PM   #15 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

I should also mention that from now on, almost all devices will be released without hardware buttons at all, so this won't be an issue going forward.
jonbonazza is offline  
Reply With Quote
Old April 25th, 2012, 03:33 PM   #16 (permalink)
New Member
Thread Author (OP)
 
Join Date: Apr 2012
Posts: 8
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually, it's still a problem.

One example: I tried the Samsung Galaxy Nexus. It has no hardware buttons BUT it has three persistent on-screen buttons that can still be accidentally tapped when touching on-screen elements adjacent to the buttons.

Plus, when Ice Cream Sandwich devices with physical keyboards come out, with the bottom of screen edge nearly touching the top row of physical keyboard, we have EXACTLY the same kind of accident prone issue. Not all vendors will put a BlackBerry-like 0.5 inch gap between a screen and the keyboard.

Therefore, the exact same kind of accidental tap filtering is still relevant for these 100 percent software screen elements at bottom of screen edge. You would just instead briefly ignore near-simultaneous taps to the edge of the screen that is adjacent to a physical keyboard, if an accident prone key is typed. But you'd be needing to use nearly exactly the same accidental-tap filtering algorithm.

It seems the most practical method is directly approach Google and Motorola, to do an optional system level modification for the next Android release, since I am not the only one complaining. Let's see how much results can get done by hitting the correct channels.

Mark Rejhon
mdrejhon is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:18 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.