title: React-Native Android CodePush setup not downloading updates
body: <p>I'm having trouble setting up CodePush into my React-Native Android application. On my dashboard, it's not showing that any apps have downloaded the update or installed it.</p>
  <p>NOTE: iOS Codepushing works for this mobile app, just not Android.</p>
  <p>I currently have my codePush options set up like this:</p>
  <pre><code>let codePushOptions = { 
     checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
     installMode: codePush.InstallMode.ON_NEXT_RESUME
  };
  </code></pre>
  <hr />
  <h2>Things I have done:</h2>
  <ol>
  <li><p>In your <code>android/settings.gradle</code> file, make the following additions:</p>
  <p>include ':app', ':react-native-code-push'
  project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')</p>
  </li>
  <li><p>In your <code>android/app/build.gradle</code> file, add the <code>:react-native-code-push</code> project as a compile-time dependency:</p>
  <p>...
  dependencies {
  ...
  compile project(':react-native-code-push')
  }</p>
  </li>
  <li><p>In your <code>android/app/build.gradle</code> file, add the <code>codepush.gradle</code> file as an additional build task definition underneath <code>react.gradle</code>:</p>
  <p>...
  apply from: &quot;../../node_modules/react-native/react.gradle&quot;
  apply from: &quot;../../node_modules/react-native-code-push/android/codepush.gradle&quot;
  ...</p>
  </li>
  <li><p>If you are integrating Code Push into React Native application please do the following steps:</p>
  </li>
  </ol>
  <p>Update the <code>MainApplication.java</code> file to use CodePush via the following changes:</p>
  <pre><code>...
  // 1. Import the plugin class.
  import com.microsoft.codepush.react.CodePush;
  
  public class MainApplication extends Application implements ReactApplication {
  
      private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
          ...
          // 2. Override the getJSBundleFile method in order to let
          // the CodePush runtime determine where to get the JS
          // bundle location from on each app start
          @Override
          protected String getJSBundleFile() {
              return CodePush.getJSBundleFile();
          }
  
          @Override
          protected List&lt;ReactPackage&gt; getPackages() {
              // 3. Instantiate an instance of the CodePush runtime and add it to the list of
              // existing packages, specifying the right deployment key. If you don't already
              // have it, you can run &quot;code-push deployment ls &lt;appName&gt; -k&quot; to retrieve your key.
              return Arrays.&lt;ReactPackage&gt;asList(
                  new MainReactPackage(),
                  new CodePush(&quot;deployment-key-here&quot;, MainApplication.this, BuildConfig.DEBUG)
              );
          }
      };
  }
  </code></pre>
  <p>Here is a picture of my MainApplication.java file</p>
  <p><a href="https://i.stack.imgur.com/Y2VX8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y2VX8.png" alt="enter image description here" /></a></p>
  <hr />
  <p>I know there is also <a href="https://github.com/Microsoft/react-native-code-push/blob/master/docs/setup-android.md#background-react-instances" rel="nofollow noreferrer">this portion</a> of the setup instructions that I don't know if I need to do or not. I tried to implement it but I get an error because this code is not like the sample documents at all that I have in my files.</p>
  <p>I'm not quite sure what this is either:</p>
  <pre><code>public class MyReactNativeHost extends ReactNativeHost implements ReactInstanceHolder {
    // ... usual overrides
  }
  </code></pre>
  <h2>Edit 2 - index.js file</h2>
  <pre><code>import { AppRegistry } from 'react-native';
  import codePush from &quot;react-native-code-push&quot;;
  
  import App from './app/config/app';
  
  let codePushOptions = { 
      checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
      installMode: codePush.InstallMode.ON_NEXT_RESUME
  };
  
  AppRegistry.registerComponent('AppName', () =&gt; codePush(codePushOptions)(App));
  </code></pre>