Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Fire TV Owners - Please Read
Started by roaminggamer Apr 21 2014 11:17 AM

9 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Enterprise
  • PipPipPipPipPipPip
  • 641 posts
  • Jedi

Hi!  Do you have a Fire TV?  Do you know how side-load apps to your device?

 

If you said "Yes" to both of these questions, I need your help.

 

I have an app: HERE that will dump the key-codes for the basic FTV controller.

 

I need folks to do the following:

 

1. Download the app.

2. Install in on your FTV

3. Run it.

4. Press all of the buttons as shown (except home and microphone) at least three times.

5. Take a digital photo of your screen.

6. Post the image here.

 

 

Why do I need this?  Well, I want to make a small module to convert FTV key inputs to useful events for games and apps.  

 

When I get this done, I'll release it for free to the community as well as use it myself.

 

So, if you can please help.

 

I only need a few people to do this.

 

Thanks,

 

Ed

InputTest.jpg



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Enterprise
  • PipPipPipPipPipPip
  • 641 posts
  • Jedi

All,

 

I got the results I needed and will be writing up a small drop-in library to allow easy mapping of the 'standard' Fire TV controller.

 

If someone out there has the game controller for the Fire TV and wants to help me test the mapping for that, please write back here.

 

-Ed



[TOPIC: post.html]
#3

GP Animations

[GLOBAL: userInfoPane.html]
GP Animations
  • Pro
  • PipPipPipPipPipPip
  • 65 posts
  • Jedi


[TOPIC: post.html]
#4

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Pro
  • PipPipPipPipPipPip
  • 2,681 posts
  • Jedi

Wow! Congratulations to both! This is impressive. 



[TOPIC: post.html]
#5

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Enterprise
  • PipPipPipPipPipPip
  • 641 posts
  • Jedi

@All,

 

Hi again.  The 'library' is done and you can find it as well as an example (verify/ folder) of it here:

 

https://github.com/roaminggamer/RG_FreeStuff/tree/master/FireTVLib

 

 

I'll be doing a Fire TV game controller version when I get the time.

 

Cheers,

 

Ed



[TOPIC: post.html]
#6

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Corona Staff
  • 2,487 posts
  • Jedi

Corona actually provides an "event.keyName" which provides a consistent string key that you can use instead of using the native key code.  That is, we've already done the work for you to bind native key codes to a cross-platform string key.

   http://docs.coronalabs.com/api/event/key/keyName.html

 

This is supported on both Android and Windows.

 

I think Mac is the only platform where Corona does not provide consistent key names... which is on our to-do list to resolve later.

(Or perhaps Mac is the reason why you went out of your way to make your own key binding library?)



[TOPIC: post.html]
#7

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Enterprise
  • PipPipPipPipPipPip
  • 641 posts
  • Jedi

@All,

 

Joshua is completely right and I have made some small changes to the library to make them consistent with the keynames used by Corona.  However, I'm sticking with the native key codes because, I wanted to do something a little different from the normal onKey() processing.

 

  • My lib extends the default onKey() processing and doesn't override or replace it.
  • My lib makes a small change from onKey().  Instead of the phases: "up" and "down", I've remapped to the "began" and "ended".  I figured folks would be used to these as they are two of the the standard 'touch' phases.
  • My lib only listens for these FireTV keys: menu, back, mediaFastForward, mediaRewind, mediaPlayPause, left, right, up, down, select
  • My lib remaps these keys on Windows and OS X machines to produce FireTV input (like) events to enable FireTV app testing in the simulator:
    • m - menu
    • b - back
    • f - mediaFastForward
    • r - mediaRewind
    • p - mediaPlayPause
    • left - left 
    • right - right
    • up - up
    • down - down
    • s - select 

 

Note: If the above seems at all defensive, please don't think of it that way.  It's always hard to read tone in forums and what-not.  I am simply elaborating on the reasoning and differences between a standard onKey() approach vs. mine.  

 

Actually, Joshua guessed correctly.  OS X was the trouble maker for easy mapping and I borrowed from an old remapping lib of mine (RGEasyKeys) to make this lib.  Just goes to show the Corona staff are smart and can often guess why we developers do weird things.  :) 

 

On a last note, in addition to the keyName corrections, I've added a Composer Framework example that uses the Fire TV lib and touch inputs to navigate.

 

 

(First half of video is 'verify' app, second half is composer framework with Fire TV inputs, tested in simulator.)

 

Cheers!



[TOPIC: post.html]
#8

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Corona Staff
  • 2,487 posts
  • Jedi

Sounds good.  I often wrap a system's functionality with my own classes in case I need to do my own custom handling.  So, I think what you are doing is perfectly reasonable.  I just wanted to make sure you were aware of the functionality that Corona provided in case it could save you some work/time.



[TOPIC: post.html]
#9

prmobiapp

[GLOBAL: userInfoPane.html]
prmobiapp
  • Basic
  • PipPip
  • 26 posts
  • Member

Ed, Could you please share me the "Fire TV game controller version" key event for A, B, X and Y? If possible L1, L2, R1 and R2? Thanks!



[TOPIC: post.html]
#10

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Enterprise
  • PipPipPipPipPipPip
  • 641 posts
  • Jedi

Hi all.  I dropped the ball on this and need to finish it up.  

 

I went on vacation and the got really busy with client work when I returned.  

 

However, I will be bringing out some Fire TV games later this month and the work will get finished then.  I'll share when I have the module working.

 

-Ed




[topic_controls]
[/topic_controls]