Giter Club home page Giter Club logo

cordova-plugin-wezka-nativecamera's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-wezka-nativecamera's Issues

Crashes on Android 2.3

getSize is not supported in 2.3

E/AndroidRuntime( 2282): java.lang.NoSuchMethodError: android.view.Display.getSize
E/AndroidRuntime( 2282):    at com.wezka.nativecamera.CameraActivity.onCreate(CameraActivity.java:130)
E/AndroidRuntime( 2282):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 2282):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
E/AndroidRuntime( 2282):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)

Android 6.0.1 API 23

Manufacturer: SWIPE
Model: Elite Power
Board: Msm8909
Android API: 23
Android OS: 6.0.1
Brand: Swipe
RAM: 1.87GB
Orientation: Portrait

Exception java.lang.NullPointerException: Attempt to invoke virtual method 'void android.hardware.Camera.release()' on a null object reference
com.tmantman.nativecamera.CameraActivity.restartPreview (CameraActivity.java:351)
com.tmantman.nativecamera.CameraActivity$2.onClick (CameraActivity.java:213)
android.view.View.performClick (View.java:5211)
android.view.View$PerformClick.run (View.java:21170)
android.os.Handler.handleCallback (Handler.java:739)
android.os.Handler.dispatchMessage (Handler.java:95)
android.os.Looper.loop (Looper.java:148)
android.app.ActivityThread.main (ActivityThread.java:5417)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616)

Image freezes sometimes

I can't reproduce this one, but the preview image displayed freezes sometimes. Locking phone and re-opening does not work, but switching cameras does.

DATA_URL

Even using destinationType: destinationType.DATA_URL the callback function is returning FILE_URI.

SurfaceView getHolder returns null sometimes causing crash

Apparently surfaceView operations should be done in onResume, not onCreate:

http://stackoverflow.com/questions/4852740/surfaceview-getholder-not-returning-surfaceholder

  "STACK_TRACE": "java.lang.NullPointerException\n\tat com.wezka.nativecamera.CameraActivity.initPreview(CameraActivity.java:372)\n\tat com.wezka.nativecamera.CameraActivity.access$1300(CameraActivity.java:55)\n\tat com.wezka.nativecamera.CameraActivity$6.surfaceChanged(CameraActivity.java:420)\n\tat android.view.SurfaceView.updateWindow(SurfaceView.java:545)\

Is DATA_URL Supported?

Just writing to ask whether or not the DATA_URL destination type is supported in this new plugin?

Null pointer crash on startup occasionally

java.lang.NullPointerException
E/AndroidRuntime(13415): at com.wezka.nativecamera.CameraActivity$6.surfaceChanged(CameraActivity.java:412)

      camera.setDisplayOrientation(90);

Capture photo not working

First time I start my camera I can't capture the photo. But if I lock / unlock my screen then try it works.
Even if i flip to front camera and try it works.
Any hints on how to fix this?

Android version : 4.4.4

Unable to start activity

I'm not sure if this is something from my own project being incorrect or a problem with the plug-in but I'd appreciate help in debugging this. When attempting to use the getPicture function the app crashes with this message in log cat

E/AndroidRuntime( 7280): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.text2drive.ethereal.dev/com.wezka.nativecamera.CameraActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x0
E/AndroidRuntime( 7280): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198)
E/AndroidRuntime( 7280): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
E/AndroidRuntime( 7280): at android.app.ActivityThread.access$800(ActivityThread.java:139)
E/AndroidRuntime( 7280): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
E/AndroidRuntime( 7280): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 7280): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 7280): at android.app.ActivityThread.main(ActivityThread.java:5086)
E/AndroidRuntime( 7280): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 7280): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 7280): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime( 7280): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime( 7280): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 7280): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
E/AndroidRuntime( 7280): at android.content.res.Resources.getValue(Resources.java:1123)
E/AndroidRuntime( 7280): at android.content.res.Resources.loadXmlResourceParser(Resources.java:2312)
E/AndroidRuntime( 7280): at android.content.res.Resources.getLayout(Resources.java:939)
E/AndroidRuntime( 7280): at android.view.LayoutInflater.inflate(LayoutInflater.java:395)
E/AndroidRuntime( 7280): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
E/AndroidRuntime( 7280): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
E/AndroidRuntime( 7280): at android.app.Activity.setContentView(Activity.java:1937)
E/AndroidRuntime( 7280): at com.wezka.nativecamera.CameraActivity.onCreate(CameraActivity.java:91)
E/AndroidRuntime( 7280): at android.app.Activity.performCreate(Activity.java:5248)
E/AndroidRuntime( 7280): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
E/AndroidRuntime( 7280): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)

