Re: [w3c/screen-orientation] Promise for unlock()? (#104)

Thanks @jjmax75 for following up. It's come up again in a [different issue](https://github.com/w3c/screen-orientation/issues/120) - hi @kenchris! could use your input here too.

>  On Android, unlock will get the app to ask the system to go back to its default orientation which the app doesn't know off hand. We should check whether this is easy to check but either way, there would be some reverse engineering of the Android system code to do in the UA which doesn't seem great.

Agree - we definitely don't want to go around poking at system code. However, we should check if since we first spec'ed this if the APIs have changed to provide a call back? 

@Johanna-hub, could you please research "Handling View Rotations" in iOS: 
https://developer.apple.com/documentation/uikit/uiviewcontroller

And, on Android, `setRequestedOrientation`:
https://developer.android.com/reference/android/app/Activity#setRequestedOrientation(int)

@mounirlamouri, I wonder if for unlock we could still just call: 

```
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
```

And just resolve the promise? The call at the Android level is synchronous anyway, by the looks of the documentation. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/screen-orientation/issues/104#issuecomment-458357991

Received on Tuesday, 29 January 2019 00:30:15 UTC