[SOLVED] Tablet Profile problem

Answered Closed
0
0

I have 2 profile on forms , desktop profile and phone profile , I want , when I open my app with any tablet , app open with phone profile , so I want tablet or phone open with phone profile , if is it desktop  open with desktop profile

How can ı do this ?

 

Thanks

  • You must to post comments
Best Answer
0
0

Look at the user agent returned by the device using Application.UserAgent. Looks like some Huawie devices return a user agent without “Mobile” in it: See https://github.com/faisalman/ua-parser-js/issues/351

See if there is “MediaPad” or “HUAWEI”. You can add multiple options to the “userAgent” regex:

“userAgent”: “(Mobile|MediaPad|HUAWEI)”

 

  • You must to post comments
0
0

Use this ClientProfiles.json put in your project and set “Copy to Output Directory” to “Copy always”. It must be in /bin.

{
 "profiles": [
 {
   "name": "Phone",
   "userAgent": "mobile"
 }
 ]
}

 

  • HSoft
    • HSoft
    • Dec 5, 2019 - 4:01 pm
    Hi luca I tested google crome developer device thats all ok , but when I tested on real device (Huawie T5 Tablet) phone profile does’nt work , app open with desktop profile. How can I do this problem ? Thanks
  • You must to post comments
Showing 2 results