Android 9 TV Box: acting on remote control
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Android 9 TV Box: acting on remote control
I am deploying a LC 9.6.3 standalone in a Android 9 TV Box (T9 RK3318), that runs very well.
As you may know, beside attaching a hardware keyboard, or use the infrared remote control "mouse" mode, in most TV box you can go from button to button or field to field using the left/top/right/bottom commands of the infrared remote control.
I haven't figured out how i can intercept in LC these command and act accordingly on the UI.
Somebody has been able to do it?
As you may know, beside attaching a hardware keyboard, or use the infrared remote control "mouse" mode, in most TV box you can go from button to button or field to field using the left/top/right/bottom commands of the infrared remote control.
I haven't figured out how i can intercept in LC these command and act accordingly on the UI.
Somebody has been able to do it?
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: Android 9 TV Box: acting on remote control
Maybe you can handle the "focusin" message somehow?
IF that message is being sent here...
IF that message is being sent here...
Re: Android 9 TV Box: acting on remote control
Before the control can receive a FocusIn, I should be able to focus on it (using what I found to be named D-Pad). And it doesn't.
I guess this stuff should be coded:
https://developer.android.com/training/ ... navigation
Out of my knowledge possibilities
I guess this stuff should be coded:
https://developer.android.com/training/ ... navigation
Out of my knowledge possibilities
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: Android 9 TV Box: acting on remote control
Hi,
just to be sure: This doesn't shows anything?
Have fun!
just to be sure: This doesn't shows anything?
Code: Select all
on rawkeydown what
answer what
end rawkeydown
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
Re: Android 9 TV Box: acting on remote control
No.
Both on the Tv box and on a Android 7 phone the rawkeydown does not react.
The native field takes control, I guess
Being able to code this navigation may open up a market for LC on android TV and android TV box: games, utilities , etc.
I thin LC should do an LCB extension for it
Both on the Tv box and on a Android 7 phone the rawkeydown does not react.
The native field takes control, I guess
Being able to code this navigation may open up a market for LC on android TV and android TV box: games, utilities , etc.
I thin LC should do an LCB extension for it
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: Android 9 TV Box: acting on remote control
Strange enough, the back key on the remote control reaches the "backKey" message in LC, like if using the cell hardware back button.
Also, LC answer and ask dialogs behave perfectly on the Android TvBox: you can navigate, using the remote wheel, from the field to the OK and Cancel buttons and back.
So, apparently, what is sent from the infrared remote does reach the LC engine.
Could it just be that there is a way to make it work but I don't know how?
I tried to look at the code of the ask and answer dialog, but I could not find a clue.
Also, LC answer and ask dialogs behave perfectly on the Android TvBox: you can navigate, using the remote wheel, from the field to the OK and Cancel buttons and back.
So, apparently, what is sent from the infrared remote does reach the LC engine.
Could it just be that there is a way to make it work but I don't know how?
I tried to look at the code of the ask and answer dialog, but I could not find a clue.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- VIP Livecode Opensource Backer
- Posts: 7266
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android 9 TV Box: acting on remote control
Since the backkey works, maybe an arrowkey handler would work too?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Android 9 TV Box: acting on remote control
No. Nothing.
BackKey: OK
arrowKey: no
rawkeyDown: no
rawkeyUp: no
keyDown: no
keyUp: no
no other buttons on the remote has any effect (except of course for home and shutDown) on LC
Amazing
BackKey: OK
arrowKey: no
rawkeyDown: no
rawkeyUp: no
keyDown: no
keyUp: no
no other buttons on the remote has any effect (except of course for home and shutDown) on LC
Amazing
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- VIP Livecode Opensource Backer
- Posts: 7266
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android 9 TV Box: acting on remote control
Well, that's disappointing.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Android 9 TV Box: acting on remote control
Yeah. But what is bizarre, as I said, is that left/right/focus select from the remote works fine inside the ask and answer LC dialogs.
There is a lot of code in this dialogs that I don’t understand. But I wonder if I could duplicate that stack and transform it for my own use.
There is a lot of code in this dialogs that I don’t understand. But I wonder if I could duplicate that stack and transform it for my own use.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: Android 9 TV Box: acting on remote control
I did a test (spoiler: it doesn't work)
Since the Answer/ask dialogs are listed on the standalone setting inclusions, probably they have code in the engine that allow them to respond, as they do, to infrared remot control, for navigating between buttons focus, field, etc. for reasons that escape me.
So I created a copy, with a different name, of the IDE "Answer dialog" stack, and I set it as a substack of a main stack.
I did some minor change to the code, removing a command which I don't understand but mainly acts on stack closing, that get sent to the revIDELibrary
Unfortunately, opening the stack as modal, works as a regular modal stack but does not responde to the remote control.
Any knowledge guy can clear the light on this or make some suggestions?
I attach the stack, in case you care.
Thanks
Since the Answer/ask dialogs are listed on the standalone setting inclusions, probably they have code in the engine that allow them to respond, as they do, to infrared remot control, for navigating between buttons focus, field, etc. for reasons that escape me.
So I created a copy, with a different name, of the IDE "Answer dialog" stack, and I set it as a substack of a main stack.
I did some minor change to the code, removing a command which I don't understand but mainly acts on stack closing, that get sent to the revIDELibrary
Code: Select all
if the environment is "development" then
send "ideMessageSend" && "ideAnswerDialogClosed" to stack "revIDELibrary" in 0 millisecs
end if
Any knowledge guy can clear the light on this or make some suggestions?
I attach the stack, in case you care.
Thanks
- Attachments
-
- TvBoxAnswerDialog.livecode.zip
- (5.9 KiB) Downloaded 85 times
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- VIP Livecode Opensource Backer
- Posts: 7266
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Android 9 TV Box: acting on remote control
I remember when mobile was first developed, LC said they had to create specialized ask and answer dialogs. There must be more to it than just the stack. If LC is calling out to the OS then that would explain why the remote works there but not otherwise.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Android 9 TV Box: acting on remote control
Well, we have already been this far actually...kideveloper11 wrote: ↑Fri Mar 22, 2024 1:29 pmOn an Android 9 TV Box, commands from a TV remote control can be intercepted by using the mobile control message in LiveCode.
Re: Android 9 TV Box: acting on remote control
Not even a mention of using accelerometer to catch TV remote messages. Perhaps*this time* it really is genuine
Re: Android 9 TV Box: acting on remote control
I've checked the user, he/she already made some vaild postings a long time ago.
But I might repeat myself, I have an eye on everything here!
But I might repeat myself, I have an eye on everything here!