From 5dd5a90f37db80d1b922017d43a44df81575c04c Mon Sep 17 00:00:00 2001 From: Sergii Ivanchenko Date: Sun, 29 Jan 2017 15:15:56 +0200 Subject: [PATCH] change files location to app-folder --- frontEnd/src/providers/global.ts | 6 +++++- frontEnd/src/providers/local-data-save-service.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontEnd/src/providers/global.ts b/frontEnd/src/providers/global.ts index a117c63..1d70788 100644 --- a/frontEnd/src/providers/global.ts +++ b/frontEnd/src/providers/global.ts @@ -12,6 +12,9 @@ import {File} from 'ionic-native'; See https://angular.io/docs/ts/latest/guide/dependency-injection.html for more info on providers and Angular 2 DI. */ + +declare var cordova: any; + @Injectable() export class Global { @@ -28,7 +31,8 @@ export class Global { public geoLocationSessionData: any = []; public phoneUUID: string = ""; // public errContent: string = ""; - public appFilesDirectory: string = "file:///storage/emulated/0/"; + // public appFilesDirectory: string = "file:///storage/emulated/0/"; + public appFilesDirectory: string = cordova.file.externalDataDirectory; public appLogFile = "log.csv"; public errorLogFile = "errorLog.csv"; public appCSVFile = "data" + ".csv"; diff --git a/frontEnd/src/providers/local-data-save-service.ts b/frontEnd/src/providers/local-data-save-service.ts index dc36ee1..d22c6b4 100644 --- a/frontEnd/src/providers/local-data-save-service.ts +++ b/frontEnd/src/providers/local-data-save-service.ts @@ -50,7 +50,7 @@ export class LocalDataSaveService { // let folderpath = cordova.file.externalApplicationStorageDirectory; - let folderpath = cordova.file.externalDataDirectory; + // let folderpath = cordova.file.externalDataDirectory; // let folderpath = "file:///storage/emulated/0/";