=================================
=================================
=================================
출처: https://forums.adobe.com/message/6620407#6620407
Hello guys,
I'm developing and Android application using the Flex 4.6 SDK version and AIR 4.0 SDK. The tasks I'm concerned about are starting after the os boots up and being a full screen application.
The application has the following manifest parameters (among others):
<aspectRatio>landscape</aspectRatio>
<autoOrients>true</autoOrients>
<fullScreen>true</fullScreen>
and:
<application android:enabled="true">
<activity android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</activity>
</application>
So as you may see, the configuration is intended to launch the application as the HOME app, in landscape mode as soon as the device starts.
The application does in fact do everything it's supposed to but when the device boots up, the app does not starts in full screen because you can see the notification/status bar. Next you may see the problem.
What I need to do is to make the app start at full screen when the device boots. Now, the only way to make it start at full screen mode is to restart the application after the device finished booting up.
I must add that I also compiled the app using the AIR 14 SDK but the problem was still there. Sometimes the status bar appears and sometimes it doesn't. I thought it had something to do with the WIFI network connection but it doesn't, since on both cases, as soon as the application, if it has inmediate network connection or if it doesn't, the status bar will sometimes appear and sometimes not appear.
I hope you can help me solve this anoying problem.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Manifest
<fullScreen>false</fullScreen>
RootApp.mxml
/**
* Forces application to be in full-screen mode when it is added to stage.
*/
protected function addedToStageHandler(event:Event):void
{
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
}
This solved the problem. Sadly the splash screen isn't in full-screen mode so there is a very abrupt change when the app sets itself to full-screen. Even though it's not the more elegant solution and not what I would have wanted to use (solve the tag issue please), I'm sticking to this for now.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Someone on the APACHE FLEX forum (link to discussion) adviced to remove the tag from the manifest and handle the issue inside my code. The result is the following:
Manifest
<fullScreen>false</fullScreen>
RootApp.mxml
/**
* Forces application to be in full-screen mode when it is added to stage.
*/
protected function addedToStageHandler(event:Event):void
{
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
}
This solved the problem. Sadly the splash screen isn't in full-screen mode so there is a very abrupt change when the app sets itself to full-screen. Even though it's not the more elegant solution and not what I would have wanted to use (solve the tag issue please), I'm sticking to this for now.
=================================
=================================
=================================
출처: https://forums.adobe.com/message/6621473
=================================
=================================
=================================
댓글 영역