Jump to content

How to save picture to Android Device using UniGUI+PhoneGAP ?


dindinudin

Recommended Posts

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>';
 

 

 

 

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...