tns run android enables auto rotate on device
See original GitHub issueTell us about the problem
When installing an app using tns run android , auto rotate of device is turned on every time.
Which platform(s) does your issue occur on?
Android (iOS not tested)
Please provide the following version numbers that your issue occurs with:
- CLI: 3.0.3
- Cross-platform modules: (check the ‘version’ attribute in the
node_modules/tns-core-modules/package.jsonfile in your project) - Runtime(s): android
Please tell us how to recreate the issue in as much detail as possible.
- Open powershell(windows)
- do
tns create appName cdto directory- turn off auto rotate on android device
tns run android
this turns auto rotate on.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15 (10 by maintainers)
Top Results From Across the Web
How to automatically rotate your screen - Google Support
Open your device's Settings app Settings app . · Select Accessibility. · Select Auto-rotate screen.
Read more >Application enables orientation change button is status bar
I have no troubles with orientation changing. · Alright, just that when I added the package to my app and with the sample...
Read more >Android: How To Turn On Screen Rotation (Three Methods)
Today we will be talking about how to allow screen rotation on your Android device so that you can rotate your screen for...
Read more >How to control the screen rotation on an Android device
Information · Go to 'Device'> 'Display' · Uncheck 'Allow Screen Rotation' (on by default) · Select the desired screen rotation at the field...
Read more >How to Fix Auto Rotate Not Working on Android
If you've enabled the automatic screen rotation option from your phone's Quick Settings menu, try turning on that option from the Settings app ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Based on popular vote: removing
monkeyfrom implementation and replacing it withamtool.@Plamen5kov I don’t like the idea of forcing device rotation manually, for one, you may have to know of the original state, to be able to do it properly, and I’ve also noticed that the
adb monkeytool doesn’t always unlock automatic rotation.In order to determine which Activity to send a MAIN intent to using the Activity Manager (
adb am), we could do a package dump, and grep the Activity Resolver Table. For an application with a single activity it looks like this:If I executed
adb shell pm dump org.nativescript.volunteerupapp | grep -A 1 MAINI would end up with just this, which is fairly parseable:There is an alternative to using pm dump to get the Activity Resolver table, and that’s using
cmd package resolve-activity --brief org.nativescript.volunteerupapp, which unfortunately appears to be unavailable on devices API 24 or lower. Following is the result when the command is executed: