GithubHelp home page GithubHelp logo

react-native-immersive's People

Contributors

cristiantx avatar dr-js avatar plrthink avatar thatbean avatar winmintun avatar xvonabur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-native-immersive's Issues

Readme mistake "RNZipArchive" to "RNImmersive"

Hi, there is a mistake in redame file, you need to change:

compile project(':react-native-zip-archive') => compile project(':react-native-immersive')

import com.rnziparchive.RNZipArchivePackage; => import com.rnimmersive.RNImmersivePackage;

new RNZipArchivePackage() => new RNImmersivePackage()

Doesn't work with react-native-navigation

I don't know if its ok to blame the "issue" here or at react-native-navigation but maybe you can discover the Issue with it.

When I try to set the immersive mode nothing happens. Maybe the reason is the unusual way to start the native app with the react-native-navigation.

Feel free to close the issue when you think that I should bother the react-native-navigation guys ๐Ÿ˜„

Problem configuring project with gradle:2.3

When I try to build my Android app, I'm getting the following error:

image

It seems like jcenter can't find any versions of gradle. When I add maven, gradle is found, but not the correct version.

    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.+'
    }
}

image

Changing the gradle version in the classpath to 3.1.4 fixed this issue for me. Did anyone else have this problem?

Support Cocoapods

Would be nice to have support for Cocoapods, I can make a PR, just want to make sure you'll be up for this.

Question about Modals

What i have done

I followed the installation process and these instructions to integrate the package into my project but things are not behaving like i expected.

What i'm trying to achieve

I want to disable Androids System Bottom Navigation wherever possible because it conflicts with my UI.

What i observed

It seems like every kind of modal opens the Android Navigation.

Other examples in my code base which opens the Android Navigation

screenshot_20190127-142648

screenshot_20190127-174346

screenshot_20190127-175540

How to use Immersive.on() ?

Hi I can't seem to get Immersive to work. I get an error "undefined is not an object (evaluating 'RNImmersive.setImmersive')

Screenshot

package.json

{
  "name": "wyse",
  "version": "0.0.2",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "15.4.1",
    "react-dom": "15.4.1",
    "react-native": "0.42.0",
    "react-native-immersive": "0.0.4",
    "whatwg-fetch": "^1.0.0"
  },
  "jest": {
    "preset": "jest-react-native"
  },
  "devDependencies": {
    "babel-jest": "16.0.0",
    "babel-preset-react-native": "1.9.0",
    "jest": "16.0.2",
    "jest-react-native": "16.1.0",
    "react-test-renderer": "15.3.2"
  }
}

settings.gradle

rootProject.name = 'wyse'

include ':app'
include ':react-native-immersive'
project(':react-native-immersive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-immersive/android')

build.gradle

apply plugin: "com.android.application"

import com.android.build.OutputFile

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations
 * and their defaults. If you decide to add a configuration block, make sure to add it before the
 * `apply from: "../../node_modules/react-native/react.gradle"` line.
 *
 * project.ext.react = [
 *   // the name of the generated asset file containing your JS bundle
 *   bundleAssetName: "index.android.bundle",
 *
 *   // the entry file for bundle generation
 *   entryFile: "index.android.js",
 *
 *   // whether to bundle JS and assets in debug mode
 *   bundleInDebug: false,
 *
 *   // whether to bundle JS and assets in release mode
 *   bundleInRelease: true,
 *
 *   // whether to bundle JS and assets in another build variant (if configured).
 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
 *   // The configuration property can be in the following formats
 *   //         'bundleIn${productFlavor}${buildType}'
 *   //         'bundleIn${buildType}'
 *   // bundleInFreeDebug: true,
 *   // bundleInPaidRelease: true,
 *   // bundleInBeta: true,
 *
 *   // the root of your project, i.e. where "package.json" lives
 *   root: "../../",
 *
 *   // where to put the JS bundle asset in debug mode
 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
 *
 *   // where to put the JS bundle asset in release mode
 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in debug mode
 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in release mode
 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
 *
 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
 *   // for example, you might want to remove it from here.
 *   inputExcludes: ["android/**", "ios/**"],
 *
 *   // override which node gets called and with what additional arguments
 *   nodeExecutableAndArgs: ["node"]
 *
 *   // supply additional arguments to the packager
 *   extraPackagerArgs: []
 * ]
 */

apply from: "../../node_modules/react-native/react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.wyse"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 9
        versionName "1.9"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    signingConfigs {
        release {
            storeFile file("my-release-key.keystore")
            storePassword "springbig"
            keyAlias "my-key-alias"
            keyPassword "springbig"
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
    compile project(':react-native-immersive')
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
  from configurations.compile
  into 'libs'
}

MainActivity.java

package com.wyse;

import com.facebook.react.ReactActivity;
import com.rnimmersive.RNImmersivePackage;
import java.util.List;
import java.util.Arrays;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.react.ReactPackage;

public class MainActivity extends ReactActivity {

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "wyse";
    }

    protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(new MainReactPackage(), new RNImmersivePackage());
    }
}

index.android.js

import React, {Component} from 'react';
import {AppRegistry, Navigator} from 'react-native';
import Immersive from 'react-native-immersive';

import Apple from './app/Apple';
import LoadingScreen from './app/LoadingScreen'
import LoginScreen from './app/LoginScreen';
import KeypadScreen from './app/KeypadScreen';
import InterestScreen from './app/InterestScreen';
import RewardScreen from './app/RewardScreen';
import RewardRedeemedScreen from './app/RewardRedeemedScreen';

class wyse extends Component {

    render() {
        Immersive.setImmersive(true);
        return (
            <Navigator initialRoute={{screen: 'LoadingScreen'}} renderScene={(route, nav) => {
                return this.renderScene(route, nav)
            }}/>
        )
    }

    renderScene(route, nav) {
        switch (route.screen) {
            case "Apple":
                return <Apple navigator={nav}/>
            case "LoadingScreen":
                return <LoadingScreen navigator={nav}/>
            case "LoginScreen":
                return <LoginScreen navigator={nav}/>
            case "KeypadScreen":
                return <KeypadScreen navigator={nav} tablet={route.tablet}/>
            case 'InterestScreen':
                return <InterestScreen navigator={nav} tablet={route.tablet} member={route.member}/>
            case 'RewardScreen':
                return <RewardScreen navigator={nav} tablet={route.tablet} member={route.member}/>
            case "RewardRedeemedScreen":
                return <RewardRedeemedScreen navigator={nav} tablet={route.tablet} reward={route.reward}/>
        }
    }
}

AppRegistry.registerComponent('wyse', () => wyse);

It doesn't work with Modal

Hello. In general it successfully work with wix-react-native-router. But, it doesn't work if I use screen as a modal. Version of react-native-router is latest. Could you give any idea, how can I handle it.

Release Mode

In Release APK,

It does not work.

I think DEV is false in Release Mode.

Method does not override or implement a method from a supertype

Hello!

With React Native v0.47.1 I have the following error while running react-native run-android:

/node_modules/react-native-immersive/android/src/main/java/com/rnimmersive/RNImmersivePackage.java:20: error: method does not override or implement a method from a supertype
  @Override
  ^
1 error

I can bypass this error only after removing @Override from:

 @Override
  public List<Class<? extends JavaScriptModule>> createJSModules() {
    return Collections.emptyList();
  }

This is the similar issue as this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.