How to design responsive web page which works only on Mobile devices. If the request comes from other than Mobile devices then an error message should show

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Web page should only work for Mobile devices

Hi,

Can you please try to add the below code snippet in your appservice callback to check whether the device is mobile or other channels and do respective action:

var userAgent = kony.os.deviceInfo().userAgent;

if((/(?=.*\bAndroid\b)(?=.*\b(m|M)obile\b).*/.test(userAgent)) || (/(?=.*\biPhone\b).*/.test(userAgent))){

return "<form name with responsive>"

} else {

return "<form name with error message>"

}