1.0.5 • Published 6 years ago

react-native-google-accounts v1.0.5

Weekly downloads
25
License
-
Repository
-
Last release
6 years ago

react-native-google-accounts

Getting started

$ npm install react-native-google-accounts --save

Mostly automatic installation

$ react-native link react-native-google-accounts

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNGoogleAccountsPackage; to the imports at the top of the file
  • Add new RNGoogleAccountsPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-google-accounts'
    project(':react-native-google-accounts').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-google-accounts/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-google-accounts')

Usage

import RNGoogleAccounts from 'react-native-google-accounts';

// Get Connected Emailid
RNGoogleAccounts.getAccountEmail().then(email=>{
	console.log(email)
});