Hi 
I am working on a projet where i have to download image. I do not 
understand why on the device simulator i succed in download image but when 
i install the app in my 
android mobile phone i can not download image. Here is the code i use to 
download the image.

public void Download(String token,String format,String matricule,String 
annee,String mois) throws IOException{
         
        
        
        String url= 
"http://195.24.198.42/handlers/mycenadiapi.ashx?matricle="+matricule+"&type=getslipImage&dtype="+format+"&sy="+annee+"&sm="+mois+"&r=0&token="+token;
                

        String home = FileSystemStorage.getInstance().getAppHomePath();
        char sep = FileSystemStorage.getInstance().getFileSystemSeparator();
        FileSystemStorage.getInstance().mkdir(home + sep + 
"photos"+sep+"images");
        
Util.downloadUrlToFile(url,home+sep+"photos"+sep+"images"+sep+"photos.jpeg", 
true);
        String filename = home+sep+"photos"+sep+"images"+sep+"photos.jpeg";
        InputStream stream = 
FileSystemStorage.getInstance().openInputStream(filename);
        OutputStream out = 
FileSystemStorage.getInstance().openOutputStream(home+sep+"mphoto.jpeg");

        Util.copy(stream, out);
        Util.cleanup(stream);
        Util.cleanup(out);
        Display.getInstance().execute(home+sep+"mphoto.jpeg");
        
    }

please i need your help


-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/6c3c508a-47e7-47e3-a0ae-f3c39870df18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to