How to save files in Android Mobile Application

Discussions regarding 1C:Enterprise for mobile devices with Android, iOS, or Windows Phone.

#1
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Sep 1, 2014
Company: Smart ID Dynamics

How i can save a txt file or an image form mobile platform to android device on a specific location (folder).

This is what i am trying with an image and it doesn`t work.

Code
&AtClient
Procedure GetPicture(Command)
 PictureData = Undefined;
 #If MobileAppClient Then
  PictureData = MultimediaTools.MakePhoto();
 #EndIf
 
 If PictureData <> Undefined Then
  Try
   BinaryD = PictureData.GetBinaryData();
   BinaryD.Write("/sdcard/1C/testImage.jpg");
  Except
   DoMessageBox("Image cannot be saved!", 3, "Error");
  EndTry;
 EndIf;
EndProcedure

Edited: Marius Gidu - Aug 03, 2015 05:00 AM
 
#2
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Sep 1, 2014
Company: Smart ID Dynamics

Done. Path "/sdcard/1C/testImage.jpg"was not correct.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.