cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Get device orientation

Hi,

 

I'm building an App for site inspection and the main goal is to automate the production of reports. So it is important that all photos are landscape. Is there a way to retrieve the device orientation to block the user to take portrait photos?

2 ACCEPTED SOLUTIONS

Accepted Solutions

There is no way to detect the device orientation, unfortunately.

View solution in original post

Maybe it's not needed for that particular case, we could just "calculate it" knowing and keeping the width and heigh updated. Something like this seems to work perfectly!

 

Orientation using responsive heigh-widthOrientation using responsive heigh-width

Just keep in mind that at this point this is only available using a preview environment, check this other post to set it up and start testing responsive design in powerapps!

View solution in original post

5 REPLIES 5
Advocate II
Advocate II

Nothing will ever stop a user from turning their phone upside down to take a picture, but you can lock the screen orientation in the app settings in the file menu.

Thanks for the quick reply.

 

My ideia was to collect the photo only if the position was set correctly and to set a textbox visible allerting the user, if it was not. The screen orientation is already locked.

There is no way to detect the device orientation, unfortunately.

View solution in original post

It would be very nice pushing back this idea now that resposive design is starting to become a reality since last preview release.

Maybe it's not needed for that particular case, we could just "calculate it" knowing and keeping the width and heigh updated. Something like this seems to work perfectly!

 

Orientation using responsive heigh-widthOrientation using responsive heigh-width

Just keep in mind that at this point this is only available using a preview environment, check this other post to set it up and start testing responsive design in powerapps!

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,825)