• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Android TV export

bluetrack

Member
Hi,

Does the new mobile export module also compile for android tv (or do you plan to support it)? That would be great.

Thanks.
 

Underground

Member
It is setup the same way as the normal android module.
Russell
Hi Russell, I´m trying to test AndroidTV export, and I'm getting this error on the emulator:
Capture.png

My settings for android are:
Build tools : 25.0.2
Support library: 25.0.0
Target SDK: 25
Min SDK: tryed with 9, 12,16, and 25
Compile SDK: 25
Architecture: x86 (as the emulator CPU is Atom x86)

Always get same error, both in test mode and with final build apk.
What I'm doing wrong? I'm missing some setup perhaps?

Thanks,
Regards,
Fran
 

rwkay

GameMaker Staff
GameMaker Dev.
which runtime version are you on??? This should be fixed in the latest 2.0.5.49

Russell
 

rwkay

GameMaker Staff
GameMaker Dev.
Looks like I have messed up the compilation settings for the Android build - I have corrected them internally and I will test it out in the morning with the final build, I will let you know how it goes and there may be a runtime update to fix this in the near future

Russell
 

Underground

Member
Looks like I have messed up the compilation settings for the Android build - I have corrected them internally and I will test it out in the morning with the final build, I will let you know how it goes and there may be a runtime update to fix this in the near future

Russell
Thanks Russell.
I'll be watching for the result of your tests.

Regards,
Fran
 

bluetrack

Member
Russel, any new on this? Hope this is fixed soon. Your initial confirmation that it works on Android TV was the reason i immediately bought the mobile module.

Thanks in advance for looking into this.
 

bluetrack

Member
Russel, any new on this? Hope this is fixed soon. Your initial confirmation that it works on Android TV was the reason i immediately bought the mobile module.

Thanks in advance for looking into this.
It has already been a month and no news about this... What is happening? Can someone please give a responsible reply? Russel?
 

bluetrack

Member
That is great! Thanks!I just tried it out and it does work. :)

Now one question: is there an os_type for Android TV? For instance i check if the os_type is android and then disable the keyboard and show the onscreen keys. For a TV of course this is not usefull since it is not a touchscreen and the onscreen keys should not be used. Any clues?

Second question: How do we get about making the app appear in the AndroidTV app shortcuts once installed?

Thanks.


edit: added second question.
 
Last edited:

Underground

Member
Now one question: is there an os_type for Android TV? For instance i check if the os_type is android and then disable the keyboard and show the onscreen keys. For a TV of course this is not usefull since it is not a touchscreen and the onscreen keys should not be used. Any clues?
I think there is no way to detect this (at least by GMS2 functions).

Second question: How do we get about making the app appear in the AndroidTV app shortcuts once installed?
Seems that there should be a checkbox on the android options to select Android TV exports (some like the OUYA package option in GM:S 1.x), that enables a new image for the Android TV frontend, and set up the required options on the manifest.
Searching on GMS2 folders I found that there is a AndroidTV options along with the others export modules options, but on the IDE isn't shown this option.... a bug perhaps?

Well, I managed to make a game appear on the Games section on my Android TV device (and on emulator too). Surely there should be a better way, but I couldn't find it yet)

- Make a backup of the base AndroidManifest.xml located inside on programdata/gamemakerstudio2/cache/runtimes/"runtime you are using to compile"/android/runner/projectfiles/src/main/
- Edit the AndroidManifest.xml and include the neccesary options to AndroidTV devices. Now my manifest looks this way:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="${YYAndroidPackageName}" android:versionCode="${YYAndroidVersionCode}" android:versionName="${YYAndroidMajorVersion}.${YYAndroidMinorVersion}.${YYAndroidBuildVersion}" android:installLocation="${YYAndroidInstallLocation}" xmlns:tools="http://schemas.android.com/tools"
android:allowBackup="false"
>

<!-- This is the androidmanifest.xml used as the basis for building game .apk's from Studio -->

<!-- uses here -->
${YYAndroidManifestPermission}

${YYAndroidManifestManifestInject}

<!-- <uses-feature android:glEsVersion="0x00020000" android:required="true" /> -->
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />

<!-- EXTRA FOR ANDROID TV next 2 lines are added for AndroidTV-->
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>
<uses-feature android:name="android.software.leanback" android:required="false"/>

<!-- <uses-sdk android:minSdkVersion="${YYAndroidMinSDKVersion}" android:targetSdkVersion="${YYAndroidTargetSDKVersion}"/> -->

<supports-screens android:resizeable="true" android:largeScreens="true"/>

<!-- application -->
<!-- EXTRA FOR ANDROID TV in the next line android:banner="@drawable/banner" and android:isGame="true" are added -->
<application android:name="${YYAndroidPackageName}.RunnerApplication" android:label="@string/app_name" android:banner="@drawable/banner" android:isGame="true" android:icon="@drawable/icon" tools:replace="android:label">
<activity android:name="${YYAndroidPackageName}.RunnerActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:label="@string/app_name" android:launchMode="singleTop" android:alwaysRetainTaskState="true" android:configChanges="orientation|keyboardHidden|screenSize" tools:replace="android:label">
<intent-filter>

