UP-3249 use mobile detect library to detect mobile devices #52

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@steveswinsburg
Member

This uses the mobile-detect library which is in Maven Central and based on MobileESP, to detect mobile devices, and optionally tablet devices, instead of the single list of user agents that are currently being used.

Detecting tablets is configurable via local.properties, defaults false as per current behaviour.

@edalquist
Member

Any documentation on how you actually configure this library? Is there a way to override what it detects as what? How do we keep the mapping up to date?

@steveswinsburg
Member

In local.properties you can add a setting to send tablets to the mobile view:

Mobile portal detection. Default false. Set to true to send tablet devices to the mobile portal view.

tabletsUseMobileView=false

There is no way to override what it detects, unless you sent a different user agent string, as it uses those and a bit of other logic to determine the device.

Mapping is synced to the MobileESP project, and this library is maintained by me. Sakai uses the same library.

@edalquist
Member

So there is no way to locally modify the user agent mappings? What if I want to disable mobile browser detection or have a custom "testing" user agent that triggers the mobile UI without standard user agents triggering it?

Sorry, just want to make sure we don't lose tricks that people are doing.

@steveswinsburg
Member

No way to locally modify them. But I could add in some logic that handles your use cases pretty easily, let me know what you need and how you have it at the moment.

@edalquist edalquist pushed a commit to edalquist/uPortal that referenced this pull request Jul 24, 2012
@jdlich jdlich Added icons to tabs and removed them from portlets #52 a297bfc
@edalquist edalquist pushed a commit to edalquist/uPortal that referenced this pull request Jul 24, 2012
@jdlich jdlich Moved tab styles from portlet content to dashboard #52 8784bb5
@edalquist edalquist pushed a commit to edalquist/uPortal that referenced this pull request Jul 24, 2012
@jdlich jdlich Use only the first word in the tab name for the icons class #52 009fab7
@edalquist edalquist pushed a commit to edalquist/uPortal that referenced this pull request Jul 24, 2012
@jdlich jdlich Added tab icons #52 f8ec1f0
@steveswinsburg
Member

Eric could you list the custom functionality you current have for working with the mobile view and I can make sure its incorporated here?

@edalquist
Member

I updated the Jira case with a more detailed review. Jen will also review
the case.

On Wed, Jul 25, 2012 at 10:42 PM, Steve Swinsburg <
reply@reply.github.com

wrote:

Eric could you list the custom functionality you current have for working
with the mobile view and I can make sure its incorporated here?


Reply to this email directly or view it on GitHub:
#52 (comment)

@edalquist edalquist closed this May 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment