pwa-builder / PWABuilder

The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
https://docs.pwabuilder.com
Other
2.75k stars 285 forks source link

[BUG] Orientation is not changed by rotating device. #4200

Open Younghun-Jung opened 1 year ago

Younghun-Jung commented 1 year ago

What happened?

I tested PwaBuilder using Demo URL(https://webboard.app). After downloading package, I installed in Android device(Samsung Galaxy S22). Application is launched successfully but, orientation is not changed by rotation of device. I do not change any options before generating package.

How do we reproduce the behavior?

  1. Go to Demo URL site.
  2. Click 'Package For Stores'
  3. Click 'Generate Package' on Android.
  4. Download and unzip package.
  5. Install apk my Android device.
  6. Run the Webboard app and rotate my device,

What do you expect to happen?

On rotating device, orientation is changed.

What environment were you using?

Device: Galaxy S22(SM-S901N) OS: Android 13 Chrome: 115.0.5790.136

Additional context

No response

jgw96 commented 1 year ago

Weirdly enough, this seems to happen with any app generated with our android tool. Looking into this

jgw96 commented 1 year ago

Will look at this with Gleb after our next release next week.

AllanOliveiraM commented 1 year ago

In my app, rotation is forced to occur regardless of whether device rotation is enabled or not. Installing the PWA directly through the browser, this doesn't happen. I've already set the orientation in the manifest, added the meta tag, and adjusted some points via CSS, but I can't achieve the fix. Any suggestions?

jgw96 commented 1 year ago

@AllanOliveiraM We dont have resources to fix this issue at the moment, but please know this is still on our look-into list

suraj-kd-pro commented 3 weeks ago

@AllanOliveiraM We dont have resources to fix this issue at the moment, but please know this is still on our look-into list

is this fixed yet? or any work around?

lykapp commented 3 weeks ago

@AllanOliveiraM We dont have resources to fix this issue at the moment, but please know this is still on our look-into list

Did you get any fix for this...?

maiconcarraro commented 3 weeks ago

Based on my tests the orientation works fine depending on what you set in your manifest BEFORE generating the package, if you set orientation portrait it will never rotate, if you omit orientation thats going to be "default" and change based on user's movements.

Source code for this is at https://github.com/GoogleChrome/android-browser-helper/blob/653bfd2ff6836f4010ca966922aa10c38df9d020/androidbrowserhelper/src/main/java/com/google/androidbrowserhelper/trusted/LauncherActivityMetadata.java#L200-L225

lykapp commented 3 weeks ago

Based on my tests the orientation works fine depending on what you set in your manifest BEFORE generating the package, if you set orientation portrait it will never rotate, if you omit orientation thats going to be "default" and change based on user's movements.

source code for this is on android-browser-helper

Thanks @maiconcarraro we will check this.