it seems like a resource id isn't be set so that when trying to find the activity for the camera it is unable to. I'm not sure if there's an installation step I'm missing or perhaps a file that is not being correctly generated.

Should autofocus before taking photo

It is continually autofocusing, which is good. However, if the user taps the shutter button, it will immediately take a blurry picture without trying to focus first.

Simple example

hi,

Firstly thanks a ton for the useful plugin. Can I have a simple / sample code on how to use this plugin? I am totally new to android / java development and learning to add plugins. I am using a Mobile Backend Service for creating my app and it already has the default camera plugin installed. So I just want to make sure that I am starting right

thanks,
M&M

Does not build with crosswalk

Trying to build with crosswalk + ionic framework. Getting build error -

:compileDebugJava/Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/src/com/wezka/nativecameraplugin/NativeCameraLauncher.java:29: error: cannot find symbol
import org.apache.cordova.ExifHelper;
^
symbol: class ExifHelper
location: package org.apache.cordova
/Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/src/com/wezka/nativecameraplugin/NativeCameraLauncher.java:149: error: cannot find symbol
rotate = exif.getOrientation();
^
symbol: method getOrientation()
location: variable exif of type ExifHelper
/Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/src/com/wezka/nativecameraplugin/NativeCameraLauncher.java:251: error: cannot find symbol
exif.resetOrientation();
^
symbol: method resetOrientation()
location: variable exif of type ExifHelper
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 errors
FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileDebugJava'.

    Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 12.508 secs

/Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/gradlew with args: assembleDebug,-b,/Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR running one or more of the platforms: Error: /Users/nakumar/Desktop/DwellMartServer/dwellmartoperationsapp/platforms/android/cordova/run: Command failed with exit code 8
You may not have the required environment or OS to run this project

Can't find image on Android 4.4.3

W/System.err( 6830): java.io.FileNotFoundException: No such file or directory
W/System.err( 6830):    at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146)
W/System.err( 6830):    at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:611)
W/System.err( 6830):    at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:922)
W/System.err( 6830):    at android.content.ContentResolver.openOutputStream(ContentResolver.java:669)
W/System.err( 6830):    at android.content.ContentResolver.openOutputStream(ContentResolver.java:645)
W/System.err( 6830):    at com.wezka.nativecamera.NativeCameraLauncher.onActivityResult(NativeCameraLauncher.java:179)
W/System.err( 6830):    at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:897)

