Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend readme with sample code #3

Open
dutscher opened this issue Sep 25, 2020 · 2 comments
Open

extend readme with sample code #3

dutscher opened this issue Sep 25, 2020 · 2 comments

Comments

@dutscher
Copy link

dutscher commented Sep 25, 2020

hi there,
it might be helpful to add this sample code to your readme.

it took me 30min to get the code working.
maybe other guys now need 1min 👍

please add to your readme:

package com.autostart;

import com.facebook.react.ReactActivity;

import com.ssg.autostart.AutostartPackage;
import com.facebook.react.ReactPackage;
import java.util.List;
import java.util.Arrays;

public class MainActivity extends ReactActivity {
  ...
  protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
      new AutostartPackage()
    );
  }
}

cheers and thanks for your module!
dutscher

@kamal-hossain
Copy link

@dutscher
the above code you mentioned, can you please tell me where to put this ? I mean in which file specifically?
It will be very much helpful, thanks in advance.

@fukemy
Copy link

fukemy commented Nov 21, 2022

Hi, about newer version of react-native, it's used auto linking then user does not need to provide it into android app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants