# React Native - using the Android SDK

**URL:** <https://community.particle.io/t/react-native-using-the-android-sdk/40611>\
**Category:** Troubleshooting\
**Created:** [March 27, 2018, 10:48am UTC](https://community.particle.io/t/react-native-using-the-android-sdk/40611 "2018-03-27T10:48:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abigailmcp](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@abigailmcp](https://community.particle.io/u/abigailmcp)\
**Post date:** [March 27, 2018, 10:48am UTC](https://community.particle.io/t/react-native-using-the-android-sdk/40611/1 "2018-03-27T10:48:43Z")

</div>

Hi community!

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:

```auto
@Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
    // Initialize the Particle Device Setup Library
    ParticleDeviceSetupLibrary.init(this.getApplicationContext(), MainActivity.class);
  }

```

Then in my native module I call:

```auto
ParticleDeviceSetupLibrary.startDeviceSetup(getReactApplicationContext());

```

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

---

<div class="post-metadata">

**Author:** ![KyleG](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kyleg/32/11077_2.png) [@KyleG](https://community.particle.io/u/KyleG)\
**Post date:** [March 29, 2018, 2:57am UTC](https://community.particle.io/t/react-native-using-the-android-sdk/40611/2 "2018-03-29T02:57:27Z")

</div>

Let me ping someone that might be able to help, @rickkas7 or @ParticleD are you able to assist?

---

<div class="post-metadata">

**Author:** ![ParticleD](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/particled/32/17016_2.png) [@ParticleD](https://community.particle.io/u/ParticleD)\
**Post date:** [March 29, 2018, 5:27pm UTC](https://community.particle.io/t/react-native-using-the-android-sdk/40611/3 "2018-03-29T17:27:18Z")

</div>

I’m handling a support ticket that Abigail filed a few days ago about this, and will update this thread when we have some kind of resolution.

cheers,

ParticleD

---

<div class="post-metadata">

**Author:** ![abigailmcp](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@abigailmcp](https://community.particle.io/u/abigailmcp)\
**Post date:** [April 16, 2018, 9:10am UTC](https://community.particle.io/t/react-native-using-the-android-sdk/40611/4 "2018-04-16T09:10:23Z")

</div>

For anyone else struggling with this - we have a discussion thread on [this GitHub issue](https://github.com/particle-iot/spark-setup-android/issues/61).
