Images from dropbox won't load, a model must be added to support DROPBOX:// and other similar paths.
@VishalNehra I believe you were working on this?
Test with current master on my Oneplus One running Slim7 (7.1.2).
Onedrive and Dropbox are both working. Possibly due to the way I setup my phone, I couldn't link my Google Drive account with Amaze, so can't tell... but I think it should also work.
Outside the cloud plugin, images can also be opened over SFTP connections, but not over SMB connections... but it didn't happen with Galaxy S2 running SlimLP (5.1.1).
On 7.1.2 app would crash of android.os.NetworkOnMainThreadException.
@TranceLove this issue was for loading of icons not the images themselves. I'm already working on this in another branch.
Any progress, can I help?
I might need some help over here. Will let you know after a few more tries. Basically, we're loading icons on main thread now, it throws NetworkOnMainThread exception when loading cloud icons. I've written models and helper classes to pool the requests and load them in background. But now icons are not being loaded at all.
Like I said, will let you know if I fail this weekend.
News? At least upload a fix branch to the repo...
Will update the branch once I finalize. I've managed to pinpoint the problem and fix is almost been worked up.
I now see there's branch fix-glide-iconloading for this. I still don't understand why you implemented your own threaded solution to download (in IconLoaderUtil) I would imagine Glide already has one...
Please point me to it then.
You don't tell me where you got stuck... So I've read your code, side by side with the official guide.
I will write what I think are mistakes:
@Override
public boolean handles(InputStream inputStream) {
return true;
}
@Nullable
@Override
public LoadData<InputStream> buildLoadData(InputStream inputStream, int width, int height, Options options) {
return new LoadData<>(new ObjectKey(System.currentTimeMillis()), new InputStreamDataFetcher(inputStream));
}
loadData is not doing the loading?-- source
@Override
public void loadData(Priority priority, DataCallback<? super InputStream> callback) {
callback.onDataReady(inputStream);
}
Maybe Advanced Usecases will help you, anyways, the code is very long and I'm trying to not have to understand it all, because multi-threading can be very tiering for me, please do tell me WHERE you are stuck/don't know how to not reinvent the wheel.
Thank you, your last advice about loadData handling all the heavy work for icon loading really helped as I seem to have skipped it while reading documentation.
I've made a PR which should fix this issue.