question

dfinery avatar image
dfinery asked chanel Deactivated answered

Station 2018 orientation

Our existing app "Waiver Master" works great on pre-2018 station (and all other Clover devices). On a station, when "swiveled" to face a customer, orientation is properly changed to portrait. We have portrait in app manifest.
2018 Station, however is not behaving the same way. The view seems to be locked to landscape permanently, even if the app is launched while the station is in portrait.
Please advise.
Clover Station 2018
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

chanel avatar image
chanel Deactivated answered
Clover Station operates differently than other Clover devices. Screen orientation on Station is triggered by the swivel mount. It is not triggered by sensor orientation (it has no such sensors). Station is an oddball and all future Clover devices will operate in locked orientation mode.

If the original Station is supported by an app, it should not depend on the default screen rotation behavior of the device. Rather, call out the screen orientation mode explicitly in your manifest or code as described below. This will ensure proper operation on all Clover devices.

By default apps that run on locked orientation Clover devices (Mini, Mobile, Flex and Station 2018) will orient according to respective default orientation, and will not change with the sensed orientation. If an app wishes to support screen rotation or otherwise use a different orientation mode, they must call it out explicitly in their manifest using the screenOrientation activity attribute. For example:

<activity name="..."
  ...
  android:screenOrientation="sensor"
  ...
/>

Alternatively, screen orientation can also be set at runtime with the Activity.setRequestedOrientation() method:

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(...);
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
}
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community