Skip to content
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

timob-8899: Android: showCamera - does not work on htc sensation #2102

Closed
wants to merge 2 commits into from

Conversation

pingwang2011
Copy link
Contributor

https://jira.appcelerator.org/browse/TIMOB-8899
Test case in jira.
For functional test, please run the test case with / without "saveToPhotoGallery: true" and with / without SD card. It can be tested using any phone, not just HTC sensation.

@hieupham007
Copy link
Contributor

I'm still getting the error running on DroidX v8, https://gist.github.com/a83e327efbb6d27435bc, without SD card.

@pingwang2011
Copy link
Contributor Author

Yes, the error message still shows in the log when there is no SD card because we can not create the image file. But the error message won't stop camera from showing up.

@hieupham007
Copy link
Contributor

I'm not seeing the camera showing, just a JS error dialog:
04-30 17:54:45.308 6113 6131 W System.err: java.lang.NullPointerException: uriString
04-30 17:54:45.308 6113 6131 W System.err: at android.net.Uri$StringUri.(Uri.java:420)
04-30 17:54:45.308 6113 6131 W System.err: at android.net.Uri$StringUri.(Uri.java:410)
04-30 17:54:45.308 6113 6131 W System.err: at android.net.Uri.parse(Uri.java:382)
04-30 17:54:45.308 6113 6131 W System.err: at ti.modules.titanium.media.MediaModule.showCamera(MediaModule.java:256)
04-30 17:54:45.308 6113 6131 W System.err: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
04-30 17:54:45.308 6113 6131 W System.err: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:60)
04-30 17:54:45.308 6113 6131 W System.err: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:494)
04-30 17:54:45.308 6113 6131 W System.err: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:675)
04-30 17:54:45.308 6113 6131 W System.err: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:398)
04-30 17:54:45.308 6113 6131 W System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
04-30 17:54:45.308 6113 6131 W System.err: at android.os.Looper.loop(Looper.java:130)
04-30 17:54:45.308 6113 6131 W System.err: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104)

@pingwang2011
Copy link
Contributor Author

Our platform has a special check for HTC phone. That's why I can not see the crash with my HTC Sensation. For functional test, please run the test case on HTC phone and also on non-HTC phone.

@hieupham007
Copy link
Contributor

So this only fixes HTC but not the rest?

@hieupham007
Copy link
Contributor

Tested on HTC, works fine w/o SD card, but doesn't work on non-HTC w/o SD card

@pingwang2011
Copy link
Contributor Author

My fix is supposed to work for any phone. But I don't have a non-HTC phone with me right now, so I can not test. Do you still get the JS error dialog on non-HTC phone w/o SD card?

@pingwang2011
Copy link
Contributor Author

Tested on a Samsung phone (2.3.7) without SD card with my fix and it passed. Expected behavior is: the camera shows with a message on the screen "please insert SD card". At the same time the IOExeption is caught and the error message is printed in the logcat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants