And there is a Tutorial/Blog post to go with it:
http://coronalabs.com/blog/2014/05/13/tutorial-amazon-fire-tv-controller-events/
Rob
And there is a Tutorial/Blog post to go with it:
http://coronalabs.com/blog/2014/05/13/tutorial-amazon-fire-tv-controller-events/
Rob
Thanks Rob!
My app was rejected by Amazon for not properly requesting and releasing audio focus on App start and suspend (as far as I can tell). Did anyone else have this problem or know how to get around it?
The only releasing of audio I did was the standard:
function scene:destroyScene( event ) audio.dispose( tapSound ); tapSound = nil; end
Are you audio files not disposed of when the app quits?
Thanks for the response GP - I did not dispose of my files when the app quits, I will try that. One other question while I have you -
Did you take any effort to treat the media play buttons differently? Do you dispose of your audio files on app suspend as well as app quit? (It seems that my app is supposed to just suspend when the home button is hit, and not quit)
Thanks again -
I actually didn’t reference the media play buttons at all. I actually just tied the same navigation actions to ‘Left’, ‘Back’ and ‘B’, and jump actions to ‘Select’, ‘Up’ and ‘A’ depending how you want to play and what controller/remote you have.
To leave the app, it sees which screen you’re on when you press the back button and then just exits.
if( keyName == 'left' ) or (keyName == "back") or ( keyName == 'b' )then if (storyboard.currentScene == "menu") then print("Time to go!") native.requestExit(); return true else if storyboard.isOverlay then storyboard.hideOverlay() return true else print("We're on the game screen") tapChannel = audio.play( tapSound4 ) storyboard.gotoScene("menu", "slideLeft", 600) return true end end end
GP, Thanks again for the insight – so you don’t do anything special when ‘home’ is hit? (You let the Fire TV ‘pause’ the app and go back to the menu?) I was expecting that they might be requesting that I dispose of my audio there, but that doesn’t make sense if you didn’t do it either.
I didn’t program anything for the Home button press. They did want me to support the Back button though, it got rejected once because of that. This was when I didn’t even own a FTV to test on, I had to keep emailing the .apk to a friend who would try to explain what was happening. Once I actually bought a FTV, I saw how I should have had 60 FPS in the config file and other small fixes, so it was a good purchase.
Thanks for info, again. I guess I’m just getting unlucky and the reviewers feel like rejecting my app. Unless Rob or anyone else has any insight I guess I’ll have to give up Fire TV development with Corona for the time being.
Have you asked Amazon for more details? Others don’t seem to be having the issue and we didn’t do anything special for the Fire TV.
Rob
Hi Rob,
Unfortunately I’ve only had contact with the same rep. I’ve tried to explain that other Corona apps haven’t had this problem and to get more details, but nada. Their original response even said that Unity was exempt from this requirement as it isn’t possible to do in that framework (!)
The text of their latest reply,
–
"By requesting audio focus, we refer to requestAudioFocus method created by the Android AudioManager class.
http://developer.android.com/training/managing-audio/audio-focus.html
It would also be to your benefit to handle loss of audio focus, since without explicitly requesting this launching your app will impede on apps that have already requested Audio focus, for instance a streaming music application could be playing in the background and with your app being started it would cause an issue with audio between streaming service and your app. Which would be the basis of the fail case. You would need to at least find a way to request audio focus in order to pass this particular test."
Hi,
We are creating one game using Amazon FireTv.We did almost functionality, remote control and key function.But we don’t know how to use Amazon Ad and Amazon GameCircle. So anybody used Amazon Ad and Amazon GameCircle, please help us as soon as possible .Thanks!
Hi,
We are creating one game for Amazon FireTv.We did almost functionality, remote control and key function.But we don’t know how to use Amazon Ad and Amazon GameCircle. So anybody used Amazon Ad and Amazon GameCircle in corona, please help us .Thanks!
@nicksantan, can you put together a sample that has this issue and file a bug report please? Engineering wants it please.
Make sure to include your build.settings, config.lua and all assets in a .zip file please. Use the “Report a bug” link at the top of the page.
Thanks,
Rob
Hi,
We are creating one game using Amazon FireTv.We did almost functionality, remote control and key function.But we don’t know how to use Amazon Ad and Amazon GameCircle. So anybody used Amazon Ad and Amazon GameCircle, please help us as soon as possible .Thanks!
Hi,
We are creating one game for Amazon FireTv.We did almost functionality, remote control and key function.But we don’t know how to use Amazon Ad and Amazon GameCircle. So anybody used Amazon Ad and Amazon GameCircle in corona, please help us .Thanks!
@nicksantan, can you put together a sample that has this issue and file a bug report please? Engineering wants it please.
Make sure to include your build.settings, config.lua and all assets in a .zip file please. Use the “Report a bug” link at the top of the page.
Thanks,
Rob
I just added this to the RGEasy lua file: if(onFTV) codes to allow gamepad A and B buttons to do select and back. (og and added codes for x and y is you need them). Unless you wanted them to do something else they are routed to the same as the “back” and “enter” buttons of the remote
codes[96] = ‘select’ --button A
codes[97] = ‘back’–button B
codes[99] = ‘x’ --button X
codes[100] = ‘y’–button Y
Hey Rob,
Thanks for providing the keycodes for this - it allowed me to get my app approved for the standard amazon controller when it previously hadn’t.
Excellent! Glad to help