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


camera not working w/ASUS TF101



I filed a bug report a few years ago about the Camera not working with App Inventor and an ASUS TF101. The problem persists still with App Inventor 2 (which I really like).

What happens is the camera is able to start up and take a picture, but the "Done" button does not close the camera, only the "Cancel" button does. This prevents the image from being returned to the app.

Does anyone know of a work around for this?

Edit: Found the original report here: https://code.google.com/p/app-inventor-for-android/issues/detail?id=2035 - looks like a lot of people have the same issue and with different phones / tablets.

--

audio files list


Just curious how do I make a random list? I'm not finding the Blocks for it. I have links to my audio files and I have everything set up to make one play ...

They are good for small images and short audio selections. Bit you would probably not ... You can access files on your phone's SD (secure digital) card using file names that begin with /sdcard . You could play a song on ... It also doesn't (yet) include a way to list the files on the SDCard. You'll have to use ...

My plan was for my app to each hour get the list of files to be deleted and delete them in the background using Shell code and then close. An hour ...

I have read the tutorial on how to use a list to play two different audio sounds as one starts the other stops and this is a convenient method for two or three audio sounds however is there ... I would like to make this package several music files as a standalone Android music library Can anyone offer advice.

... the list and plays the corresponding audio file, i have two lists one for the images and one for the audio files everytime i hit next it increments the list ...

The idea that I have is recording the audio files into a sequence, when they are played on the drum kit. Then keep track ... Then I would want to save the recording into some type of list or even the tiny db that is provided. I am new to ...

ogg and mid are the smallest for audio files. Windows Paint can be used to shrink png files https://youtu.be/F4L2lFOWAWE?list= PLwM3ML90D9RXud1UyCdAyf1ojW2Pasn7c. tinypng.com can be used to compress png files.

you have to store the names of your mp3 files in a list in App Inventor to be able to play them. Taifun.

I built in a two second pause before the trigger for the video and audio files play to give the phone a chance to settle if it's busy and this has helped improve accuracy even more. BUT this seems ... My thought was I can just have a list of my timings and read and send data to the video player. But it seems ...

You get a list of valid locations, find out which ones and in what ways are they writable... And believe me ... However, this left me with a cache full of audio files that eventually clogged my internal storage... same problem. Here's how I ...

Help us with a little more explanation; When do you get the audio input warning? When your ... the size of your image and/or sound files. Most image files .... Going to that url should show you a small (possibly empty) directly listing (it will be a list of the assets that are used in the emulator). 19) You might ...


For the different error numbers, I realized that it is because ai2 is not able to load files that have spaces in the file name (Not a problem, I can fix that) ... I found that when I set the sources as simply "pick item from a list" (see screenshot below), when I am using the ai companion, the sounds play, no more ...

Ive so far created an app that will allow me to record audio, save it and display it in a list. The problem comes to when i try to annotate it. For the annotations ive created a textbox which saves the files onto my phone but the issus is that it continuesly saves ie adds onto what i previously saved instead of ...