Systeminfo on Android/CocoonJS

Get help using Construct 2

Post » Thu Nov 22, 2012 11:50 am

Is it possible to get the systeminfo on what android version is used on android/cocoonjs-exports?

I wanna turn smoke off automatically if the game is started on android 2.x to keep fps up (turned on on android 4.x).

Is that some how possible right now?
B
32
S
9
G
3
Posts: 204
Reputation: 7,787

Post » Fri Nov 23, 2012 10:25 am

Hi macpk, in JS we define the "navigator.userAgent" property with all the info we have about the operating system. Not sure how you would access that from Construct, though...
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Fri Nov 23, 2012 12:54 pm

Thx for the answer, but yes I my question was focused on how to do this within construct2 ;-)
B
32
S
9
G
3
Posts: 204
Reputation: 7,787

Post » Fri Nov 23, 2012 2:44 pm

Look up the browser object in the manual. It also has a user agent reference point. I think it's browser.useragent or browser.vendor something like that.
B
69
S
21
G
15
Posts: 701
Reputation: 15,629

Post » Fri Nov 23, 2012 5:28 pm

This is very interesting. So how could we use the Cocoon extensions from Ludei's site with the browser object?

ie. Application "quit" control

For calling a boolean in Cocoon:
CocoonJS.App.setAppShouldFinishCallback(FUNCTION_THAT_RETURNS_A_BOOLEAN)

If it returns true then:
CocoonJS.App.forceToFinish

B
31
S
6
G
4
Posts: 160
Reputation: 5,998


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 29 guests