SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Clients Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Clients Development This forum is for discussions relating to SageTV Open Source Clients Development.

Reply
 
Thread Tools Search this Thread Display Modes
  #401  
Old 11-03-2015, 12:42 AM
VCRUser VCRUser is offline
Sage Aficionado
 
Join Date: Jan 2008
Posts: 444
Quote:
Originally Posted by stuckless View Post
Can you take a screen shot. If this is the Tab from 2011, then it may just be that that the hardware/OS is going to be too old to work properly. The initial focus is getting a fully functional extender on just 1 or two devices, and then we can start troubleshooting specific devices.
Already uninstalled, so will need to find time to reinstall to get that screen shot if you think it will help. Yes, it's probably from 2011 or so; it runs Android 4.0 Ice Cream Sandwich. So it could just be too old. I've been thinking of getting a new phone (current one is 2012, running 4.1), so might wait to try on that.
__________________
Server: Windows 8.1 4gb RAM; 4TB SATA + others. Homebrew quad core AMD. Inputs: Haup. 980, 850 & 950Q on ATSC; Haup 1600 on ATSC & Comcast 2 DTAs with USBUIRT for NTSC. Haup 1800 on ATSC. HDHR Dual (ATSC). Sage 9.22 64 bit.
Reply With Quote
  #402  
Old 11-03-2015, 04:25 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by KarylFStein View Post
I wasn't going to mention this now, but what about context switching? For example if video is playing and you have a gamepad A to me should toggle Pause/Play with B as Back, (just based on the Android experience I have with the SHIELD and Galaxy Tab). It seems like input should not be a static mapping...
That goes beyond what a placeshifter would technically be able to do, as that - really - is managed on the server, and is not really client specific. As far as the server knows, a given command was received, so ti behaves as it is programmed to do. Changing that behavior could be done via a UI Mod - but that's not really the realm of this specific project.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #403  
Old 11-03-2015, 04:49 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by KarylFStein View Post
I wasn't going to mention this now, but what about context switching? For example if video is playing and you have a gamepad A to me should toggle Pause/Play with B as Back, (just based on the Android experience I have with the SHIELD and Galaxy Tab). It seems like input should not be a static mapping...
Quote:
Originally Posted by Fuzzy View Post
That goes beyond what a placeshifter would technically be able to do, as that - really - is managed on the server, and is not really client specific. As far as the server knows, a given command was received, so ti behaves as it is programmed to do. Changing that behavior could be done via a UI Mod - but that's not really the realm of this specific project.
Interestingly enough, I actually started out like that, but as fuzzy noted, it's a complex process. While I can tell if a video is playing or not, what I can't actually tell is if a SageTV dialog happens to be sitting on top of that video SO, if you are playing the video, then I can map keys to "video playback key" but then you get a sagetv dialog showing up, or you leave the video somehow and it's still playing in the preview window... basically the key mapping is all messed up. On the android client, we are just an "extender" for the screen that is rendered on the server, so, we don't actually know what is on the screen, what menu, etc.

In the end, the easiest thing will be to use a full featured remote with the AndroidTV, or bare with the limited set of controls on the dumb remotes.
Reply With Quote
  #404  
Old 11-03-2015, 04:55 AM
brewston brewston is offline
Sage Expert
 
Join Date: Apr 2006
Location: Surrey
Posts: 719
Quote:
Originally Posted by stuckless View Post
The OSD playback controls would be possible no matter which player is used. Keep in mind even when VLC is used, it is embedded, so as a developer you need to manage the OSD controls.

Sadly most android tv remotes are taking a page from apple and creating really dumbed down remoted It might be that we'll need to find a decent 3rd party remote with more buttons, which will likely provide a better experience on OSD controls.
I think finding a decent remote compatible with all Android TV boxes might be a challenge though, especially as they are bluetooth not IR

What do the ijkplayer OSD controls allow ?
__________________
Tecra M5, 2 x HD200, 2 x HD300
2 x PCTV 290e
Win 7, Sage 7.1.9, Phoenix 2 STV
Stephane's XMLTV Importer, Digiguide,
Reply With Quote
  #405  
Old 11-03-2015, 05:31 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by brewston View Post
I think finding a decent remote compatible with all Android TV boxes might be a challenge though, especially as they are bluetooth not IR

What do the ijkplayer OSD controls allow ?
Any player will allow you to render whatever you want above the video. For example in the phone/tablet version, I allow a left pull out drawer to be rendered above the video with some simple controls. For this purpose, it's an OSD.

I'm not saying that I wouldn't go down this path, but, personally, I'll be looking for a solution that allows me to use a normal remote first (since it's less work).

