2017년 3월 21일 화요일

can't take picture using camera using ASUS Transformer T101


◼ Steps to reproduce the problem.

Create an app with a camera and a button.

⦁ What happened. (Don't just say: "It didn't work.")

On the button click event, call the camera.takepicture method.
The camera will start and you can take a picture, however the camera activity will not close by pressing the "Done" button, only hitting "Cancel" on the camera will return to the app inventor app, and no resulting image is returned.
This appears to be a problem related to the ASUS TF101 Transformer, as an identical app works on other tables (thrive and phones). I have written a java app to do the exact same thing and it works on the ASUS.

Comment #1
The exactly same thing happens to me as well. Does any one know how to fix it?

Comment #2
What kind of android device are you using? This doesn't work on the ASUS TF101, however it works on my thrive tablet and numerous phones we tested it on.

Comment #3
I can confirm that the same thing is happening to me. When you take a picture with a TF101, the 'Done' button won't close the camera app. Same app works fine with my Galaxy S 2 phone.

Comment #4
Any fix idea for tablet cameras not working? My T-mobile Springboard 7" tablet does not return to the app properly.

Comment #5
Hey Did anyone fix this issue :) ?

Comment #6
I suspect it was a previous version of Android on the TF101. The Done button works on Android 4.03. See this project which was tested on the TF101: https://groups.google.com/forum/?fromgroups=#!category-topic/app-inventor-developers-library/media-components-camcorder-camera-imagepicker-player-sound-videoplayer/dfiSE3BCsfk

Comment #7
I have the TF700T and I have this same problem.

Comment #8
I have the same problem; I guessed that may be either the device, the android OS version, device's camera program or camera picture's storage directory path are the main issues.

I am using Samsung Note II and the Android version 4.1.1

I attached my test code for reference.
Attachments
⦁ takePicture.zip 2.28KB

Comment #9
I have the same issue on the component of ImagePicker; After I picked the image, my phone goes back to home page - not the app.

Comment #10
Similar problem here - Galaxy Note N7000 under Android 4.0.4. When developing (phone connected via WiFi or USB) the camera app starts, but returns to home page; when installing as app, camera returns to app properly. However in both cases no image is returned, independent of camera app used, or storage path.

Comment #11
Posted on May 7, 2013 by Happy Giraffe
Comment deleted
Attachments
⦁ AI Camera Helper.apk 155.84KB
⦁ AICameraTest.apk 1.26MB
⦁ AICameraTest.zip 2.48KB

Comment #12
I believe I have a solution for everyone. Since I never was able to get it to work in App Inventor... and I have the benefit of knowing a little Android programming, I created a helper application that you install alongside the AI app to take photos to the save location of your choosing. When you want to take a photo, you use an ActivityStarter with the following properties:

ACTION: android.intent.action.MAIN ActivityClass: com.chrisandjanette.camera.helper.MainActivity ActivityPackage: com.chrisandjanette.camera.helper ExtraKey: storeLoc ResultName: returnVal

Then you set the ActivityStarter.ExtraValue to the file path and name, example: /sdcard/TestFolder/Picture1.jpg
It must end in '.jpg'. If you specify a folder that doesn't already exist, the helper application will ask you if you want to create it. Once called, you can use the ActivityStarter.AfterActivity to see if the user took a photo or not. If they successfully took a photo, it returns 'Picture' otherwise it returns 'NoPicture'.
I've included the helper application, an example app inventor application, and the source of the app inventor example. Hope this is helpful!
Attachments
⦁ AICameraTest.apk 1.26MB
⦁ AICameraTest.zip 2.48KB

Comment #13
I have the same problem. Your helper application really helps a lot! THANKS!

Comment #14
Comment deleted

Comment #15
Comment deleted

Comment #16
Need fix because i work with different models Phone and Tablet

Comment #17
Did you try the helper app I posted in Post #12?

Comment #18
Working on it right now. But working with different model Tabs so need to build 2 version of the app now. This isn't nessecary. Posted this problem to asus to i think the problem is in the camera driver by Asus

Comment #19
Called asus, they couldn't adress this problem and are not planning to do something about this.

Comment #20
Worked on the work around but doesn't work. I need the picture taken as a canvas background.

Comment #21
The work around should be fine. I haven't used App Inventor in a while, but if memory serves me, the camera activity in AI is no different. It just saves a picture somewhere. The helper app does just that, then you can call the after intent event (same as after camera) and load it to the canvas.

Comment #22
Nope work around doesn;t work. I know now Package is com.asus.camera and Class is com.asus.camera.CameraApp

Comment #23
Would the author of the helper app be willing to share the source code?

I'm an AI developer, and I'd like to compare it against what the camera component is doing to activate the built-in camera app, just to see.

Comment #24
This issue is being discussed on the new App Inventor user forum here: camera not working w/ASUS TF101


댓글 없음:

댓글 쓰기