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

React Native integration issue #57

Open
jensck opened this issue Feb 14, 2019 · 0 comments
Open

React Native integration issue #57

jensck opened this issue Feb 14, 2019 · 0 comments
Labels
DeviceSetupLib Issues specific to the Device Setup Library

Comments

@jensck
Copy link
Contributor

jensck commented Feb 14, 2019

Original issue: particle-iot/spark-setup-android#61


I’m having some trouble integrating the Android SDK with my React Native app.

I’m able to inject an access token using the Cloud SDK and then register a device using the Device Setup Library. However, once setup has finished, I can’t seem to hand back control to RN / return to the “main activity”.

In MainApplication.java I’m initialising the setup library:

@Override
  public void onCreate() {
    super.onCreate();
    ...
    ParticleDeviceSetupLibrary.init(this.getApplicationContext(), MainActivity.class);
  }

Then in my native module I call:

ParticleDeviceSetupLibrary.startDeviceSetup(getReactApplicationContext());

I really don’t have much experience writing native code, so any pointers would be much appreciated!

@jensck jensck added the DeviceSetupLib Issues specific to the Device Setup Library label Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeviceSetupLib Issues specific to the Device Setup Library
Projects
None yet
Development

No branches or pull requests

1 participant