Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

react-native-mail-launcher

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-mail-launcher

Launch mail app from react-native application

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

react-native-mail-launcher

Launch mail app from react-native application

Getting started

$ npm install react-native-mail-launcher --save

Mostly automatic installation

$ react-native link react-native-mail-launcher

Android

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

iOS

We do not need a native module for iOS

Usage

import * as React from "react";
import { View, Button } from "react-native";
import launchMailApp from "react-native-mail-launcher";

export default class Example extends React.Component {
  openMail = () => {
    launchMailApp();
  };

  render() {
    return (
      <View>
        <Button onPress={this.openMail}>Go to mail client</Button>
      </View>
    );
  }
}

Keywords

react-native

FAQs

Package last updated on 30 Oct 2018

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