use of com.facebook.react.bridge.WritableMap in project gl-react-native by ProjectSeptemberInc.
the class RNGLContext method shaderSucceedToCompile.
public void shaderSucceedToCompile(Integer id, Map<String, Integer> uniformTypes) {
Callback onCompile = onCompileCallbacks.get(id);
onCompileCallbacks.remove(id);
if (onCompile != null) {
WritableMap res = Arguments.createMap();
WritableMap uniforms = Arguments.createMap();
for (String key : uniformTypes.keySet()) {
uniforms.putString(key, glTypeString(uniformTypes.get(key)));
}
res.putMap("uniforms", uniforms);
onCompile.invoke(null, res);
}
}
use of com.facebook.react.bridge.WritableMap in project react-native-android-video-editor by RZulfikri.
the class VideoSurfaceView method notifyProgressUpdate.
public void notifyProgressUpdate(boolean status) {
// Log.e("DEBUG", "UPDATE PROGRESS");
WritableMap event = Arguments.createMap();
event.putInt(Events.VIDEO_PROGRESS, mMediaPlayer.getCurrentPosition());
eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_VIDEO_PROGRESS.toString(), event);
}
use of com.facebook.react.bridge.WritableMap in project react-native-navigation by wix.
the class EventEmitter method sendScreenChangedEventToJsScreen.
private void sendScreenChangedEventToJsScreen(String eventId, String navigatorEventId) {
WritableMap map = Arguments.createMap();
map.putString("type", "ScreenChangedEvent");
sendNavigatorEvent(eventId, navigatorEventId, map);
}
use of com.facebook.react.bridge.WritableMap in project react-native-fcm by evollu.
the class FIRMessagingModule method registerMessageHandler.
private void registerMessageHandler() {
IntentFilter intentFilter = new IntentFilter("com.evollu.react.fcm.ReceiveNotification");
LocalBroadcastManager.getInstance(getReactApplicationContext()).registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (getReactApplicationContext().hasActiveCatalystInstance()) {
RemoteMessage message = intent.getParcelableExtra("data");
WritableMap params = Arguments.createMap();
WritableMap fcmData = Arguments.createMap();
if (message.getNotification() != null) {
Notification notification = message.getNotification();
fcmData.putString("title", notification.getTitle());
fcmData.putString("body", notification.getBody());
fcmData.putString("color", notification.getColor());
fcmData.putString("icon", notification.getIcon());
fcmData.putString("tag", notification.getTag());
fcmData.putString("action", notification.getClickAction());
}
params.putMap("fcm", fcmData);
params.putString("collapse_key", message.getCollapseKey());
params.putString("from", message.getFrom());
params.putString("google.message_id", message.getMessageId());
params.putDouble("google.sent_time", message.getSentTime());
if (message.getData() != null) {
Map<String, String> data = message.getData();
Set<String> keysIterator = data.keySet();
for (String key : keysIterator) {
params.putString(key, data.get(key));
}
}
sendEvent("FCMNotificationReceived", params);
}
}
}, intentFilter);
}
Aggregations