Add receiveCommand to the Java Delegate

Summary: Adding support for receiving commands and calling methods defined on the interface in https://github.com/facebook/react-native/commit/c7ee38149d02b64bae6aadcc72c4f664900ff0cb

Reviewed By: JoshuaGross

Differential Revision: D16434402

fbshipit-source-id: a539050a1a2b2a67f9ba7145ed789de700461589
This commit is contained in:
Eli White
2019-07-24 12:41:12 -07:00
committed by Facebook Github Bot
parent 4ab9da134c
commit 4eca2e226c
4 changed files with 121 additions and 13 deletions
@@ -124,11 +124,9 @@ function generateCommandsString(
) {
return component.commands
.map(command => {
const safeJavaName = toSafeJavaString(command.name);
const lowerJavaName =
safeJavaName[0].toLowerCase() + safeJavaName.slice(1);
const safeJavaName = toSafeJavaString(command.name, false);
return `void ${lowerJavaName}(${getCommandArguments(
return `void ${safeJavaName}(${getCommandArguments(
command,
componentName,
)});`;