Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portrait screen orientation is not locked properly on Android 8.1 #23083

Closed
andrej-kuznetsov opened this issue Jan 20, 2019 · 5 comments
Closed
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@andrej-kuznetsov
Copy link

andrej-kuznetsov commented Jan 20, 2019

Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
      Memory: 393.55 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.12.0 - /usr/local/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 23, 25, 26, 27, 28
        Build Tools: 26.0.2, 26.0.3, 27.0.3, 28.0.2
        System Images: android-24 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3 
      react-native: 0.57.8 => 0.57.8 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Description

Preconditions:

  1. You must have android device with 27 API
  2. I created new App via react-native init appName
  3. Added this option in my AndroidManifest.xml to .MainActivity android:screenOrientation="portrait"
  4. Added button with some deeplink
    Linking.openURL('https://www.google.com/maps/dir/api=1&travelmode=driving&origin=10,11&destination=12,11');

Steps:

  1. Rotate phone in landscape
  2. Open a new app with deeplink
  3. Go back to your app

Actual result: 3 rotations before we will see proper portrait screen orientation.
Expected result: one rotation directly in portrait screen orientation without others.

Repo with this bug: https://github.com/andrej-kuznetsov/screenRotationRNBug

Reproducible Demo

Follow above instructions or this video: https://drive.google.com/open?id=1Y989iGoFLu4PZUcKvuBSiS4Wiwv_At1p

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The "⏪Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@andrej-kuznetsov andrej-kuznetsov changed the title Portrait screen orientation is not locked properly on Android 8 Portrait screen orientation is not locked properly on Android 8.1 Jan 22, 2019
@hramos hramos removed the Bug Report label Feb 6, 2019
@eXist-FraGGer
Copy link

eXist-FraGGer commented Feb 15, 2019

I have this issue.

  React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
      Memory: 90.45 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 6.7.0 - ~/.nvm/versions/node/v10.15.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        Build Tools: 23.0.1, 23.0.2, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.3
        API Levels: 16, 21, 22, 23, 24, 25, 26, 27
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5264788
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      @types/react: ^16.8.3 => 16.8.3 
      @types/react-native: ^0.57.36 => 0.57.36 
      react: 16.8.2 => 16.8.2 
      react-native: 0.57.8 => 0.57.8 
ext {
    compileSdkVersion   = 27
    targetSdkVersion    = 26
    buildToolsVersion   = "27.0.3"
    supportLibVersion   = "27.1.1"
    googlePlayServicesVersion = "11.8.0"
    androidMapsUtilsVersion = "0.5+"
}

@eXist-FraGGer
Copy link

Have upgraded react-native and still have this issue:

  React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
      Memory: 64.19 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 6.8.0 - ~/.nvm/versions/node/v10.15.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        Build Tools: 23.0.1, 23.0.2, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.3
        API Levels: 16, 21, 22, 23, 24, 25, 26, 27
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5264788
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      @types/react: ^16.8.3 => 16.8.3 
      @types/react-native: ^0.57.36 => 0.57.36 
      react: 16.8.2 => 16.8.2 
      react-native: 0.58.5 => 0.58.5 

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 19, 2019

I've followed the exacts same step as the video and the bug doesn't occur on my side so we'll close this issue.

Tested on android 8.0, with your repro folder.
If you manage to submit another repro that would be broken on both side, we'll be happy to open this again.

@Titozzz Titozzz closed this as completed Mar 19, 2019
@eXist-FraGGer
Copy link

I've followed the exacts same step as the video and the bug doesn't occur on my side so we'll close this issue.

Tested on android 8.0, with your repro folder.
If you manage to submit another repro that would be broken on both side, we'll be happy to open this again.

In the title of this issue - "... on Android 8.1"

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants