#1 2016-06-08 11:30:11

ehsan_khoshkharam
Member
Registered: 2016-02-28
Posts: 3

agenda sample

hi

how can i backup or restore contacts information to a json/txt file... agenda sample


tnx

Offline

#2 2016-06-08 14:36:13

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: agenda sample

Hello,

Thanks again for your interest in my work. You can use the File plugin for Apache Cordova and the "File*" related actions like FileWrite. Or you can use an HttpClient control to post the JSON to your app's server.

Offline

#3 2016-06-12 14:24:55

ehsan_khoshkharam
Member
Registered: 2016-02-28
Posts: 3

Re: agenda sample

hi David and tnx for ur answer...
can u help me with this
i want add something in UpdateLocalStorage function to save all array content in a json file
if its possible

if not plz help me how to do it
i want to make a backup file and restore it to app from a json file

im not professional

tnx...

Offline

#4 2016-06-12 15:23:12

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: agenda sample

Hello,

We can deal with text files if our application is build firstly with Apache Cordova. You can use the StrSerialize action to get an string form an Array or Object variables, then you can save that string into a text file using the Files* related actions of the Files Cordova's plugin, included "out of the box" in App Builder.

Of course you can also read such text file and, with the help of the StrUnserialize action, get back your Array or Object variables.

On the other hand, if you are talking about a web application, not a Cordova builded application, then we can't deal with files, because browser's vendors does not allow us to do that for security reasons. In this last case you need to upload the text (serialized) into your app server, using the HttpClient control, for example.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.