New Intel XDK Crosswalk (lock orientation)

Get help using Construct 2

Post » Thu Dec 26, 2013 5:30 pm

Hey everyone!

I hope your Christmas went very well.

The new Crosswalk export is very promising. It runs flawless for my app, however I can not figure out how to lock portrait orientation. Has anyone found out how?

Thank youGameThirsty2013-12-26 17:31:02
B
18
S
6
Posts: 348
Reputation: 2,633

Post » Thu Dec 26, 2013 7:53 pm

Scirra didn't implement complete Screen orientation API because he was aware about current mobile devices don't support this API yet.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Fri Dec 27, 2013 2:39 am

@Joannesalfa

Thanks for the heads up.

I been looking into Intel's documentation for locking the screen in one of the modes. They have one line of JavaScript code that locks it to one orientation.

Maybe the JavaScript execute plugin will work with this?

I have yet to give that a try.
B
18
S
6
Posts: 348
Reputation: 2,633

Post » Fri Dec 27, 2013 2:40 am

Would you link to this page here please?
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Fri Dec 27, 2013 2:53 am

I can not find/ forget the exact link, however I do have the source code:

//lock orientation
intel.xdk.device.setRotateOrientation("portrait");
intel.xdk.device.setAutoRotate(false);


Maybe this can be executed inside the external JS plugin?
B
18
S
6
Posts: 348
Reputation: 2,633

Post » Fri Dec 27, 2013 3:10 pm

The crosswalk release is beta and does not support the intel.xdk api's so the orientation API's cannot be used. It will be added in a future release.

We are also investigating adding support for this API http://www.w3.org/TR/screen-orientation/ since C2 already knows how to use it.
Intel Corporation
B
15
S
3
Posts: 193
Reputation: 1,552

Post » Fri Dec 27, 2013 5:02 pm

Thank you for the heads up @IntelRobert, I love your open communication with the community.

I got another question, if you would like to answer. Currently, using the Crosswalk beta - the device still displays the Android toolbar, are you aiming to remove this and make the app display full screen?

Some app developers support the toolbar idea being displayed (like myself) for the sense of being able to still control your device and use the app at the same time is nice.

My suggestion is allow the apps to be displayed full screen, or allow the toolbar to be shown if this is possible?

Again, thank you for your open communication.
B
18
S
6
Posts: 348
Reputation: 2,633

Post » Sun Dec 29, 2013 12:38 am

@GameThirsty

We would not get rid of the status bar at the top--it would not make sense for non-game apps. However, Yongsheng is thinking if we can make it an option.
Intel Corporation
B
15
S
3
Posts: 193
Reputation: 1,552

Post » Sun Dec 29, 2013 4:18 am

@IntelRobert

That's good news!

I am not sure if you had seen, yet, another question of mine on the separate forum for Crosswalk, so I will address it here also.

Will you be adding notification system to Crosswalk?

IE: User 1 requests to be a friend with user 2 on an app. Once user 2 accepts the request that user 1 had sent, user 1 receives a notification on their toolbar notifying that user 2 did accept the request.GameThirsty2013-12-29 04:21:13
B
18
S
6
Posts: 348
Reputation: 2,633

Post » Mon Dec 30, 2013 1:48 am

@GameThristy and @IntelRobert: about full screen support, in the tools of crosswalk, it has been enabled but just cli. For XDK, since it integrates with Crosswalk without the packaging tool, it's necessary to add the flag to enable/disable fullscreen in XDK itself.

About the dynamical switch between full screen and tool bar, we're thinking how to support it. Maybe we could support fullscreen JavaScript API directly. I'll investigate it. thanks.
B
6
S
1
Posts: 48
Reputation: 545

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 12 guests