# react-native-bring-foreground

> launch react native application which is in background to foreground

Latest version **0.0.3** (published 2019-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-bring-foreground
pnpm add react-native-bring-foreground
yarn add react-native-bring-foreground
bun add react-native-bring-foreground
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-06-18 |
| First published | 2019-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 68.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Harish Devadiga |
| Maintainers | harish1725 |
| Keywords | react-native, react-native-launch-application, react-native-launch-application-foreground |

## Links

- npm: https://www.npmjs.com/package/react-native-bring-foreground
- Homepage: https://github.com/HarishDevadiga/react-native-bring-foreground
- npm.io page: https://npm.io/package/react-native-bring-foreground

## Recent versions

- 0.0.3 (latest) — 2019-06-18
- 0.0.2 — 2019-06-06
- 0.0.1 — 2019-06-06

## README

# react-native-bring-foreground (https://www.npmjs.com/package/react-native-bring-foreground)

this is a react-native library for launching the application when the application is in the background . 

## Getting started

`$ npm install react-native-bring-foreground --save`

### Mostly automatic installation

`$ react-native link react-native-bring-foreground`

### Manual installation


#### iOS

Not Available

#### Android

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


## Usage


```javascript
import LaunchApplication from 'react-native-bring-foreground';
import type {RemoteMessage} from 'react-native-firebase';


//PackageName Must Be String For example "com.domain.application"
export default async (message: RemoteMessage) => {
    LaunchApplication.open(PackageName);
}

---
_Source: https://npm.io/package/react-native-bring-foreground · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
