Jump to content
Android Forum - A Community For Android Users and Enthusiasts

Upload File WebView KitKat 4.4.4


Recommended Posts

Hi to everyone,

I have a forum via phpbb3 and I use webview and filechooser for uploading photos.

Everything working fine except if I use android with KitKat. The uploading photo from device doesn't working. (appears image%3A23127)


I use this code

// openFileChooser for Android < 3.0
		        public void openFileChooser(ValueCallback<Uri> uploadMsg){
		            openFileChooser(uploadMsg, "");
		        //openFileChooser for other Android versions
		        public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) {
		            openFileChooser(uploadMsg, acceptType);

		        //The webPage has 2 filechoosers and will send a console message informing what action to perform, taking a photo or updating the file
		        public boolean onConsoleMessage(ConsoleMessage cm) {        
		            onConsoleMessage(cm.message(), cm.lineNumber(), cm.sourceId());
		        	//Toast.makeText(getBaseContext(), cm.message()+" :message", Toast.LENGTH_LONG).show();
		            return true;
		        public void onConsoleMessage(String message, int lineNumber, String sourceID) {
		            //Log.d("androidruntime", "Per cςnsola: " + message);
		            //Toast.makeText(getBaseContext(), message+":message", Toast.LENGTH_LONG).show();
		            //if(message.endsWith("foto")){ boolFileChooser= true; }
		            //else if(message.endsWith("pujada")){ boolFileChooser= false; }

Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...