You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Debasish Choudhury <de...@gmail.com> on 2021/06/08 05:06:41 UTC

Re: Android Issue with File Reading

Hi Team Cordova,

Request you guys to help us with a solution for the following issue, at the
earliest.

Thanks & regards,
Debasish Choudhury
(+91 9845966939)


On Sun, Jun 6, 2021 at 1:11 PM yogeshwer ganeshe <yo...@gmail.com>
wrote:

> Hi Cordova Team,
>
> Hope you are doing well !!!
>
> We have developed Mobile apps using Cordova in 2015 for our Android
> developers.
> We were using the below nodejs code to read the existing file from the
> android file system.
>
> Now, from the last few months we are facing issues while reading the file
> in new mobile devices.
> Can you guys please help us understand what can be the issue.
>
>
> --------------------------------
> uploadData : function(){
> document.addEventListener("deviceready", sd.onDeviceReady, false);
> },
> onDeviceReady : function() {
> window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, sd.gotFS, sd.fail);
> },
> gotFS : function(fileSystem) {
> fileSystem.root.getFile("/test/data/read.txt", null, sd.assetFileEntry,
> sd.assetFileNotFound);//data/assetDetails.txt
> /strikedart/data/assetDetails1.txt
> },
> assetFileEntry : function (fileEntry){
> fileEntry.file(sd.assetFilePresent, sd.assetFileNotFound);
> },
> assetFilePresent : function(file) {
> var reader = new FileReader();
> reader.onloadend = sd.populateData;
> reader.readAsText(file);
> },
> populateData : function (evt) {
> alert("data----"evt.target.result);
> }
> ---------------------------------
> Thank you guys, looking forward for your response.
>
> Thanks & Regards,
> Yogeshwer Ganeshe
>