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); } /**