I am running a simple code like below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello Bulma!</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
</head>
<body>
<section class="section">
<div class="container">
<h1 class="title">
Hello World
</h1>
<p class="subtitle">
<button class="btn btn-warning text-white" type="button" onclick="metamask()">
Invest
Here →
</button>
</p>
</div>
</section>
<script>
async function metamask() {
const {ethereum} = window;
var metamask = Boolean(ethereum && ethereum.isMetaMask);
alert(typeof window.ethereum);
}
</script>
</body>
</html>
but I get
typeof window.ethereum is undefined
It works fine in desktop metamask and iphone metamask dAPP. Doesnot work only in android metamask.