Detect phone type (CocoonJS)

Get help using Construct 2

Post » Thu May 09, 2013 3:04 pm

I am exporting my game for CocoonJS and compiling in the cloud with the Cocoonjs Cloud Compiler.

Is there anyway within C2 to detect if it is IOS or Android?

I'm going to load an advert for another game on the store, but obviously the link to the game will vary depending on the device type

Any ideas?
B
11
S
2
G
3
Posts: 95
Reputation: 3,028

Post » Fri May 10, 2013 2:02 am

Use "Browser" plugin it could get OS expession, i tested with iPod and iPhone, they returned "ipod" and "iphone"
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Fri May 10, 2013 11:30 am

@joannesalfa Which Browser property do you use? I couldnt find OS Expression, I tried Browser.Platform but it just returns "" when running in cocoonjs launcher
B
11
S
2
G
3
Posts: 95
Reputation: 3,028

Post » Sat May 11, 2013 12:17 am

Yes, it's platform, i'm sorry for not clearing like that.

If is "", maybe you did it wrong, make sure to set text in proper way.

I tested in Android with cocoonjs, it could return as Linux or something.



There no way to detect Phone type from android, except iOS does.Joannesalfa2013-05-11 00:18:34
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642


Return to How do I....?

Who is online

Users browsing this forum: gregorysforster, Yahoo [Bot] and 17 guests