ActivityStarter - Take a picture - not working

333 views
Skip to first unread message

CP Appi

unread,
Mar 12, 2015, 8:20:13 PM3/12/15
to mitappinv...@googlegroups.com
Hi,

I'm willing to take a picture directly with ActivityStarter (i.e. without having to call the camera and wait for the user to snap and save), and I couldn't find a way to make it work.

I always get the error 601 saying that he could not find the activity.


Action: android.intent.action.MAIN
  • ActivityPackage: com.android.camera
  • ActivityClass: com.android.camera.Camera

with no success. Can somebody please tell me what I am missing ?

I also came across a tutorial showing an app taking a serie of photos, but it uses another java app to really take them.
Does it mean that there is no other way ?

Thanks for your help.

CP.

SteveJG

unread,
Mar 12, 2015, 8:51:00 PM3/12/15
to mitappinv...@googlegroups.com
At the moment, no other way with AI2.    One of the forum members sells some code to use a separate 'helper' app in conjunction with AI2;   Another way, it might be possible to take a picture using Javascript ... there is code on the Android developers sites to do this with Eclipse and/or Android Studio but you got to search...I do not have a link.   Polish up you Java coding skills and you can create you own helper app (not a very clean way to take photos with AI2 as you need to distribute that app with your AI2 app so others can use your app); otherwise, the Camera object is available,.  Using the Camera object requires manual intervention and is not very flexible (you can not send your images to a pre-determined folder or name them, the ability to use both the front and rear cameras described in the documentation does not work with most devices, etc.. 

The other way to do take photos is to code your own plug-in for AI2..AI2 is open source software ... if you program in Java and are good, a better camera plug in would be appreciated...http://appinventor.mit.edu/appinventor-sources/  .

Regards,
Steve

Taifun

unread,
Mar 12, 2015, 9:31:25 PM3/12/15
to mitappinv...@googlegroups.com
yes, forum member SteveJG is correct, you can't take a picture programmatically with App Inventor, however forum member SteveJG is wrong in his assumption, that the aforementioned other forum member is charging for using a separate helper app...

but probably the following link of that other forum member could help
Taifun

CP Appi

unread,
Mar 12, 2015, 9:41:54 PM3/12/15
to mitappinv...@googlegroups.com
Thanks for your (feared but expected) answer.
I have been spending my last 9 hours surfing and reading all sort of contents in the web before posting, and that's what I was afraid of.

Unfortunatly, I have no skill in Java or whatsoever, then I won't be able to create any plug-in for this beautiful piece of software called AI.

Keep on making such a good job,

Thanks,

CP.


Reply all
Reply to author
Forward
0 new messages