TheNoim / react-native-notification-listener

React native notificaion listener

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

io.noim-notification-listener

Getting started

$ npm install io.noim-notification-listener --save

Mostly automatic installation

$ react-native link io.noim-notification-listener

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesio.noim-notification-listener and add NOIMNotificationListener.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libNOIMNotificationListener.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

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

Windows

Read it! :D

  1. In Visual Studio add the NOIMNotificationListener.sln in node_modules/io.noim-notification-listener/windows/NOIMNotificationListener.sln folder to their solution, reference from their app.
  2. Open up your MainPage.cs app
  • Add using Com.Reactlibrary.NOIMNotificationListener; to the usings at the top of the file
  • Add new NOIMNotificationListenerPackage() to the List<IReactPackage> returned by the Packages method

Usage

import NOIMNotificationListener from 'io.noim-notification-listener';

// TODO: What to do with the module?
NOIMNotificationListener;

About

React native notificaion listener

License:Apache License 2.0


Languages

Language:Java 98.4%Language:JavaScript 1.6%