Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 428ba2d

Browse files
committed
Update README.md
1 parent eba0db0 commit 428ba2d

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -242,36 +242,36 @@ And that's it for installation using RNPM! Continue below to the [Plugin Configu
242242

243243
After installing the plugin and syncing your Android Studio project with Gradle, you need to configure your app to consult CodePush for the location of your JS bundle, since it will "take control" of managing the current and all future versions. To do this, update the `MainActivity.java` file to use CodePush via the following changes:
244244

245-
```java
246-
...
247-
// 1. Import the plugin class (if you used RNPM to install the plugin, this
248-
// should already be done for you automatically so you can skip this step).
249-
import com.microsoft.codepush.react.CodePush;
250-
251-
public class MainActivity extends ReactActivity {
252-
// 2. Override the getJSBundleFile method in order to let
253-
// the CodePush runtime determine where to get the JS
254-
// bundle location from on each app start
255-
@Override
256-
protected String getJSBundleFile() {
257-
return CodePush.getBundleUrl("index.android.bundle");
258-
}
259-
260-
@Override
261-
protected List<ReactPackage> getPackages() {
262-
// 3. Instantiate an instance of the CodePush runtime and add it to the list of
263-
// existing packages, specifying the right deployment key. If you don't already
264-
// have it, you can run "code-push deployment ls <appName> -k" to retrieve your key.
265-
return Arrays.<ReactPackage>asList(
266-
new MainReactPackage(),
267-
// new CodePush() <-- remove this line if you used RNPM for plugin installation.
268-
new CodePush("deployment-key-here", this, BuildConfig.DEBUG)
269-
);
270-
}
245+
```java
246+
...
247+
// 1. Import the plugin class (if you used RNPM to install the plugin, this
248+
// should already be done for you automatically so you can skip this step).
249+
import com.microsoft.codepush.react.CodePush;
250+
251+
public class MainActivity extends ReactActivity {
252+
// 2. Override the getJSBundleFile method in order to let
253+
// the CodePush runtime determine where to get the JS
254+
// bundle location from on each app start
255+
@Override
256+
protected String getJSBundleFile() {
257+
return CodePush.getBundleUrl("index.android.bundle");
258+
}
271259
272-
...
260+
@Override
261+
protected List<ReactPackage> getPackages() {
262+
// 3. Instantiate an instance of the CodePush runtime and add it to the list of
263+
// existing packages, specifying the right deployment key. If you don't already
264+
// have it, you can run "code-push deployment ls <appName> -k" to retrieve your key.
265+
return Arrays.<ReactPackage>asList(
266+
new MainReactPackage(),
267+
// new CodePush() <-- remove this generated line if you used RNPM for plugin installation.
268+
new CodePush("deployment-key-here", this, BuildConfig.DEBUG)
269+
);
273270
}
274-
```
271+
272+
...
273+
}
274+
```
275275

276276
## Plugin Usage
277277

0 commit comments

Comments
 (0)