3

How to handle permission dialog box during screen orientation in Android M devices?

In my case, after changing screen orientation, and clicking Okay button in permission dialog box crashes the app.

naXa stands with Ukraine
  • 30,969
  • 16
  • 175
  • 237
Sudhir Sinha
  • 553
  • 6
  • 17

1 Answers1

1

My workaround for this situation: Once permission dialog box is coming, I am locking up the screen to its current orientation (portrait/landscape). When user presses the button, I am unlocking the screen.

For Locking/unlocking the orientation, refer the link: Android: Temporarily disable orientation changes in an Activity

Community
  • 1
  • 1
Sudhir Sinha
  • 553
  • 6
  • 17