<!-- EXTRA FOR ANDROID TV next line is added in order AndroidTV to work -->
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>

<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
${YYAndroidExtraCategories}
</intent-filter>
${YYAndroidManifestActivityInject}
</activity>
<activity android:name="${YYAndroidPackageName}.RunnerPreferenceActivity" android:label="@string/menu_settings">
</activity>

<!-- services -->

${YYAndroidManifestServices}

${YYAndroidManifestApplicationInject}

<!-- activities here -->
${YYAndroidManifestActivities}

<!-- receivers here -->
${YYAndroidManifestReceivers}

<!-- This is XPeria Play specific, we have decided to make this standard though for all applications, just in case -->
<meta-data android:name="xperiaplayoptimized_content" android:resource="@string/xperiaplayoptimized_content" />
<meta-data android:name="game_display_name" android:resource="@string/app_name" />
<!-- <meta-data android:name="game_icon" android:resource="@drawable/icon" />
Removing due to following warning:
Resources referenced from the manifest cannot vary by configuration (except for version qualifiers, e.g. '-v21'.) Found variation in hdpi, ldpi, mdpi, xhdpi, xxhdpi, xxxhdpi
-->

<!-- meta-data here -->
${YYAndroidManifestMetadata}

</application>
</manifest>

- Next you have to provide the image for the game that you want to appear on the Games section on AndroidTV devices, this image is copied to programdata/gamemakerstudio2/cache/runtimes/"runtime you are using to compile"/android/runner/projectfiles/src/main/res/drawable and needs to be named as banner.jpg (320x180 pixels probably needs to have no alpha). If you want to give it a different name, you have to modifi it on the manifest section (android:banner="@drawable/banner").

- Now you can compile your project to AndroidTV. Set the appropiate Target, Min and Compile SDK on the Android options. I've tested with Target 25, Min 16, Compile 25, build tools 25.0.2 and support 25.0.0

- When you want to compile for non AndroidTV devices, exchange this manifest with the original one.

Hope this helps and waiting to YoyoGames make a better solution to this issue.
Regards,
Fran
 

rwkay

GameMaker Staff
GameMaker Dev.
I suspect that there will be info in the os_get_info() call that will help you identify an Android TV device... though I do not have anything setup at the moment to handle that.

Please file a bug with help desk and we will get the Android TV manifest and Images added to the standard android options.

Russell
 

Underground

Member
I suspect that there will be info in the os_get_info() call that will help you identify an Android TV device... though I do not have anything setup at the moment to handle that.
Thats would be great. I'll try this way to see if there is some data that could be used.

Please file a bug with help desk and we will get the Android TV manifest and Images added to the standard android options.
Russell
Just filed a ticket.

Regards,
Fran
 

Underground

Member
@rwkay @bluetrack

These are the values that os_get_info() gets from my AndroidTV device:

20170518_171839_resize.jpg

Sadly looks like there is nothing that we can use to identify a device as an AndroidTV with this function.

Regards,
Fran
 

Underground

Member
In the short term use a Configuration to create an Android TV version

Russell
@bluetrack
Also you can let the player choose to show touch controls or not.
Or as you are targeting androidTV, perhaps you may use gamepads to play and if a gamepad is detectec, then disable the touch controls or at least not show them on screen. This will also valid for phones and tablets that have gamepads connected.

Regards
Fran
 

bluetrack

Member
@bluetrack
Also you can let the player choose to show touch controls or not.
Or as you are targeting androidTV, perhaps you may use gamepads to play and if a gamepad is detectec, then disable the touch controls or at least not show them on screen. This will also valid for phones and tablets that have gamepads connected.

Regards
Fran
Thanks Fran, that's a great workaround for now. I will try it maybe this weekend and see what I can get around with. I will also test the os_get_info() command and see what i get for my AndroidTV. I will get back to you with my findings.
 
I

IVIauricius

Guest
I keep getting the error from post #6. I'm testing on the nVidia Shield. Is the update available for the Steam version or is it YoYo version only?
 

rwkay

GameMaker Staff
GameMaker Dev.
@lVlauricius - Ensure you are on the latest runtime (go to Preferences -> Runtimes -> Master)
 
I

IVIauricius

Guest
Whoops. I didn't notice this was for GMS2. I google'd and landed on this thread. :)
 
J

JRLS

