sumup / sumup-android-sdk

Sample App for the SumUp Android SDK
Other
105 stars 28 forks source link

Screen rotates on plugin initialisation #90

Open larssn opened 5 years ago

larssn commented 5 years ago

Whenever we call openLoginActivity, SumUp forces portrait orientation, which is inconvenient for our users, especially if it's lying flat on a table. They're forced to pick the tablet up and wiggle it a bit, to get it back in to landscape.

Please consider fixing this. It's a pretty old issue at this point, but I can only see https://github.com/sumup/sumup-android-sdk/issues/72 which is about the payment flow.

Thanks.

AlexandrMaystruk commented 4 years ago

You can change screen orientation settings in your manifest file. Just override the library manifest in your project. Add this code to app manifest file and will be ok: 62034248-548b5780-b1f6-11e9-8d21-a01a14b0a3e1 You must do this for all SumUp activities.

larssn commented 4 years ago

Thanks, we need to support both orientations though.

AlexandrMaystruk commented 4 years ago

Just change in the manifest to android:screenOrientation="sensor"

GreenGI commented 4 years ago

This works great for the login activity. What activity would one need to change for the payment screen to have the landscape orientation?

Bas94 commented 4 years ago

I think I found all of them and so I want to share it. Here is the needed configuration, just put your needed screenOrientation:

<activity android:name="com.sumup.merchant.ui.Activities.BtTroubleshootingActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.ui.Activities.CheckoutAPIDrivenPageActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.ui.Activities.DashboardActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.ui.Activities.LoginActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.ui.Activities.PaymentSettingsActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.ui.Activities.PinPlusSetupActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.ui.Activities.ResendReceiptActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.ui.Activities.SendSmsActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.ui.Activities.SumUpBaseActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.ui.Activities.TransactionStateActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.api.LoadSumUpPaymentsActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
<activity android:name="com.sumup.merchant.api.LoadSumUpPaymentSettingsActivity"
  android:screenOrientation="sensorLandscape"
  tools:node="replace"
  tools:replace="android:screenOrientation"/>
MarcusWolschon commented 4 years ago

Sounds like a great workaround until SUMUP gets around to no longer force the orientation in it's SDK Manifest.xml .

milenpav commented 3 years ago

Working on Version 3.2.2 what is in Version 3.3.1