npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-android-webview-setting-checker

v0.2.2

Published

to check if android setting is enabled or not

Readme

expo-android-webview-setting-checker

Introduction

The expo-android-webview-setting-checker package is designed to efficiently manage the Android System WebView settings in Expo applications. It's particularly useful for ensuring that the WebView is enabled and up-to-date, thus preventing unexpected errors or native crashes in your Expo apps.

Features

  • WebView State Detection: Checks whether the Android System WebView is enabled, disabled, or missing.

  • Easy Navigation to Settings: Allows directly opening Android settings to adjust WebView if necessary.

  • Component Management: Renders a component if WebView is enabled, otherwise renders a fallback component.

Installation in managed Expo projects

Install the package using npm with the following command:

npm i expo-android-webview-setting-checker

After installation, a custom development client build is required on the simulator or device. You can do this using eas build:

Make sure to set developmentClient to true in your eas.json:

"build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "android": {
        "buildType": "apk"
      },
      "channel": "development"
    }
}

API documentation

  • webViewEnabled(): An async function that returns true or false based on WebView's enabled state.

  • goToSettings(): Opens Android settings to adjust WebView settings.

  • AndroidSystemWebViewChecker: A provider that accepts a component and a fallback. It returns your component if the setting is enabled, otherwise your fallback component. This provider will check the App's state every time it returns from the background to active, allowing a direct re-render of your component after enabling the setting without restarting the App.

if the Android System WebView is already installed but only deactvated, redirecting to the Android System WebView on Playstore will propose you to activate it directly.

Example of usage

import { AndroidSystemWebViewChecker, goToSettings } from "expo-android-webview-setting-checker";
import { useRef } from "react";
import { StyleSheet, Text, View, Button, Linking } from "react-native";
import { WebView } from "react-native-webview";

function IsEnabledComponent() {
  const webref = useRef(null);
  return <WebView ref={webref} source={{ uri: "https://www.expo.dev" }} />;
}

function IsDisabledComponent() {
  return (
    <View style={styles.common}>
      <Text>Sorry Android System WebView is disabled or missing</Text>
      <Button title="Open settings" onPress={() => goToSettings()} />
      <Button
        color="grey"
        title="Open Playstore"
        onPress={() =>
          Linking.openURL(
            "https://play.google.com/store/apps/details?id=com.google.android.webview&hl=en_US",
          )
        }
      />
    </View>
  );
}
export default function App() {
  return (
    <AndroidSystemWebViewChecker
      component={<IsEnabledComponent />}
      fallback={<IsDisabledComponent />}
    />
  );
}

const styles = StyleSheet.create({
  common: {
    flex: 0,
    gap: 30,
    height: "100%",
    justifyContent: "center",
    alignSelf: "center",
  },
});