Okhttp Not Downloading The File
I am using okhttp for downloading video from server. there is no error no exception but the file is not downloading every where but it seems as it is. Here is the code: OkHttpClie
Solution 1:
So there is no problem in my code but the path. Thanks @greenapps who made me think about path/ directory.
Basically I just change the path to a real one instead of cache and yup here is the video.
Changed this line
File file = new File(getCacheDir(), user_Videos.get(i).video_title + ".mp4");
to this
File file = new File(Environment.getExternalStorageDirectory(), user_Videos.get(i).video_title+ ".mp4");
Thanks @greenapps for the clue.
Post a Comment for "Okhttp Not Downloading The File"