mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
20e7a40b9c
commit
56c363e39a
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user