2017년 5월 18일 목요일

Call a different camera app instead default. Error 201


I've searching the forum about "Error 201: The Camera did not return an image", but I see no solution.

My app works ok if I call default camera app, but we need to use a different one (https://play.google.com/store/apps/details?id=com.jkfantasy.gpsmapcamera) and we get the error afte pic is taken.



Is there another way of calling the app in order to get the file path? As a intent maybe?

--
how did you call that camera?
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

--
I call the Camera Component. If I choose default camera, I get the path in the label. If I choose the other cam app, get the error.

-- 
you can try to use the actvity starter
see here how to find the correct parameters
in chapter Discovering how to set the ActivityStarter properties

--
|I've searching the forum about "Error 201: The Camera did not return an image"This error will be returned if the user starts the .TakePicture method and click then the BackButton, because it doesn't return an image.

refer to: search for Error 2001

--
Thanks both of you for the answer. I will try what Taifun says, but a question: 
I read the chapter time ago, and I didn't try it because it says calling default appthrough Camera component it's the same that Camera component does. I will try anyway. 
I suppose I shoud see ActivityPackage name of the app I want to use, right?

Nico, I don't click the BackButton, but the "Accept" button. Thanks
Start the Camera
To launch the Android Camera app, use an activity starter with the IMAGE_CAPTURE Action property. You do not specify an ActivityPackage or an ActivityClass:
Action: android.media.action.IMAGE_CAPTURE

This is basically what the App Inventor Camera component does, although it is more convenient to use the Camera component than to use the ActivityStarter in building your app.

-- 
Using the Activity Starter 
in chapter Discovering how to set the ActivityStarter properties
Discovering how to set the ActivityStarter properties If you want to start an app and you you don't have the source code or documentation, you might still be able figure out the package name and class name (and sometimes the intent) by launching the app and inspecting the Android system log.For example, if you use the YouTube application to play a video, you'll see in the log:I/ActivityManager(   86): Starting activity: Intent { act=android.intent.action.VIEW dat=vnd.youtube:nAPk9ycCbfc cmp=com.google.android.youtube/.PlayerActivity }If you can find the "cmp=" string, then the ActivityPackage is the part before the slash, e.g.,  com.google.android.youtube.  The ActivityClass is is the entire "cmp=" part, without the slash character, e.g., com.google.android.youtube.PlayerActivity.   There may also in general be "dat=" information that should be specify as the DataUri property.

I normally use Eclipse and Logcat there, but if you have installed the App InventorSoftware (see also Installing and Running the Emulator in AI2), you already have everything you need to use logcat...

How to use Logcat
1. connect your device using USB with your computer
2. in File Manager go to the App Inventor directory, which is  C:∖Program Files∖App Inventor or similar
3. press Shift and right mouse click the subdirectory commands-for-Appinventor to get the context menu
4. select "open command window here" and you will get a command window of that subdirectory
5. enter adb logcat *:E and the logcat will start running and log all errors
6. start your app to elicit the error
7. copy the log (see below)

To copy your log, right click, click "select all" and enter to copy the complete log into the clipboard, then open Notepad and paste it using ctrl-v.



--
Thanks, I will try and report

--

Family Chat - a Firebase app and tutorial for live chatting


Family Chat  is a chat app tutorial using the experimental Firebase database that is available now.  Family Chat lets developers connect several users in a live chat. Family Chat allows you and your family or friends to have a live chat provided all members of your circle have a copy of this app on their phone/tablets.  You do not need a personal Firebase account to use Firebase with this sharing app.  If you want/require privacy,  a personal account may be required.
FCdeviceScreenSmall
Family Chat is an enhanced version of MIT’s Chat app described  here Brief introduction to cloud data and the FirebaseDB component   The app uses Responsive Sizing and designed on a Tablet.
 You must test this on your Android device.  Firebase apps presently will not run in the stock emulator that comes with App Inventor 2.  This is an Intermediate to advanced level Project.


Try this chat app (using the new experimental Firebase control.  Comments appreciated.

--
Nice tutorial.
This weekend, I'll have a Google doc version of my Firebase drawing app HERE (possibly along with chat).

Demo app can be downloaded from Google drive here: https://goo.gl/gGrMwR


--
Glad you guys got some samples up.

My app got bogged down with feature-itis, 
so it will be a while.

--


AiLiveComplete with Firebase!


See Firebase component in action using AiLiveComplete!

Interested in Ai2LiveComplete? Please check features and link to demo site  HERE.  Alternatively, if you have problem accessing the doc, you can check document, HERE