Split NativeLinking into NativeIntentManager and NativeLinkingManager

Summary:
The iOS and Android NativeModules are very different. It's better to split the two interfaces, than to have one merged interface.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24324247

fbshipit-source-id: 097273829ffc719eff006ed2dde55f0dd6bd7d95
This commit is contained in:
Ramanpreet Nara
2020-10-15 08:49:28 -07:00
committed by Facebook GitHub Bot
parent 20e7a40b9c
commit 56c363e39a
11 changed files with 270 additions and 92 deletions
@@ -15,7 +15,7 @@ import android.net.Uri;
import android.nfc.NfcAdapter;
import android.provider.Settings;
import androidx.annotation.Nullable;
import com.facebook.fbreact.specs.NativeLinkingSpec;
import com.facebook.fbreact.specs.NativeIntentAndroidSpec;
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
@@ -26,7 +26,7 @@ import com.facebook.react.module.annotations.ReactModule;
/** Intent module. Launch other activities or open URLs. */
@ReactModule(name = IntentModule.NAME)
public class IntentModule extends NativeLinkingSpec {
public class IntentModule extends NativeIntentAndroidSpec {
public static final String NAME = "IntentAndroid";
@@ -237,14 +237,4 @@ public class IntentModule extends NativeLinkingSpec {
getReactApplicationContext().startActivity(intent);
}
@Override
public void addListener(String eventName) {
// iOS only
}
@Override
public void removeListeners(double count) {
// iOS only
}
}