Failure delivering ResultInfo

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=null} to activity {co.mwater.clientapp/co.mwater.clientapp.mWater}: java.lang.NullPointerException
  at android.app.ActivityThread.deliverResults(ActivityThread.java:3525)
  at android.app.ActivityThread.handleSendResult(ActivityThread.java:3568)
  at android.app.ActivityThread.access$1100(ActivityThread.java:162)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
  at android.os.Handler.dispatchMessage(Handler.java:107)
  at android.os.Looper.loop(Looper.java:194)
  at android.app.ActivityThread.main(ActivityThread.java:5371)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:525)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
  at dalvik.system.NativeStart.main(Native Method)\nCaused by: java.lang.NullPointerException
  at co.mwater.foregroundcameraplugin.ForegroundCameraLauncher.scaleBitmap(ForegroundCameraLauncher.java:271)
  at co.mwater.foregroundcameraplugin.ForegroundCameraLauncher.onActivityResult(ForegroundCameraLauncher.java:198)
  at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:897)
  at android.app.Activity.dispatchActivityResult(Activity.java:5311)
  at android.app.ActivityThread.deliverResults(ActivityThread.java:3521)
  ... 11 more\njava.lang.NullPointerException
  at co.mwater.foregroundcameraplugin.ForegroundCameraLauncher.scaleBitmap(ForegroundCameraLauncher.java:271)
  at co.mwater.foregroundcameraplugin.ForegroundCameraLauncher.onActivityResult(ForegroundCameraLauncher.java:198)
  at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:897)
  at android.app.Activity.dispatchActivityResult(Activity.java:5311)
  at android.app.ActivityThread.deliverResults(ActivityThread.java:3521)
  at android.app.ActivityThread.handleSendResult(ActivityThread.java:3568)
  at android.app.ActivityThread.access$1100(ActivityThread.java:162)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
  at android.os.Handler.dispatchMessage(Handler.java:107)
  at android.os.Looper.loop(Looper.java:194)
  at android.app.ActivityThread.main(ActivityThread.java:5371)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:525)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
  at dalvik.system.NativeStart.main(Native Method)

Phonegap Build Support

Hey,

Just writing to see if this new plugin can be submitted to phonegap build. While I do not intend to use this right away (I'd rather let this project mature some more), it will be helpful for when it's ready for production use.

Thanks,
David

TURN OFF CAMERA FLASH

Once camera flash is on, it not became off anymore.

I need to turn off my device to turn off flash.

crash on android 4.4

Device : CANVAS UNITE 2 (A106)
Android Version : 4.4
java.lang.RuntimeException: Unable to resume activity {com.myapp.android/com.wezka.nativecamera.CameraActivity}: java.lang.RuntimeException: Fail to connect to camera service at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2964) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2993) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5292) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.RuntimeException: Fail to connect to camera service at android.hardware.Camera.native_setup(Native Method) at android.hardware.Camera.<init>(Camera.java:469) at android.hardware.Camera.open(Camera.java:424) at com.wezka.nativecamera.CameraActivity.onResume(CameraActivity.java:331) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1197) at android.app.Activity.performResume(Activity.java:5343) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2950) ... 12 more

Support for picking images from the gallery

It looks like the plugin works well, I'll still have to test on other phone that usually crash when using the original plugin.
The only problem is that we also need support for picking images from the gallery, and with this plugin it just starts the camera. Is there any easy way to have the gallery back?
I saw the same request on another fork of the camera plugin: mWater/cordova-plugin-camera-foreground#9

Thanks.

How to use it?

How to actually use it?

i installed it in my angular cordova project, and I am using $ngCordova which uses Camera. But the problem still persists. Actually I think the problem now is even worse, every time I open camera my app closes due to inactivity. Do I need to do anything special to make it work?

Thanks

Wezka Camera Issue in Android 6.0.1

Hi Team,

While capturing the image , the image is not displaying in the VIEW, I have the following Logcat
Please refer and let me know for more information.

10-07 07:04:42.010 5918 5918 W ExifInterface: Invalid image.

10-07 07:04:42.010 5918 5918 W ExifInterface: java.io.EOFException

10-07 07:04:42.010 5918 5918 W ExifInterface: at java.io.DataInputStream.readByte(DataInputStream.java:77)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.media.ExifInterface.getJpegAttributes(ExifInterface.java:1599)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.media.ExifInterface.loadAttributes(ExifInterface.java:1339)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.media.ExifInterface.(ExifInterface.java:1057)

10-07 07:04:42.010 5918 5918 W ExifInterface: at com.wezka.nativecamera.ExifHelper.createOutFile(ExifHelper.java:83)

