Closed SuperUserNameMan closed 4 years ago
Hello @SuperUserNameMan
1) Did it work before? 2) Did you update the examples 3) Do you get any error?
Thanks
No it never worked on this tablet. I thought I told you already, but I might have forgot.
Oh wait ! useCamera('front')
instead of back
works this time.
It did not work at all with previous version.
So it only crash when useCamera('back')
.
And it displays no error. PHONK just close.
Thanks @SuperUserNameMan I will add a camara availabilty check before you can use it :)
@victordiaz : I've tested this example again with the new 1.2.8. It does not crash, but it does not work anymore. It displays this error :
~~[ :-( problem! ] Wrapped java.lang.NullPointerException (Camera#12)
~~
edit : nevermind, forgot to save the script after i replaced "back" with "front" into the code (since this tablet does not have back camera)
@SuperUserNameMan What is your expected behavior? I will have a deeper look these days
@SuperUserNameMan What is your expected behavior? I will have a deeper look these days
Oh sorry, nevermind ... my bad. I tested again and it works. I must have forgot to save the script before running it again into the webeditor after i replaced "back" with "front" (as my tablet does not have back camera).
Though, what do you think of this behavior for media.useCamera()
:
public PCamera useCamera(String camera) {
PCamera pCamera = new PCamera(getAppRunner(), camera);
if ( pCamera == NULL ) pCamera = new PCamera( getAppRunner(), camera == "front" ? "back" : "front" );
return pCamera;
}
Hello again,
I'm testing the new Phonk 1.2.7 on my Acer B7-A71 tablet (Android 4.1.2).
Problem description
PHONK 1.2.x crashes when running example media/camera.media.useCamera('back')
crashes PHONK because there is no back-camera.media.useCamera('front')
works.Device model Acer B7-A71 tablet
CPU : MT6517 armv7l GPU : PowerVR SGX 531 RAM : 512 MB Display : 600x1024 @ 169 dpi
Android version Android 4.1.2 API Level 16 OpenGL ES 2.0