private static boolean isMobile(){
HttpServletRequest request = ThreadContextHolder.getHttpRequest();
if(request==null) return false;
String user_agent = request.getHeader("user-agent");
if(StringUtil.isEmpty(user_agent)) return false;
String userAgent = user_agent.toLowerCase();
if(userAgent.contains("android" ) || userAgent.contains("iphone"))
{
return true;
}
return false; }