...
Code Block | ||||
---|---|---|---|---|
| ||||
var useragent = navigator.userAgent;
if (useragent.match(/Android/i)) {
// This is an Android device
}
|
Using RPG Code:
Code Block |
---|
D getenv PR * ExtProc('getenv')
D name * Value Options(*String)
D useragent s 250A
/Free
useragent = %str(getenv('HTTP_USER_AGENT'));
If %scan('Android' : useragent) > 0;
// This is an Android device
EndIf;
/End-Free
|
Using PHP Code:
Code Block |
---|
$useragent = $_SERVER['HTTP_USER_AGENT']; if (stripos($useragent, 'Android') !== false) { // This is an Android device } |
...