Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise. Mobile platform > How to save files in Android Mobile Application

Forum

Search UsersRules
How to save files in Android Mobile Application
#1
Active user
Points:: 0
Joined:: Sep 1, 2014

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

Profile
#2
Active user
Points:: 0
Joined:: Sep 1, 2014

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

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.