I'm downloading some images from my webservice using the below code and it works perfectly fine but after they are downloaded and copied to sd card, they are unknown file types although they have .jpg at the end and my application still can load them into imageviews but I can't open any of those downloaded images via the device's gallery from file manager. Any idea?

Here's how I download and save the images:

```
public void downloadImage(String url, String fileName) {
    try {
        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
                .permitAll().build();
        StrictMode.setThreadPolicy(policy);
        String[] fileNameSplit = fileName.split("\\.");
        String fileNameMobile = fileNameSplit[0] + "-mob." + fileNameSplit[1];

        URL urlConnection = new URL(url);
        URLConnection connection = urlConnection.openConnection();

        InputStream in = connection.getInputStream();

        File outFile = new File(file.getPath() + "/" + fileNameMobile);
        OutputStream out = new FileOutputStream(outFile);

        copyFile(in, out);
        out.close();
        in.close();

    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }

}

```

example file name in directory browsed by file manager:

```
_58df8aa6dbb44ff7b870b49a4b2d8efb-mob.jpg

```