Skip to content

Commit 8ad6d85

Browse files
authored
Tweak README (#28)
1 parent 33f45a1 commit 8ad6d85

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@
66
|---|---|
77
| [![Build Status](https://dev.azure.com/petter0012/react-native-android-activity/_apis/build/status/petterh.react-native-android-activity?branchName=master)](https://dev.azure.com/petter0012/react-native-android-activity/_build/latest?definitionId=1&branchName=master) | [[![Build Status](https://dev.azure.com/petter0012/react-native-android-activity/_apis/build/status/petterh.react-native-android-activity%20(1)?branchName=master)](https://dev.azure.com/petter0012/react-native-android-activity/_build/latest?definitionId=2&branchName=master) |
88

9-
This sample, which grew out of a [question on Stack Overflow](https://stackoverflow.com/questions/42253397/call-android-activity-from-react-native-code/43675819), demonstrates the interface between React Native JavaScript and Java code in Android host applications/Objective-C in iOS applications.
9+
This sample, which grew out of a [question on Stack Overflow](https://stackoverflow.com/questions/42253397/call-android-activity-from-react-native-code/43675819), demonstrates the interface between React Native JavaScript and native code – Java on Android, Objective-C on iOS.
1010

11-
The original version was Android-only; support for iOS was added March 28 2019.
11+
The original version was Android-only; support for iOS was added in March 2019.
1212

1313
This project demonstrates the following:
1414

15-
* Call from JavaScript into native modules:
16-
* These use a custom native module called `ActivityStarter`:
15+
* Calling from JavaScript into native modules:
16+
* ...using a custom native module called `ActivityStarter`:
1717
* Navigate from React Native to a Java activity (or iOS view controller) internal to the host app;
1818
* Start an external intent to dial a phone number, passing data from JavaScript;
1919
* Query the host app for information.
20-
* This uses the native module `Clipboard`, which [comes with React Native out of the box](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.java):
20+
* ...using the native module `Clipboard`, which [comes with React Native out of the box](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.java):
2121
* Copy information to the clipboard.
22-
* Call a JavaScript method from Java or Objective-C, using an officially undocumented approach.
23-
* Demonstrate sending events from the native platform to JavaScript. (When possible, prefer this approach to the undocumented one.)
24-
* Verify that custom edit menu extensions work with React Native `TextInput`. (Android only.)
25-
* Add a custom menu option to React Native debug menu.
22+
* Calling a JavaScript method from Java or Objective-C, using an officially undocumented approach.
23+
* Sending events from the native platform to JavaScript. (When possible, prefer this approach to the undocumented one.)
24+
* Verifying that custom edit menu extensions work with React Native `TextInput`. (Android only.)
25+
* Adding a custom menu option to React Native debug menu.
2626

27-
There is no technical difference between the `ActivityStarter` and `Clipboard` native modules, except one is defined here, while the other ships as part of React Native.
27+
There is no technical difference between the `ActivityStarter` and `Clipboard` native modules, except one is defined in this project while the other ships as part of React Native.
2828

2929
The starting point for this sample is a slightly tweaked standard React Native project as generated by a long-outdated version of `react-native init`. We add six buttons to the generated page:
3030

@@ -53,7 +53,8 @@ The `TextInput` box appears only in the Android version. Since both platforms us
5353

5454
### Android
5555

56-
* Connect an Android device via USB, or use an emulator. [Don't forget to enable USB Debugging in Developer options](https://developer.android.com/studio/run/device).
56+
* Connect an Android device via USB, or use an emulator.
57+
* [Enable USB Debugging in Developer options](https://developer.android.com/studio/run/device).
5758
* Open the app in Android Studio and run it.
5859
* If this fails with the message "Could not get BatchedBridge, make sure your bundle is packaged correctly", your packager is likely not running.
5960
* If it complains about connecting to the dev server, run `adb reverse tcp:8081 tcp:8081`

0 commit comments

Comments
 (0)