From 4ab243a9457c5eb4a545fe4e2eea4023edfb82b4 Mon Sep 17 00:00:00 2001 From: lauramedalia Date: Fri, 27 Nov 2020 22:21:10 -0500 Subject: [PATCH] adding note about where we are adding the method --- docs/native-modules-android.md | 1 + website/versioned_docs/version-0.63/native-modules-android.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/native-modules-android.md b/docs/native-modules-android.md index a786b320da8..87a94df96ee 100644 --- a/docs/native-modules-android.md +++ b/docs/native-modules-android.md @@ -63,6 +63,7 @@ As you can see, your `CalendarModule` class extends the `ReactContextBaseJavaMod All Java native modules in Android need to implement the `getName()` method. This method returns a string, which represents the name of the native module. The native module can then be accessed in JavaScript using its name. For example, in the below code snippet, `getName()` returns `"CalendarModule"`. ```java +// add to CalendarModule.java @Override public String getName() { return "CalendarModule"; diff --git a/website/versioned_docs/version-0.63/native-modules-android.md b/website/versioned_docs/version-0.63/native-modules-android.md index a786b320da8..7642c5a6559 100644 --- a/website/versioned_docs/version-0.63/native-modules-android.md +++ b/website/versioned_docs/version-0.63/native-modules-android.md @@ -82,6 +82,7 @@ Next you will need to add a method to your native module that will create calend Set up a method `createCalendarEvent()` for `CalendarModule` that can be invoked in JS through `CalendarModule.createCalendarEvent()`. For now, the method will take in a name and location as strings. Argument type options will be covered shortly. ```java +// add to CalendarModule.java @ReactMethod public void createCalendarEvent(String name, String location) { }