Liferay DXP Free Tier    |    From download to running in minutes    |    Get started →

Blogs

Device detection in Liferay

Julio Camarero
Julio Camarero
読了時間: 1分未満

I have started playing with device detection when coding Liferay apps and I have found very useful the Device API in Liferay 6.1. 

 

This API allows you to detect the capabilities of the device which is accessing the portal (the size, operating system, if it has touch screen, camera, compass... etc) and then you make your apps behave different depending on the device. For example, you can add some behaviour only for iphones, or androids, only for small screens... 

 

I have just started a wiki page showing some examples on how to use this API, feel free to add more to this wiki page: http://www.liferay.com/community/wiki/-/wiki/Main/Device+detection+capabilities

 

There are many more things, specifically for the front end related with mobile development, but I will talk about those in another blog entry.

 

See you soon!

 

ページコメント
Hi Julio,

Thank you so much for putting up this article at the most appropriate time. We @mPowerGlobal are currently working on a major implementation where the application should intelligently detect the user agent of the client. We used "user agent api" which is hosted on google code. I feel the one provided by Liferay will come handy for this purpose. Keep up the good work.

Related Assets...

結果が見つかりません。

More Blog Entries...

Himanshu Chauhan
11月 20, 2026
Tony Lim
11月 19, 2026