Hi @sijiazhao, there are some suggestions here on how to detect mobile devices using code. E.g., you could use the following (but note from the link, it may not always be effective):
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
quitPsychoJS('Mobile device detected. Goodbye!', false)
}