Liferay DXP 2026.Q4    |    Release Webinar: 18 November 2026    |    Replay coming soon! 

Blogs

Device detection in Liferay

Julio Camarero
Julio Camarero
أقل من قراءة دقيقة

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
نوفمبر ٢٠, ٢٠٢٦
Tony Lim
نوفمبر ١٩, ٢٠٢٦