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-23230]: Implement cameraready event #8039

Merged
merged 1 commit into from Jun 3, 2016

Conversation

hieupham007
Copy link
Contributor

@ashcoding
Copy link
Contributor

Code reviewed and functionally tested to be working.

I'm using an Android 6.0 and getting a weird error though in the logs. It doesn't crash.:-

06-02 22:29:15.888  4242  4242 D MediaScannerReceiver: action: android.intent.action.MEDIA_SCANNER_SCAN_FILE path: /storage/emulated/0/Pictures/CrashThis/tia-446513973.jpg
06-02 22:29:15.896  5867  5867 E TiBlob  : (main) [1187,2616] null
06-02 22:29:15.896  5867  5867 E TiBlob  : java.io.IOException
06-02 22:29:15.896  5867  5867 E TiBlob  :  at java.io.InputStream.reset(InputStream.java:208)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at org.appcelerator.titanium.TiBlob.guessAdditionalContentTypeFromStream(TiBlob.java:239)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at org.appcelerator.titanium.TiBlob.guessContentTypeFromStream(TiBlob.java:214)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at org.appcelerator.titanium.TiBlob.loadBitmapInfo(TiBlob.java:270)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:140)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:113)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at ti.modules.titanium.media.TiCameraActivity$4.onPictureTaken(TiCameraActivity.java:759)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1092)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at android.os.Handler.dispatchMessage(Handler.java:102)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at android.os.Looper.loop(Looper.java:148)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at android.app.ActivityThread.main(ActivityThread.java:5417)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at java.lang.reflect.Method.invoke(Native Method)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-02 22:29:15.896  5867  5867 E TiBlob  :  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
06-02 22:29:15.898  5867  5867 D TiProperties: (main) [2,2618] getBool called with key:run-on-main-thread, def:false
06-02 22:29:15.900  5867  5883 D TiProperties: (KrollRuntimeThread) [2,2620] getBool called with key:run-on-main-thread, def:false
06-02 22:29:15.901  5867  5883 I TiAPI   :  GOT SUCCESS CALLBACK
06-02 22:29:15.906  5867  5867 D TiProperties: (main) [6,2626] getString called with key:ti.ui.defaultunit, def:system
06-02 22:29:15.906  5867  5867 D TiProperties: (main) [0,2626] getBool called with key:run-on-main-thread, def:false
06-02 22:29:15.906  5867  5867 D TiBaseActivity: (main) [0,2626] Activity ti.modules.titanium.media.TiCameraActivity@61d73d2 onPause
06-02 22:29:15.907  5867  5883 I TiAPI   :  3120 4160 411 502 7.591240875912408 8.286852589641434 7.591240875912408 411 548
06-02 22:29:15.939   373  1280 E mm-camera-intf: mm_camera_poll_thread_del_poll_fd: invalid handler 11264 (0)

@ashcoding
Copy link
Contributor

I don't think it's related to your PR.

@ashcoding
Copy link
Contributor

Checked with 5.2.2.GA, same error message.

[ERROR] :  TiBlob: (main) [449,5770] null
[ERROR] :  TiBlob: java.io.IOException
[ERROR] :  TiBlob:  at java.io.InputStream.reset(InputStream.java:208)
[ERROR] :  TiBlob:  at org.appcelerator.titanium.TiBlob.guessAdditionalContentTypeFromStream(TiBlob.java:239)
[ERROR] :  TiBlob:  at org.appcelerator.titanium.TiBlob.guessContentTypeFromStream(TiBlob.java:214)
[ERROR] :  TiBlob:  at org.appcelerator.titanium.TiBlob.loadBitmapInfo(TiBlob.java:270)
[ERROR] :  TiBlob:  at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:140)
[ERROR] :  TiBlob:  at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:113)
[ERROR] :  TiBlob:  at ti.modules.titanium.media.TiCameraActivity$3.onPictureTaken(TiCameraActivity.java:563)
[ERROR] :  TiBlob:  at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1092)
[ERROR] :  TiBlob:  at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] :  TiBlob:  at android.os.Looper.loop(Looper.java:148)
[ERROR] :  TiBlob:  at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] :  TiBlob:  at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  TiBlob:  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] :  TiBlob:  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Looks like an unrelated issue from this. Will create a ticket to have this looked at separately.

@ashcoding
Copy link
Contributor

Code reviewed and functionally tested.
Approved

@ashcoding ashcoding merged commit ddf5400 into tidev:master Jun 3, 2016
@hansemannn
Copy link
Collaborator

@ashcoding Can you file a ticket for that error? As it seems to be reproducible.

@ashcoding
Copy link
Contributor

Ticket was created earlier at https://jira.appcelerator.org/browse/TIMOB-23473

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

3 participants