- Notifications
You must be signed in to change notification settings - Fork1.5k
[Android] Add support for Bridgeless Mode - 0.74#1032
[Android] Add support for Bridgeless Mode - 0.74#1032cortinico wants to merge 1 commit intoDylanVann:mainfrom
Conversation
cortinico commentedMar 21, 2024
@DylanVann friendly ping to get this merged. Anything else I can help with? |
I've been trying against 0.74 RC with Bridgeless mode and the librarydoesn't work well on Android. The reason is that the library is usingthe deprecated RCTEventEmitter.This PRDylanVann/react-native-fast-image#1032is an example of another plugin making the same change
cortinico commentedMar 27, 2024
Please let me know if I can help somehow@DylanVann 👍 |
angelo-hub commentedApr 10, 2024
@cortinico Dylann hasn't updated this repo in over 2 years, would highly recommend publishing your fork via npm |
cortinico commentedApr 11, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm not going to fork this sorry. |
qnrjs42 commentedApr 22, 2024
@cortinico I have Error. how can i fix it? "react":"18.2.0","react-native":"0.73.6","react-native-fast-image":"^8.6.3", // /node_modules/react-native-fast-image/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java@@ -14,14 +14,19@@importandroidx.annotation.NonNull;importcom.bumptech.glide.Glide;importcom.bumptech.glide.RequestManager;+importcom.dylanvann.fastimage.events.FastImageProgressEvent;+importcom.facebook.react.bridge.ReactApplicationContext;+importcom.facebook.react.bridge.ReactContext;importcom.facebook.react.bridge.ReadableMap;importcom.facebook.react.bridge.WritableMap;importcom.facebook.react.bridge.WritableNativeMap;importcom.facebook.react.common.MapBuilder;importcom.facebook.react.uimanager.SimpleViewManager;importcom.facebook.react.uimanager.ThemedReactContext;+importcom.facebook.react.uimanager.UIManagerHelper;importcom.facebook.react.uimanager.annotations.ReactProp;-importcom.facebook.react.uimanager.events.RCTEventEmitter;+importcom.facebook.react.uimanager.common.ViewUtil;+importcom.facebook.react.uimanager.events.EventDispatcher;importcom.facebook.react.views.imagehelper.ResourceDrawableIdHelper;importjava.util.List;@@ -117,13 +122,17@@classFastImageViewManagerextendsSimpleViewManager<FastImageViewWithUrl>impleList<FastImageViewWithUrl>viewsForKey =VIEWS_FOR_URLS.get(key);if (viewsForKey !=null) {for (FastImageViewWithUrlview :viewsForKey) {-WritableMapevent =newWritableNativeMap();-event.putInt("loaded", (int)bytesRead);-event.putInt("total", (int)expectedLength);-ThemedReactContextcontext = (ThemedReactContext)view.getContext();-RCTEventEmittereventEmitter =context.getJSModule(RCTEventEmitter.class);-intviewId =view.getId();-eventEmitter.receiveEvent(viewId,REACT_ON_PROGRESS_EVENT,event);+ReactContextcontext =getReactApplicationContext();+EventDispatcherdispatcher =UIManagerHelper.getEventDispatcherForReactTag(context,view.getId());+FastImageProgressEventevent =newFastImageProgressEvent(+ViewUtil.NO_SURFACE_ID,+view.getId(),+ (int)bytesRead,+ (int)expectedLength);++if (dispatcher !=null) {+dispatcher.dispatchEvent(event);+ } } } } Note: [2] Wrote GeneratedAppGlideModule with: [com.bumptech.glide.integration.okhttp3.OkHttpLibraryGlideModule, com.dylanvann.fastimage.FastImageOkHttpProgressGlideModule]/node_modules/react-native-fast-image/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java:125: error: cannot find symbol ReactContext context =getReactApplicationContext(); ^ symbol: methodgetReactApplicationContext() location: class FastImageViewManager1 error FAILURE: Build failed with an exception.* What went wrong:Execution failedfor task':react-native-fast-image:compileDebugJavaWithJavac'. |
cortinico commentedApr 23, 2024
Well it seems like that this library is unmaintained as@DylanVann is unresponsive after various attempts to try to contact them. Alternative for the community are:
|
deepanshushuklad11 commentedAug 21, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@cortinico I am maintaining this package@d11/react-native-fast-image |
erie-e9 commentedOct 4, 2024
This worked, both platforms!
|
The problem
I've been trying
react-native-fast-imageagainst 0.74 RC with Bridgeless mode and the library doens't work well on Android. The reason is that the library is usign RCTEventEmitter which is deprecated. I'm moving over to use the EventDispatcher.Test Plan