@jcmendes98 wrote:
My question is that, if it is possible to get a variable from a
.properties
or.txt
file. I need that in order to save theendPoint
, the server IP address. That way, every time that the IP address is changed, all you need to do is change the IP on the file, instead of compile the code again and build the apk, and install it again on the device. Any tips will be welcome.import { File } from '@ionic-native/file'; async test(){ this.promise = this.file.readAsText('file:///data/','ipAddress.txt'); await this.promise.then(value => { console.log(value) }).catch(error=> console.log("nao existe")) }
Receiving the following error :
ERROR Error: Uncaught (in promise): FileError: {"code":1,"message":"NOT_FOUND_ERR"}
I do .checkDir and so, i know that the path is correct. Even though i can’t read the file.
Posts: 1
Participants: 1