Caused by java.lang.RuntimeException: All available Cronet providers are disabled. A provider should be enabled before it can be used.
at org.chromium.net.CronetEngine$Builder.getEnabledCronetProviders(CronetEngine.java:365)
at org.chromium.net.CronetEngine$Builder.createBuilderDelegate(CronetEngine.java:327)
at org.chromium.net.CronetEngine$Builder.<init>(CronetEngine.java:75)
at com.vidyakul.exodownload.DownloadUtil.getHttpDataSourceFactory(DownloadUtil.kt:50)
at com.vidyakul.exodownload.DownloadUtil.ensureDownloadManagerInitialized(DownloadUtil.kt:126)
at com.vidyakul.exodownload.DownloadUtil.getDownloadManager(DownloadUtil.kt:82)
at com.vidyakul.exodownload.MyDownloadService.getDownloadManager(MyDownloadService.kt:35)
at androidx.media3.exoplayer.offline.DownloadService.onCreate(DownloadService.java:599)
@Synchronized
fun getHttpDataSourceFactory(context: Context): HttpDataSource.Factory {
if (!DownloadUtil::httpDataSourceFactory.isInitialized) {
httpDataSourceFactory = CronetDataSource.Factory(
CronetEngine.Builder(context).build(),
Executors.newSingleThreadExecutor()
)
}
return httpDataSourceFactory
}
I am getting this crash on android apps mostly on api 24<=.
On internet this is only solution avilable.
implementation "androidx.media3:media3-datasource-cronet:1.1.1"
implementation "androidx.media3:media3-exoplayer:1.1.1"
implementation "androidx.media3:media3-ui:1.1.1"
implementation 'androidx.media3:media3-exoplayer-hls:1.1.1'
I tried this method but still getting How can you get a location in android when all location providers are disabled? LocationManager has a method, getlastknownlocation. From the documentation this method: "Returns a Location indicating the data from the last known location fix obtained from the given provider. This can be done without starting the provider" However this method only returns a ...