This question is locked. New answers and comments are not allowed.
How can I cause my app to obey the screen rotation user preference. I've set my phone to not rotate the screen when I rotate my phone, but my app does rotate and doesn't obey this settings.
any suggestions?
any suggestions?
5 Answers, 1 is accepted
0
Hello Idan,
You need to set the supported interface orientation for your app from the general Project Properties. After you build and deploy your app on devices, this setting should be respected with one exception - the AppBuilder companion app.
There is a known issue where the companion app does not support screen orientation lock.
Regards,
Iva Koevska
Telerik
You need to set the supported interface orientation for your app from the general Project Properties. After you build and deploy your app on devices, this setting should be respected with one exception - the AppBuilder companion app.
There is a known issue where the companion app does not support screen orientation lock.
Regards,
Iva Koevska
Telerik
Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!
0
Idan
Top achievements
Rank 1
answered on 06 Apr 2014, 12:08 PM
Hi Iva.
Thanks for replying, but I think you misunderstood me. I want to allow both portrait and landscape. However, the user can set in his device that he doesn't want any app on his device to rotate. Which means that the app should show the default (portrait or landscape) orientation and not change when the user rotate his device.
Thanks for replying, but I think you misunderstood me. I want to allow both portrait and landscape. However, the user can set in his device that he doesn't want any app on his device to rotate. Which means that the app should show the default (portrait or landscape) orientation and not change when the user rotate his device.
0
Hello Idan,
Please, accept my apologies for the misunderstanding.
We have tested this scenario and on iOS devices, the user preference for screen lock is respected.
On Android devices, however, we have been able to reproduce the issue and identify it. We have logged it into our bug tracking system and will introduce a fix for it in a future release.
Basically, what you need to do to enable your app to respect the user settings is to modify AndroidManifest.xml. In the activity element , you need to set screenOrientation to a desired value (unspecified, nosensor, user, or locked should do the trick - the behavior of each setting might differ from device to device though). You will have to rebuild your app for the changes to take effect.
Important: At this point, until we introduce the fix, this will not work. Your setting will always be overriden by sensor which will cause your app to always rotate.
Regards,
Iva Koevska
Telerik
Please, accept my apologies for the misunderstanding.
We have tested this scenario and on iOS devices, the user preference for screen lock is respected.
On Android devices, however, we have been able to reproduce the issue and identify it. We have logged it into our bug tracking system and will introduce a fix for it in a future release.
Basically, what you need to do to enable your app to respect the user settings is to modify AndroidManifest.xml. In the activity element , you need to set screenOrientation to a desired value (unspecified, nosensor, user, or locked should do the trick - the behavior of each setting might differ from device to device though). You will have to rebuild your app for the changes to take effect.
Important: At this point, until we introduce the fix, this will not work. Your setting will always be overriden by sensor which will cause your app to always rotate.
Regards,
Iva Koevska
Telerik
Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!
0
Aminullah
Top achievements
Rank 1
answered on 26 Jul 2016, 08:38 AM
Hi,
is there any fix for this issue ?
thanks,
0
Hi Aminullah,
A fix for this has been applied as now if you choose a specific orientation (portrait or landscape) from the Properties page, it is applied in the AndroidManifest.xml file.
Also, if you wish, you can add another specification to that file, like so:
and it will be respected after cloud build.
Regards,
Kaloyan
Telerik by Progress
A fix for this has been applied as now if you choose a specific orientation (portrait or landscape) from the Properties page, it is applied in the AndroidManifest.xml file.
Also, if you wish, you can add another specification to that file, like so:
<
application
android:label
=
"@string/app_name"
android:icon
=
"@drawable/icon"
android:hardwareAccelerated
=
"$AndroidHardwareAcceleration$"
>
<
activity
android:label
=
"@string/app_name"
android:name
=
".TelerikCallbackActivity"
android:configChanges
=
"orientation|keyboardHidden|keyboard|screenSize|locale"
android:launchMode
=
"singleTop"
android:theme
=
"@android:style/Theme.Black.NoTitleBar"
android:screenOrientation
=
"nosensor"
>
and it will be respected after cloud build.
Regards,
Kaloyan
Telerik by Progress
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.