I there a way to getting picture(image) from URL without downloading? I use the code below to get streaming video and audio. But it doesn't work with picture.
public static void IntentPlayer(Context context, Uri uri, int mode){
String type;
switch(mode){
case 1: type = "video/*"; break;
case 2: type = "audio/*"; break;
case 3: type = "image/*"; break;
default: return;
}
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setDataAndType(uri, type);
context.startActivity(intent);
}
LogCat:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://192.168.43.1:6789/mobile_base/Tulips.jpg typ=image/* flg=0x10000000 }
I don't want to download a file before I open it. I'll appreciate your answers. Thanks.