I've tried use a countdown in background in react native expo, i use webview:
<WebView
onMessage={() => {
if (props.initialHour >= finishHour) {
props.setMinutes(null);
props.stopSound();
}
}}
source={{
html: `<script>
setInterval(()=>{window.ReactNativeWebView.postMessage("");}, ${props.interval})
</script>`,
}}
/>
but only persist interval 5min in background and i've tried setTimeout too and the same results.
How can i do it? without using expo eject
Please help me :( and thank you!
Top comments (0)