This package has been deprecated

Author message:

this package has been deprecated use react-native-launch-application package instead

sajjad-launch-application

1.0.0 • Public • Published

sajjad-launch-application

this is a react-native library for launching the application when the application is closed . usually we can use this in headless js . (like fcm background messaging and etc)

Getting started

$ npm install sajjad-launch-application --save

Mostly automatic installation

$ react-native link sajjad-launch-application

Manual installation

iOS

Not Available

Android

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

Usage

You can use this library in headless js for example launching the application when a notification received even if your app swiped out . even if your screen locked.

import SajjadLaunchApplication from 'sajjad-launch-application';
import type {RemoteMessage} from 'react-native-firebase';
 
 
//PackageName Must Be String For example "com.domain.application"
export default async (message: RemoteMessage) => {
    SajjadLaunchApplication.open(PackageName);
}
 
 

Dependents (0)

Package Sidebar

Install

npm i sajjad-launch-application

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

70.1 kB

Total Files

14

Last publish

Collaborators

  • lvlrsajjad