?
Solved

'action' buttons in Android camera overlay camera preview

Posted on 2012-08-19
6
Medium Priority
?
1,637 Views
Last Modified: 2013-11-17
I am having trouble finding any code or simple way to create an 'action' button in the camera overlay/surface view in Android. For instance, I would need a button to be visible in the camera preview mode to turn on the flash and keep the flash on. I want to make this an app to create some fun photo projects I am going to share on my blog. So when a person would turn on the camera they would touch the button that is labeled with a light bulb and it would turn the light (flash) on, and keep it on. I tried the app inventor but its so basic you cant put any kind of overlay in it. Or can you? I imagine this has to be programmed in xml or java. I know neither language! There are apps that make use of the camera flash as a flashlight app so I know it can be done, it just has to work with the camera preview. Anyone interested in helping please let me know. I figured I would talk to all my fellow experts first before I take the day off to try and figure this out. You guys always come up with some kind of solution! Thanks!
0
Comment
Question by:jeffmeverett
  • 3
  • 3
6 Comments
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 38312115
try to use RelativeLayout placing inside a view with camera surface and then whatever controls you want over it
0
 

Author Comment

by:jeffmeverett
ID: 38312278
What would 'relative layout' mean. I am a total novice only using the basic App Inventor. I could not figure out how to overlay any other control buttons in the camera view. I do not know if modifying this view in a program as simple as AppInventor is possible.  If you have any solutions or other editors/emulators to use please let me know! I am trying to gather as much feedback as possible to see if I can pull this off myself,but I am such a novice I dont know if its possible. I am open to seeking help from a developer as well. Thoughts and advice are very welcome. I need to get this app finished soon for my photography blog.
0
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 2000 total points
ID: 38312320
hmm, from the sound of it - better ask some Android developer for help, otherwise you'd need to learn it yourself (not that it's rocket science). I'm not sure App Inventor is up to this task.

RelativeLayout - see here: http://developer.android.com/reference/android/widget/RelativeLayout.html

To give you some example that it is quite possible to do, have a look at https://play.google.com/store/apps/details?id=com.pecan&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5wZWNhbiJd
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:jeffmeverett
ID: 38312410
Yeah its time for a developer I think ,I am short on time this morning so I will take a look later but I just may not be able to figure it out. Thanks for the info. I plan on contacting the pecan developer. Any more suggestions are welcome.  I will leave the thread open till tomorrow and then award points. If you know of any other suites to develop on besides AppInventor please let me know. Thanks!
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 38312568
well, it all depends on what you need. for camera usage - it'll be 'native' app anyway, be it Java or anything else (like PhoneGap or Mono).
0
 

Author Comment

by:jeffmeverett
ID: 38312996
What I need is the easiest way to get the camera open on the phone and into preview mode. Then I need to map 3 buttons to a specific function that will allow the special effects to be created when taking a picture.  One effect button for sure has to keep the flash on, the others.... I am working on what they will exactly be. As I stated I got the camera app built on app inventor but I need the actual camera preview to have the buttons so a person can line up the shot with the light on. I am working on posting the work on Odesk and such but I trying here first was my initial thought. If you know anyone or suggest any app developers pass them on! I am sure people on Experts Exchange are looking anyway.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Virtualization software lets you run different versions of Windows, Ubuntu Linux and other versions of Linux all at the same time, rather than running each one directly from your computer's hard drive.
Ready to kick start your career in 2018? Add app developer skills to your resume. January’s Course of the Month features Android App Development training with hands-on learning.  Read on to learn why these skills are important.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question