Rendering a second OSD (SageTV renders it's own OSD), would be confusing, in my mind, and I'd have to manage whether or not I'm handling the key presses for my OSD or if I'm sending them to SageTV. What key activates the OSD, because that key can only be used to active the OSD and nothing else, etc.

EDIT:
I wouldn't be apposed to needing a better remote, such, as this...
http://support-shield.nvidia.com/and...mote_Setup.htm
I just know know if you can map other buttons to events or if you are just limited to the basic few.

EDIT2:
I think someone may have posted this... Or I stumbled on it before.. not sure which... but I wonder if FLlirc could be used...
https://flirc.tv/more/flirc-usb

Last edited by stuckless; 11-03-2015 at 05:46 AM.
Reply With Quote
  #406  
Old 11-03-2015, 06:11 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
it's looks like harmony works out of box.
http://http://support-shield.nvidia....mote_Setup.htm

wondering if the smart hub works better even since it can control over lan.
Reply With Quote
  #407  
Old 11-03-2015, 06:14 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
looking further this implies the smart hub can control it over Bluetooth and that tv shield does have ir.

https://m.reddit.com/r/AndroidTV/com...ppear_to_have/
Reply With Quote
  #408  
Old 11-03-2015, 07:52 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by stuckless View Post
The short answer is yes... but I've only added support for a very small number of buttons. ie, I need to map them first in the App to a SageTV function, and then it should work.
Sean - Maybe this is an area where I can help out? Can you point me to where the mapping is done so I can take a look?
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #409  
Old 11-03-2015, 07:55 AM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
Last I remember there was some headache with the Harmony and SHIELD, (from a thread on their forums), but I think people were able to work around it. I use an older Harmony 890 Pro with my entertainment center as I don't like the button layout on the newer remote. It works fine with the SHIELD, although I usually use the gamepad with it.
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #410  
Old 11-03-2015, 07:55 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
Sean - Maybe this is an area where I can help out? Can you point me to where the mapping is done so I can take a look?
This file is where the Native Android Key presses are mapped to SageTV Keys.

https://github.com/OpenSageTV/sagetv...yListener.java

You can see the static MAP at the top of the file has the mappings that I've done.

It actually get a little complicated because you can't map both A and CENTER, because in some cases when a single key is pressed, Android will send both events ie, You might Map A and ENTER to to SageTV enter, and when the user presses A, Android sends A and ENTER events as 2 separate events, and if you handle both, then you end up sending 2 events to sagetv... this caused me some grief early on, before I realized what was happening

Last edited by stuckless; 11-03-2015 at 07:58 AM.
Reply With Quote
  #411  
Old 11-03-2015, 07:56 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
How doe miniclient send commands to sage? What does it actually send? Is it sending the sage command, or is it sending a discrete event/number/whatever that is then mapped in the .properties file via the Detailed Setup -> Commands menu?
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #412  
Old 11-03-2015, 08:01 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Ideally, the app should basically be passing any input event through as a raw key_code, or whatever identifying string, to sage, and if we need to, we can add the 'defaults' to the RemoteClients.properties file's ui/rc_mappings entries (this is how the extenders handle it, as far as I can tell).
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #413  
Old 11-03-2015, 08:52 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Fuzzy View Post
How doe miniclient send commands to sage? What does it actually send? Is it sending the sage command, or is it sending a discrete event/number/whatever that is then mapped in the .properties file via the Detailed Setup -> Commands menu?
Quote:
Originally Posted by Fuzzy View Post
Ideally, the app should basically be passing any input event through as a raw key_code, or whatever identifying string, to sage, and if we need to, we can add the 'defaults' to the RemoteClients.properties file's ui/rc_mappings entries (this is how the extenders handle it, as far as I can tell).
This class show the named key mappings. I'm sending actual Java AWT key codes to the SageTV.

https://github.com/OpenSageTV/sagetv...entRouter.java
Reply With Quote
  #414  
Old 11-03-2015, 09:09 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by stuckless View Post
This class show the named key mappings. I'm sending actual Java AWT key codes to the SageTV.

https://github.com/OpenSageTV/sagetv...entRouter.java
If that's the case, than anything should be mappable in the detailed setup screen, as long as the remote in question triggers android keypresses.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #415  
Old 11-03-2015, 09:16 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Fuzzy View Post
If that's the case, than anything should be mappable in the detailed setup screen, as long as the remote in question triggers android keypresses.
Yes, the "gap" comes from the fact that on the MiniClient, in the EventRouter we need to define ALL possible key Mappings as SageTVKey event objects.

Then in the MiniClientKeyListener, we need to MAP Native Android Keys to SageTV keys.

I've said from the beginning... all of this is possible, just a huge mapping excercise
Reply With Quote
  #416  
Old 11-03-2015, 09:44 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
So in an android app, a keypress doesn't automatically get handled by the foreground application unless it is specifically mapped to handle it? I was not suggesting doing any key mapping at the client level, and just sending the raw keystroke data to the server as a RC input event, and let the server's rc_mapping handle translating that to a sagetv command.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #417  
Old 11-03-2015, 10:10 AM
Jabroni's Avatar
Jabroni Jabroni is offline
Sage Aficionado
 
Join Date: Mar 2006
Posts: 251
Quote:
Originally Posted by KarylFStein View Post
Last I remember there was some headache with the Harmony and SHIELD, (from a thread on their forums), but I think people were able to work around it. I use an older Harmony 890 Pro with my entertainment center as I don't like the button layout on the newer remote. It works fine with the SHIELD, although I usually use the gamepad with it.
I was doing some tests yesterday with the Harmony Hub and the Nexus Player, seems that their implementation doesnt map all buttons rather than just the ones explicit on the Nexus Remote, so for example the key numbers arent mapped to anything at all (tested on Kodi with the Keymap Addon) Im starting to guess too that finding the correct controller would be a headache on the androidtv plataform. Maybe for now we could just work out with the SageTV Android Remote Control App to control this placeshitter
__________________
SageTV 7.1.9 / Phoenix
Captures: 1x Genpix Skywalker DVB4Sage / 1x 7500 Prof DVBS2 Tunner DVB4Sage / 1x HD HomeRun / 1x Slingbox M1 / 1x Colossus HD
Extender: 2x HD200 / 1x HD300

Reply With Quote
  #418  
Old 11-03-2015, 11:05 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Fuzzy View Post
So in an android app, a keypress doesn't automatically get handled by the foreground application unless it is specifically mapped to handle it? I was not suggesting doing any key mapping at the client level, and just sending the raw keystroke data to the server as a RC input event, and let the server's rc_mapping handle translating that to a sagetv command.
Key presses are handled by the foreground application, but I think you are assuming that and Android keypress code for the letter, "A", for example, is universally the same everywhere, which is not the case.

When you press a button your remote, that IR code gets sent to a pieces of hardware, in this case, Android device. The android unit would map that IR code to a Key Event (this happens at the kernel level). The Android App would get an Android Key Event for the Remote Key Event. I can't send that to SageTV, since SageTV needs to have the Key Event as a Java AWT Key Event, so I have to create a mapping table of ANDROID keys to SageTV keys.

I can Map Android NATIVE keys events to SageTV Key Events, or SageTV COmmands, even SageTV IR Codes... but in all cases, it has to be mapped.

In the case of using something like, FLIRC (which I ordered this morning), I'd actually have to Map the REMOTE key, and and Android Key in the remote software... and then in the App... I need to map the Android Key to the SageTV key.
Reply With Quote
  #419  
Old 11-03-2015, 11:32 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by Jabroni View Post
I was doing some tests yesterday with the Harmony Hub and the Nexus Player, seems that their implementation doesnt map all buttons rather than just the ones explicit on the Nexus Remote, so for example the key numbers arent mapped to anything at all (tested on Kodi with the Keymap Addon) Im starting to guess too that finding the correct controller would be a headache on the androidtv plataform. Maybe for now we could just work out with the SageTV Android Remote Control App to control this placeshitter
Again you can if you have a bluetooth capable harmony it appears they work great then. Using a phone/tablet as a remote is terrible look at the chromecast terrible.

https://forums.logitech.com/t5/Harmo...y/td-p/1337271
Reply With Quote
  #420  
Old 11-03-2015, 11:34 AM
jm9843 jm9843 is offline
Sage Aficionado
 
Join Date: Oct 2003
Posts: 288
Digging this back up from earlier in the thread. It should help in mapping

Android KeyEvent -> ASCII value == Java AWT Key Event

Flirc can be configured to emulate a keyboard such that any arbitrary remote signal will fire the appropriate Android KeyEvent (as programmed by the user in the Flirc software). So if all or enough designated keys are mapped in EventRouter.java, it should cover the commands that users would need.


Quote:
Originally Posted by jm9843 View Post
You'd win that bet. But it seems that you can derive the ASCII value with KeyEvent's getUnicodeChar method.

Code:
int asciiKey = event.getUnicodeChar(event.getMetaState());
Credit.

Last edited by jm9843; 11-03-2015 at 11:38 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Finally, a fully functional SageTV client on android and iphone! mkanet SageTV v7 Customizations 12 01-12-2013 12:22 AM
SageTV Placeshifter for Android nyle SageTV Placeshifter 5 12-31-2011 10:40 AM
Sage should get an android client running on this Deacon Crusher Hardware Support 1 09-29-2010 11:30 AM
Android client? equalize SageTV Placeshifter 1 07-22-2010 09:37 AM


All times are GMT -6. The time now is 06:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.