cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GeekAlf_Pro
Helper V
Helper V

How to test if app running on computer or device

Hi,

 

i've remarked that it could have different behaviours between Computers and Devices.

do you know if there is a way to test it ?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @GeekAlf_Pro 

The easiest way to do this is to check for the presence of an accelerometer or an altitude reading using formula such as this:

(Acceleration.X > 0 Or Location.Altitude > 0)

A computer will generally return 0, whereas a mobile device will return a positive reading.

 

 

View solution in original post

3 REPLIES 3
timl
Super User
Super User

Hi @GeekAlf_Pro 

The easiest way to do this is to check for the presence of an accelerometer or an altitude reading using formula such as this:

(Acceleration.X > 0 Or Location.Altitude > 0)

A computer will generally return 0, whereas a mobile device will return a positive reading.

 

 

Excellent !

 

very smart !

thanks @timl 

 

have a good day

Thanks @GeekAlf_Pro - have a good day too!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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