-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API17 (Android SDK 4.2) Camera can't take photos, app crashes #87
Comments
@wiliarko please provide a sample application demonstrating the issue - I have used the demo applications and the camera is taking photos as expected. |
I'm sorry, this is a simpler video, where when the button is pressed then the camera will open and in the log will be written dead application. after the photo taken the app will look like a restart application before it was dead in the background video is the code |
i already try this aplication using my mobile phone and it not works, but if i try using another mobile phone with higher spesification it runs well |
@wiliarko it is hard to debug a code from a YouTube video :) However, I've noticed that this line
This line is placed inside the camera promise and as you are using plain JavaScript function as callback the meaning of So you can use that-this pattern and store the meaning of this. viewModel.onTap = function() {
var that = this;
// more code follows here ....
camera.takePicture().then(function(imageAsset) {
that.set("cameraImageasset", imageAsset); // note we are using **that**
})
}
|
it's code model
it's view
and it's controler
it's the new video left side is smartphone lower spesification android 4.4 asus zenfone and ram 1 GB it not works, right is emulator android 6.0 and ram 2GB it runs well |
@wiliarko I was able to reproduce the issue on device with API 17 - will investigate further and post any additional info here. Steps to reproduce: use the demo app on API17 device/emulator |
Happens also in Galaxy S5, android version 6 (6.0.1), and i pass the options: @wiliarko did you try to pass the |
Galaxy S5, android version 6 (6.0.1) +1. I tried to run the demo(which the default width and height is 300) on S5, which takes about 3 times to crash the phone. If I change the size to 900 then Its nearly crashed every time for just 1 photo. |
I've found that when the app goes to the camera it picks it up as leaving the app, and after taking the photo it goes through the app.js file when resuming the app. Just check if it hits the app.js file, then you just need to stop it from doing anything and it will go back to your last page automatically. |
I'm using angular here, doesn't have a choice to change the app.js . But I have tried on 4 android phones now, only the S5 6.0.1 have this issue. The other 3 are Android 8.0 and Android 7.0. Not sure if it's related to the OS version. |
Anyone working on this? I'm experiencing the same thing on a Google Pixel 3. |
Same problem on Xiaomi phones |
ActivityManager: START u0 {act=android.media.action.IMAGE_CAPTURE cmp=com.asus.camera/.CameraApp (has extras)} from pid 11106
ActivityManager: Process org.kct.fiberstar (pid 11106) has died.
https://www.youtube.com/watch?v=FKemwn75AYE&feature=youtu.be
the app die when i open the camera,
asus t001 (zenfone)
ram 1 GB
android 4.4.2
nativescript 3.4.2
nativescript-camera 3.2.1
tns info
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 3.4.2 │ 3.4.2 │ Up to date │
│ tns-core-modules │ 3.4.0 │ 3.4.0 │ Up to date │
│ tns-android │ 3.4.1 │ 3.4.1 │ Up to date │
│ tns-ios │ 3.4.1 │ 3.4.1 │ Up to date │
The text was updated successfully, but these errors were encountered: