1.0.3 • Published 4 years ago

react-native-giga-full-screen v1.0.3

Weekly downloads
16
License
-
Repository
-
Last release
4 years ago

react-native-giga-full-screen

Getting started

$ npm install react-native-giga-full-screen --save

Mostly automatic installation

$ react-native link react-native-giga-full-screen

Manual installation

Android

(Step 1 -> 3 only do when your react-native version doesn't support automatically link) 1. Open up android/app/src/main/java/[...]/MainActivity.java

  • Add import com.reactlibrary.RNGigaFullScreenPackage; to the imports at the top of the file
  • Add new RNGigaFullScreenPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-giga-full-screen'
    project(':react-native-giga-full-screen').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-giga-full-screen/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-giga-full-screen')
  3. In MainApplication.java add this method:
       @Override
       public void onWindowFocusChanged(boolean hasFocus) {
         super.onWindowFocusChanged(hasFocus);
         Intent intent = new Intent("onFocus");
         this.sendBroadcast(intent);
       }

Usage

import RNGigaFullScreen from 'react-native-giga-full-screen';

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