Get window orientation

  • Since SDK: 20

Returns the orientation registered by the Viewer since the orientation provided by window.location does not work on all Android devices.

adobe.dps.store.getWindowOrientation

Parameter Type Description
callback

getWindowOrientationFunction

Function that will receive the proper orientation in a JSON object.

getWindowOrientationFunction

API Snippet

getWindowOrientation

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>getWindowOrientation API</title>
<script type="text/javascript">
window.onadobedpscontextloaded = loadPage;
function loadPage()
{
  // call into the getWindowOrientation API
  if (window.adobedpscontextloaded)
  {
    adobe.dps.store.getWindowOrientation(my_callback);
  }
}
</script>
</head>

<body>
</body>
</html>