cordova-plugin-filepath
cordova-plugin-filepath copied to clipboard
Error: column '_data' does not exist
Hello,
I'm sharing file from other apps to my cordova app.
When I share from explorer app, i've got the file uri such as :
file:///sdcard/Audio/SoundRecorder/2019-03-04%2019-36-03.aac
but when I share from 3rd party app (whatsapp in my example), I don't receive a file uri :
content://com.whatsapp.provider.media/item/100492
and then i got “column ‘_data’ does not exist”
this.filePath.resolveNativePath(receivedFile).then((rslt) => {
console.log('reslt');
}).catch((error) => { console.log("error", error) }); //error column '_data' does not exist
ionic info
Ionic:
ionic (Ionic CLI) : 4.8.0
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.8
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 6.3.0, browser 5.0.3, ios 4.5.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 1.2.1
System:
Android SDK Tools : 26.1.1
NodeJS : v8.11.3
npm : 5.6.0
OS : Linux 4.15
Can you help me ?
thanks
I did a pull request to fix this https://github.com/hiddentao/cordova-plugin-filepath/pull/53
@marvin-SL thanks a lot! I had to add <framework src="commons-io:commons-io:2.4" />
in the plugin.xml to make it work though.
Thank you @mpadmaraj ! I will add it to the PR later this day
Edit:Added !
@marvin-SL did you find any solution,can you please tell me I am also facing same situation,please reply
@marvin-SL did you find any solution,can you please tell me I am also facing same situation,please reply
Hello, yes here https://github.com/hiddentao/cordova-plugin-filepath/pull/53
@marvin-SL Oh thank you so much for your reply, I am getting FileNotFoundException in below line context.getContentResolver().openInputStream(uri),I have already imported files,but I am getting the error
@marvin-SL ,I am also getting this error,When I shared the from one third party app to my ionic app,i.e Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference
When do we see a merge for the pr #53 ?