From 1f8cd9ddbc72e69b7ac7329cb72c58440f778650 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 16 Jun 2016 09:29:14 -0700 Subject: [PATCH] Add support placeholder in AdsManager for proper deep linking Reviewed By: foghina Differential Revision: D3444315 fbshipit-source-id: 894b7e7899bd59ac87b175cd2767afe5a741487f --- .../react/modules/core/DeviceEventManagerModule.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.java index 2ac4f4502..d28cf84f1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.java @@ -13,12 +13,14 @@ import javax.annotation.Nullable; import android.net.Uri; +import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.bridge.JavaScriptModule; import com.facebook.react.bridge.SupportsWebWorkers; import com.facebook.react.bridge.UiThreadUtil; +import com.facebook.react.bridge.WritableMap; /** * Native module that handles device hardware events like hardware back presses. @@ -58,9 +60,11 @@ public class DeviceEventManagerModule extends ReactContextBaseJavaModule { * Sends an event to the JS instance that a new intent was received. */ public void emitNewIntentReceived(Uri uri) { + WritableMap map = Arguments.createMap(); + map.putString("url", uri.toString()); getReactApplicationContext() .getJSModule(RCTDeviceEventEmitter.class) - .emit("url", uri.toString()); + .emit("url", map); } /**