I want the Confluence desktop UI on tablets but the mobile UI on phones

Is this possible without recompiling com.atlassian.confluence.plugins.mobile.MobileUtils ?

I'm looking at this code in particular:

private static final Pattern MOBILE_USER_AGENT_REGEX = Pattern.compile("(iPhone;|iPad;|iPhone Simulator;|iPod;|Linux; U; Android)");
  private static final Pattern ANDROID_CHROME = Pattern.compile("Chrome/[.\\d]* Mobile");
  private static final Pattern OLD_ANDROID = Pattern.compile("Linux; U; Android (?:[23]\\.\\d|4\\.0\\.[12])");


  public static boolean isSupportedUserAgent(HttpServletRequest request)
    String userAgent = request.getHeader("user-agent");

    return (StringUtils.isNotBlank(userAgent)) && (!OLD_ANDROID.matcher(userAgent).find()) && ((MOBILE_USER_AGENT_REGEX.matcher(userAgent).find()) || (ANDROID_CHROME.matcher(userAgent).find()));

1 answer

This is exactly what we'd like to do as well.

We had display problems when viewing our site on a mobile device, for example unable to show images and some macros would not display the content, but found by *disabling* the Confluence Mobile plugin, it now displays perfectly on IOS devices, but is now squished in the top-left corner on Android devices.

If you found any solution or workarounds, please can you share?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

355 views 20 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you