10-07 07:04:42.010 5918 5918 W ExifInterface: at com.wezka.nativecamera.NativeCameraLauncher.onActivityResult(NativeCameraLauncher.java:435)

10-07 07:04:42.010 5918 5918 W ExifInterface: at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120)

10-07 07:04:42.010 5918 5918 W ExifInterface: at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:320)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.app.Activity.dispatchActivityResult(Activity.java:7137)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.app.ActivityThread.deliverResults(ActivityThread.java:4916)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.app.ActivityThread.handleSendResult(ActivityThread.java:4963)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.app.ActivityThread.access$1600(ActivityThread.java:221)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1848)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.os.Handler.dispatchMessage(Handler.java:102)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.os.Looper.loop(Looper.java:158)

10-07 07:04:42.010 5918 5918 W ExifInterface: at android.app.ActivityThread.main(ActivityThread.java:7224)

10-07 07:04:42.010 5918 5918 W ExifInterface: at java.lang.reflect.Method.invoke(Native Method)

10-07 07:04:42.010 5918 5918 W ExifInterface: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

10-07 07:04:42.010 5918 5918 W ExifInterface: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

10-07 07:04:42.010 5918 5918 I NativeCameraLauncher: Bitmap not compressed

10-07 07:04:42.010 5918 5918 W System.err: java.io.EOFException

10-07 07:04:42.010 5918 5918 W System.err: at java.io.DataInputStream.readByte(DataInputStream.java:77)

10-07 07:04:42.010 5918 5918 W System.err: at android.media.ExifInterface.saveJpegAttributes(ExifInterface.java:1730)

10-07 07:04:42.010 5918 5918 W System.err: at android.media.ExifInterface.saveAttributes(ExifInterface.java:1388)

10-07 07:04:42.010 5918 5918 W System.err: at com.wezka.nativecamera.ExifHelper.writeExifData(ExifHelper.java:180)

10-07 07:04:42.010 5918 5918 W System.err: at com.wezka.nativecamera.NativeCameraLauncher.onActivityResult(NativeCameraLauncher.java:436)

10-07 07:04:42.010 5918 5918 W System.err: at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120)

10-07 07:04:42.010 5918 5918 W System.err: at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:320)

10-07 07:04:42.010 5918 5918 W System.err: at android.app.Activity.dispatchActivityResult(Activity.java:7137)

10-07 07:04:42.010 5918 5918 W System.err: at android.app.ActivityThread.deliverResults(ActivityThread.java:4916)

10-07 07:04:42.010 5918 5918 W System.err: at android.app.ActivityThread.handleSendResult(ActivityThread.java:4963)

10-07 07:04:42.010 5918 5918 W System.err: at android.app.ActivityThread.access$1600(ActivityThread.java:221)

10-07 07:04:42.010 5918 5918 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1848)

10-07 07:04:42.010 5918 5918 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102)

10-07 07:04:42.010 5918 5918 W System.err: at android.os.Looper.loop(Looper.java:158)

10-07 07:04:42.010 5918 5918 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7224)

10-07 07:04:42.010 5918 5918 W System.err: at java.lang.reflect.Method.invoke(Native Method)

10-07 07:04:42.010 5918 5918 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

10-07 07:04:42.010 5918 5918 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

10-07 07:04:42.010 5918 5918 I NativeCameraLauncher: failPicture:Error compressing image

NullPointerException crash at CameraActivity.java:415

java.lang.NullPointerException
  at com.wezka.nativecamera.CameraActivity.initPreview(CameraActivity.java:415)
  at com.wezka.nativecamera.CameraActivity.access$1300(CameraActivity.java:57)
  at com.wezka.nativecamera.CameraActivity$7.surfaceChanged(CameraActivity.java:463)
  at android.view.SurfaceView.updateWindow(SurfaceView.java:545)

phonegap build and npm

Hi,

could you publish your plugin to npm?
I am using phonegap build and can just use plugins from npm or phonegabBuild.

Would be nice to see this great plugin on npm!

Thanks
Bastian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.