Inject Android Image Loader (React Native)
Inject the Glide
dependencies {
implementation "com.firework.external.imageloading:glide:+"
...
}
configurations.all {
resolutionStrategy.eachDependency { details ->
...
if (details.requested.group == 'com.firework.external.imageloading' && details.requested.name == 'glide') {
details.useVersion rootProject.ext.get("fwNativeVersion")
}
}
}import com.firework.imageloading.glide.GlideImageLoaderFactory
import com.fireworksdk.bridge.reactnative.FWReactNativeSDK
class MainApplication: ReactApplication() {
...
override fun onCreate() {
super.onCreate()
...
// before init method
FWReactNativeSDK.setImageLoader(GlideImageLoaderFactory.createInstance(this))
FWReactNativeSDK.init(
this,
FWSDKInitOptionsModel(videoLaunchBehavior = FWPlayerLaunchBehavior.MuteOnFirstLaunch)
)
}
}import com.firework.imageloading.glide.GlideImageLoaderFactory;
import com.fireworksdk.bridge.reactnative.FWReactNativeSDK;
public class MainApplication extends Application implements ReactApplication {
...
@Override
public void onCreate() {
super.onCreate();
...
// before init method
FWReactNativeSDK.INSTANCE.setImageLoader(GlideImageLoaderFactory.createInstance(this));
FWReactNativeSDK.INSTANCE.init(
this,
new FWSDKInitOptionsModel(null, FWPlayerLaunchBehavior.MuteOnFirstLaunch)
);
}
}Inject the Picasso
PreviousShare & Video Deeplinking (React Native)NextIntegrate SDKs in Hybrid React Native and native Apps
Last updated
Was this helpful?