Browse File or Capture Image and Upload to server using Cordova Inappbrowser in Phonegap

640 views
Skip to first unread message

ap...@naklabs.com

unread,
Sep 10, 2015, 9:45:35 AM9/10/15
to phonegap

I am using Cordova Plugin Inappbrowser to run my external website on device. In this external website I need to upload an Image (Gallery/Capture camera) or file on server. For this I have implemented HTML5 File API to make this feature run into my app too. I have tried various demo 1,demo 2 and tried this URL open into IAB to test; unfortunately they didn't work earthier inside my app. Whereas if I try to open these two demo in native browsers like Chrome, safari, firefox apps into my device these demo are allowing me to perform File API.

So can anyone help me to fix this issue........

jcesarmobile

unread,
Sep 10, 2015, 10:00:01 AM9/10/15
to phonegap
As I already told you on stack overflow, the only way to get a file on the inAppBrowser plugin is using input type file and it doesn't work on some android devices.

Using crosswalk plugin on android devices should work too

Jesse Monroy

unread,
Sep 11, 2015, 1:45:22 AM9/11/15
to phonegap
@ap,
please let us know if Crosswalk works for your task.

FYI, for Phonegap CLI you will be using the Crosswalk Plugin (See: Notes for upgrading to cli-5.1.1 on PGB (Phonegap Build)) In addition, according to the documentation for InAppBrowser, you cannot use other Phonegap Plugins, as quoted here:
The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs.
But of course you are using, the
HTML5 File API
and not the
Phonegap File API

, so I'm very curious if this works.

TIA
Jesse
Reply all
Reply to author
Forward
0 new messages