Guest
@rwkay , is it possible to compile an .apk that will work on the Nvidia Shield TV?
I know this is 2.0 forum, but you seem to know a lot about it :)
Is this only fixed for 2.0, or will this also be fixed for 1.4 users?
(I'm using GMS 1.4)
 
Last edited by a moderator:

rwkay

GameMaker Staff
GameMaker Dev.
It will not be coming to 1.4 at all, we had an internal version of 1.x that worked with Android TV it will NOT be released to the public

Russell
 
S

Sam (Deleted User)

Guest
@rwkay are you not releasing it, simply because, you guys are trying to force more people into buying 2.x when they otherwise wouldn't need it? I understand you guys need to make a living, and I'm not against that. I was just wondering if that's why.
 

rwkay

GameMaker Staff
GameMaker Dev.
Android TV on 1.x is tied up in a few issues which needed 2.x to resolve so its not as simple as pushing everyone to get 2.x, needed some tooling and behind the scenes work which was just not going to happen in Delphi.

At least for the public

Russell
 
J

JRLS

Guest
we had an internal version of 1.x that worked with Android TV
So, it works in 1.4

needed some tooling and behind the scenes work which was just not going to happen in Delphi.
Now, you suggest it cannot work in 1.4

?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
It works in 1.4 because the devs hacked in a method to make it work. But it's a hacked in method and so can't be released to the public. There is no contradiction here... :)
 
J

JRLS

Guest
It can work in 1.4, but they don't want to release it, that's what i read into it...
Also, i read somewhere that pregradle GM:S build can build .apk what the shield will load. Not sure about that...
 
Last edited by a moderator:
J

JRLS

Guest
Ok, hear this @rwkay and @Nocturne :

i just installed gamemaker studio 1.4.1657 on my PC (pre gradle build)
Installed all the normal SDK, platform tools, etc. The normal stuff.

I loaded up a game i made (which uses the normal gamepad functions btw), and compiled it to target "android" (in later versions of GM:S it's called "Android/Fire"), which built me an .apk file.

I sideloaded that .apk on my nvidia Shield TV pro, installed it, and voila! it works!
Even the nvidia shield gamepad works flawlessly!!
I'm f* playing my game right now on the shield TV.

On later version of GM:S (1.4.1763) it doesnt work anymore, so the functionality clearly was removed from 1.4


@Samuel Venable
are you not releasing it, simply because, you guys are trying to force more people into buying 2.x when they otherwise wouldn't need it? I understand you guys need to make a living, and I'm not against that. I was just wondering if that's why.
hmm..yes....me thinks too... :)
 
Last edited by a moderator:

rwkay

GameMaker Staff
GameMaker Dev.
Nice... that really makes me feel like helping you...

If you have found a version on which it works then fine... for gradle builds we had to do more work... which we did on GMS2 but are not doing on GMS1

Russell
 

Underground

Member
Ok, hear this @rwkay and @Nocturne :

i just installed gamemaker studio 1.4.1657 on my PC (pre gradle build)
Installed all the normal SDK, platform tools, etc. The normal stuff.

I loaded up a game i made (which uses the normal gamepad functions btw), and compiled it to target "android" (in later versions of GM:S it's called "Android/Fire"), which built me an .apk file.

I sideloaded that .apk on my nvidia Shield TV pro, installed it, and voila! it works!
Even the nvidia shield gamepad works flawlessly!!
I'm f* playing my game right now on the shield TV.
.......
But there is a problem. Google will reject any apk built with this GM:S release, because it uses an outdated libpng library (google said that there is a security issue with this version of libpng).
So I'm afraid that these builds will only be valid for testing purposes sadly.

Regards,
Fran
 
J

JRLS

Guest
It will not be coming to 1.4 at all, we had an internal version of 1.x that worked with Android TV it will NOT be released to the public
@rwkay , i proved you wrong, and all you can do is give me your last comment "...If you have found a version on which it works then fine..." ?
Man, that's kinda sad...
It already worked, and was already released, so it's not internal version and/or was not "hacked".
On later version of GM:S (1.4.1763) it doesn't work anymore, so the functionality clearly was removed from 1.4.
I think it's more like yoyogames not willing to also release it (again) in the last version of 1.4, instead of being a real technical problem that cannot be solved.

@Underground : yes, you're right. I'm using it for test purposes now, but just saying it CAN work, and it did. Too bad about the libpng...
 
Last edited by a moderator:

Underground

Member
@Underground : yes, you're right. I'm using it for test purposes now, but just saying it CAN work, and it did. Too bad about the libpng...
Oh, yes it works fine. In fact I'm using this release to build executables for the Razer Forge TV because Gradle versions launch "manifest merge" errors when using the OuyaSDK extension (required to publish for Cortex ForgeTV). Always thought that the problem was on the extension, but maybe it was on this issue with the android TV builds instead....
 
J

JRLS

Guest
rwkay said :
Nice... that really makes me feel like helping you...

If you have found a version on which it works then fine... for gradle builds we had to do more work... which we did on GMS2 but are not doing on GMS1

well, I upgraded to gamemaker studio 1.4.9999, and it works again! :)
I have build a couple of .apk, sideloaded it on the nvidia shield tv, and it works fine! Even controller works fine!
I also shows up now on the main screen! (which it doesnt with older versions).
It also works with gradle build!!!

Whohooo!
 
Last edited by a moderator:
Top