web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Suggested Answer

Size of the device

(1) ShareShare
ReportReport
Posted on by 2

Hi!

I’m creating an app, and I need to determine the type of device the user is using because I want to allow the app’s use only on mobile devices or tablets.

Currently, I’m using screen.size, which provides four possible results (1, 2, 3, or 4) based on the screen size. However, there’s a challenge: both normal PCs and tablets can have a result of 4. Therefore, I’m unsure whether the user is using a tablet or a PC based on this result.

Does anyone have an alternative solution?

Thanks

I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    69,573 Most Valuable Professional on at
    The first problem with your solution is that Screen.size doesn't work in the emulator during testing. It will work when running the app in the actual mobile device. But I don't tend to find it an accurate way of knowing they are on a mobile device.  April Dunham has a video that shows how to use the Location (GPS) and Accelerator functionality of a mobile device to detect when its on mobile. Write in a Few Clicks, Not a Few Hours | Grammarly (youtube.com) 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard