Git Product home page Git Product logo

Comments (6)

GantMan avatar GantMan commented on July 3, 2024

Hey @peterlazar1993

So, the repo doesn't clone the base, but uses the files inside base to patch up a fresh RN install. We utilize rnpm to do the patching for specific dependencies.

So if I understand what you're saying, when a brand new RN project comes down, and rnpm is run, it doesn't add the necessary code to MainActivity.java.

@markrickert - you helped us get this installed, can you weigh in?

Plans for moving forward:
option1 - Remove push notifications from ignite
option2 - Add an extra part of the script that copies in that line (and any other extraneous lines) that packages may miss.

Personally, we need option2, so we're going to need a "Find this line of code, and then insert here" function written. I'm happy to add this should we go with option 2. @fvonhoven - and @kevinvangelder this is something we can pair on to get you guys dealing with the generator.

from ignite.

nonotest avatar nonotest commented on July 3, 2024

Hello,

I encountered the same kind of issues about two weeks ago with android.
If it can help, this was the final MainActivity.java

package com.xxx;

import com.facebook.react.ReactActivity;
import com.oblador.vectoricons.VectorIconsPackage;
import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage;
import com.i18n.reactnativei18n.ReactNativeI18n;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;

import android.content.Intent; // <--- Import Intent


import java.util.Arrays;
import java.util.List;

public class MainActivity extends ReactActivity {
     private ReactNativePushNotificationPackage mReactNativePushNotificationPackage; // <------ Add Package Variable

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

    /**
     * Returns whether dev mode should be enabled.
     * This enables e.g. the dev menu.
     */
    @Override
    protected boolean getUseDeveloperSupport() {
        return BuildConfig.DEBUG;
    }

    /**
     * A list of packages used by the app. If the app uses additional views
     * or modules besides the default ones, add more packages here.
     */
    @Override
    protected List<ReactPackage> getPackages() {
    mReactNativePushNotificationPackage = new ReactNativePushNotificationPackage(this); // <------ Initialize the Package

        return Arrays.<ReactPackage>asList(
            new MainReactPackage(),
            new VectorIconsPackage(),
            new ReactNativeI18n(),
        mReactNativePushNotificationPackage
        );
    }

    @Override
    protected void onNewIntent (Intent intent) {
    super.onNewIntent(intent);
        mReactNativePushNotificationPackage.newIntent(intent);
    }

}

from ignite.

GantMan avatar GantMan commented on July 3, 2024

I'm going to have a discussion with the good people who made rnpm tomorrow. If I can fix the above, I will. If not, we're going to remove push notifications from the default ignite project.

from ignite.

GantMan avatar GantMan commented on July 3, 2024

https://github.com/rnpm/rnpm/blob/master/src/config/android/index.js#L107

zo0r/react-native-push-notification#75

from ignite.

GantMan avatar GantMan commented on July 3, 2024

Just pointed master at my branch, this works now. Might take a moment to also add the permissions.

from ignite.

GantMan avatar GantMan commented on July 3, 2024

https://github.com/infinitered/ignite/releases/tag/0.2.4

from ignite.

Related Issues (20)

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.