New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rn-google-api-availability

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-google-api-availability

Check google play services version

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Check if user has google play services installed + updated from React Native, Android only https://developers.google.com/android/reference/com/google/android/gms/common/GoogleApiAvailability.html

Installation

npm install --save rn-google-api-availability
yarn add rn-google-api-availability

Requires React Native >= 0.47

Usage

import GoogleAPIAvailability from 'rn-google-api-availability';

GoogleAPIAvailability.checkGooglePlayServices((result) => {
	if(result === 'update') {
		GoogleAPIAvailability.promptGooglePlayUpdate(false);
	}
});
<View>
	<Text>Please update Google Play Services to view map</Text>
	<TouchableHighlight onPress={() => GoogleAPIAvailability.openGooglePlayUpdate()}>
		<Text>Update</Text>
	</TouchableHighlight>
</View>

Methods

Method NameArgumentsNotes
checkGooglePlayServicesresult-Returns a promise with the Play Services status. success everything is good, failure if something goes wrong, update if services are not on the latest version, missing if services are missing, invalid if they are not setup correctly, disabled if services are disabled.
promptGooglePlayUpdateallowUse-Brings a popup window prompting user to update their Play Services. -Accepts a boolean that can force quit the application if the user does not wish to update
openGooglePlayUpdatenone-Opens Google Play Services in the Play Store application

TODO

  • Add Example App
  • Expose more API functions

Keywords

FAQs

Package last updated on 29 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc