Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Detecting FireTV, stick, etc... — Gideros Forum

Detecting FireTV, stick, etc...

SinisterSoftSinisterSoft Maintainer
edited February 2015 in General questions
Here is code to detect what machine you are on and set some globals so you know if to start facebook, cut bits out because the machine is too slow, etc...
local sub=string.sub
 
device={application:getDeviceInfo()}
--print(device[2])
--print(device[3])
--print(device[4])
if device[1]=="Windows" or device[1]=="Mac OS" then
	pc=true
elseif device[1]=="Android" then
	android=true
	if device[3]=="Amazon" then
		kindle=true
		if sub(device[4],1,3)=="AFT" then
			tv=true
			if device[4]=="AFTM" then
				slow=true
			end
		end
	elseif device[3]=="OUYA" then
		ouya=true
		tv=true
		slow=true
	elseif device[3]=="Geniatech" then
		tv=true
		if sub(device[4],1,9)=="GameStick" then
			gamestick=true
			slow=true
		end
	elseif device[3]=="HardKernel Co., Ltd." then
		tv=true
		hardkernel=true
		if device[4]=="ODROIDC" then
			odroidc=true
		end
	end
elseif device[1]=="iOS" then
	ios=true
end
If you know of any other device id [3] and [4] of slow (eg like an mk802 v1 or 2) Android devices then please add them in this thread.

Likes: talis, pie

Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
https://deluxepixel.com
+1 -1 (+2 / -0 )Share on Facebook

Comments

Sign In or Register to comment.