You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/05/11 11:56:47 UTC

[GitHub] [cordova-plugin-inappbrowser] PlanB007 commented on issue #328: Can not open camera when I click input type="file" on Android devices

PlanB007 commented on issue #328:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/328#issuecomment-626656923


   > > > > @davidrevo That didn't work, keeps getting the same error
   > > > 
   > > > 
   > > > Hi @PlanB007,
   > > > Add after import android.widget.TextView the import android.content.ContentValues;
   > > > After change line private boolean isAndroidQ = Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q; to private boolean isAndroidQ = Build.VERSION.SDK_INT >= 29 and test;
   > > 
   > > 
   > > This work for me! The only issue left is I can choose between the files folder & camcorder (video only). I want to acces the camera. The HTML is used is `<input accept="image/png, image/jpeg" type="file" capture="">` any idea? In chrome it opens the camera, and not the camcorder.
   > 
   > Do you mean you want to access camera not video recorder? Need to change this
   > 
   > Intent takePictureIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
   > 
   > =>
   > 
   > Intent takePictureIntent = new Intent(MediaStore. ACTION_IMAGE_CAPTURE);
   
   This did the trick for me! A platform remove, npm install, platform add was required. You, sir, are a legend. You made my day!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org