Your Universal Remote Control Center
RemoteCentral.com
Complete Control by URC Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Preventing multiple button presses on Android
This thread has no replies.
Post 1 made on Monday April 7, 2014 at 09:48
pincorrect
Long Time Member
Joined:
Posts:
February 2009
14
I'm converting my home theater remote from an MX-980 to the Android App (with an MRX-2). I ran into an interesting issue with favorite channel buttons. On the MX-980, I programmed the macros for these buttons to press the correct digit numbers on the cable remote, but with a press of a delay button--a hidden button with a small delay programmed--between each number, all followed by the OK button. This worked fine for me on the Android, except I had to increase the delay a little, from 0.1 second to 0.4 second.

Then I handed the Android tablet to my wife, and she got nothing but garbage trying the favorite buttons. I grabbed it back, and they worked fine for me. I quickly figured out the problem though. I use tablets all the time, and just tapped the button. She has not used tablets a lot, and really lay into the button, pressing it good and long. The made it launch the macro repeatedly, and send the number sequence over and over, even before the previous sequences finished.

My first initial fix was to change the macros to start with a jump to a blank screen (like a "Please Wait" screen, except without any animation--no need because it would only be there briefly), followed by the digits and OK, followed by a jump back to the original screen. This completely eliminated the repeating button problem. However it was annoying, particularly since it did not seem to display the please wait screen until after it finished sending the digits, then quickly flashed it before returning to the original screen.

Next, I tried starting the macro with an "IF Button Press Time > 1 second THEN ELSE ". This If step did not do anything on either branch, but I figured it might wait around to see how long the button was pressed before executing, so it could evaluate the condition. This did not work, and the button got pressed repeatedly. (Maybe it optimized the IF statement away?)

My current solution looks like this (somewhat paraphrased)

IF Button Press Time >= 1 Second
THEN
    JUMP TO Please Wait
    JumpBack = true
ELSE JumpBack = false

Alias Cable Box/6 // or whatever digits needed
Alias Cable Box/Power/Delay For Favorites // 0.4 second delay between digits
Alias Cable Box/7
Alias Cable Box/Power/Delay For Favorites
Alias Cable Box/2
Alias Cable Box/Power/Delay For Favorites
Alias Cable Box/OK

IF JumpBack==true
THEN
    Jump Favorites Screen
ELSE

This works OK, but sure is a pain to enter for each favorite button. Has anyone here dealt with this issue and come up with a better way to deal with it?

Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse