dindinudin Posted December 5, 2013 Posted December 5, 2013 hi all, i am using UniGUI 0.93 + Delphi XE3 + Isapi + Apache 2.2 how to save picture to local storage Android device using UniGUI+PhoneGAP ? when I using UniGUI+PhoneGAP (become APK File) , it does not save to local storage Android device. i have tried : 1.using UniSession.SendStream method. result : with Chrome Browser save to local storage Android device, with apk application nothing happen. code : procedure TMenuFrm.UniButton1Click(Sender: TObject); var S : TFileStream; begin S:=TFileStream.Create('d:/picture/world.jpg',fmOpenRead); try UniSession.SendStream(S, 'world.jpg'); finally S.Free; end; end; 2.using UniLabel1.Caption:='<a href="'+'pic/world.jpg'+'" download>Click here to download</a>' result : with Chrome Browser save to local storage Android device, with apk application showing the picture only. 3. UniLabel1.Caption:= '<form><input type="button" value="Download Now" onClick="window.location.href=''pic/world.jpg''" ></from>'; result : with Chrome Browser showing the picture only, with apk application showing the picture only. reference may be related : http://docs.phonegap.com/en/edge/cordova_file_file.md.html#File http://stackoverflow.com/questions/6417055/download-files-and-store-them-locally-with-phonegap-jquery-mobile-android-and-io http://stackoverflow.com/questions/7254033/phonegap-download-file-from-url-to-sdcard help me please best regards Quote
dindinudin Posted January 27, 2014 Author Posted January 27, 2014 dear all, i found this article about downloading file : http://examples.extjs.eu/?ex=download would anyone explain how to implement in UniGUI ? regards Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.