Trigger.io programmatically sets the orientation

Is there a way to programmatically set the orientation? The problem I am facing is a terrible launch image when the application loads in landscape orientation. This is true for iOS and Android. The image of my launch has a white background and when you hold (or simulate) a device in the landscape, you can see a black background filler.

Maybe I can limit the orientation to the portrait in the config ... and then after the launch is complete ... then allow (software installed) for both the landscape and the portrait? Or maybe let me set the launchimage fill color to something other than black (which looks great using the standard trigger trigger.io because it has a black background)? My current settings:

"launchimage": { "iphone": "img/320x480.png", "iphone-retina": "img/640x960.png", "ipad": "img/768x1004.png", "ipad-landscape": "img/1024x748.png", "android": "img/640x960.png", "android-landscape": "img/1024x748.png" }, 

The launch image (holding the device in the landscape) is similar to this image

enter image description here

+2
source share
3 answers

There is currently no Forge API for orientation software installation, but we have been asked about this before and have a ticket in our backlog that we have encountered.

I will report here when the API is available.

Update: now it is available in our platform version v1.4.13: http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-13

+2
source

It appears than a forced landscape, since only the available orientation in the application configuration conflicts with the expression display.orientation.forceLandscape (), which creates a portrait application (even if the success callback is triggered)

 [DEBUG] Native call "display.orientation_forceLandscape" with task.params: {} [DEBUG] Returning event: {"event":"internal.orientationChange","params":{"orientation":"portrait"}} 

If I omit "display.orientation.forceLandscape ()", everything works fine.

Hope this helps

0
source

The reason for this is a reduction in the image scale due to the pixel / pixel density ratio of the device.

Example: Samsung Galaxy Nexus has a pixel ratio of 2 ( Source ). If you want to get a full-width image in landscape mode (1280 x 720 pixels), you need an image with a width of at least 2560 pixels.

By the way: from the platform version v1.4.21 you can change the background color of the Android launch images in the configuration.

0
source

All Articles