[Q] Accessing camera flash - Android Software Development

Howdy all,
I am writing a simple flashlight app as an assignment for a class at school. The class is "Application Development for Mobile Computing".
We were told to have a white screen and options for different colors and then to add something creative on our own. I would like to use the camera flash as that creative element.
I have done my research and scoured this forum, but I can't seem to find anything. I have found that I should use this function within the Java code:
Camera.Parameters.FLASH_MODE_TORCH
But I can not get it to start the light. It just causes a FC. Can anyone give me some direction on this?
Thanks, all.
Moose

I haven't looked through it but this could be useful - https://github.com/CyanogenMod/android_packages_apps_Torch

Related

Midlet programming and the XDA2 Camera

Hi,
Has anyone had any luck with writing Midlets for the XDA2? I'm trying to write one use the camera as a webcam (Yes, I know, a bit ambitious for my secomd midlet!)
I'm using this line:
Code:
Player vPlayer = Manager.createPlayer("capture://video");
I get a MediaException, meaning '...a Player cannot be created for the given locator.' (quoted from MMAPI JavaDoc).
Also, calling the Manager.getSupportedProtocols() method for 'mpeg/video' returns an empty list, as does calling Manager.getSupportedContentTypes() for 'capture://video'.
Has anyone else managed to access the XDA2 camera from a Midlet? If so, what is the trick?!!
cheers
Paul
I don't think anybody's managed to get access to it from native eVC++ let alone midlets, and IA style aren't revealing anything about how their app does it, so I wouldn't hold your breath for a solution... Bloody closed APIs.
Knackers!! :evil:
Cheers anyway! I'll keep poking and see what happens....
Paul
i suspect that their applications take pretty much control direct without using the winCE api
because when i start the cam my clock which it still display stop being 24h and turn to the AM/PM confusement

Storyboarding applictaion?

Hi all.
Does anyone know of an application for creating storyboards on my HD2? Basically, i'm looking for something that will allow me to take a photograph of a location and add simple icon based instructions for camera moves, actor postioning and so on in a sort of slideshow format. I'd also want to be able to record audio notes or dialogue onto it and set timings for stuff so I can see how the pacing is. Then I'd like to be able to export it to my laptop for printing.
There's plenty around for Windows proper, but having it on the laptop doesn't have the portability that I'd like. Googling hasn't really helped (it's possible that I just need more practice!) - there doesn't seem to be anything around.
Any suggestions?
(edit - sorry - I meant to put this in the 'themes and apps' forum. I also meant to spell 'application' right in the title! Any kind mod that wants to address my inadequacies is welcome! )
Storyboarding appliction
Ok, I'll admit it, I'm mostly bumping my own thread, but I did just come across this iPhone app which does the job: http://www.cinemek.com/storyboard/index.php

[Q] need help with wallpaper app

hello I am wondering if someone can help. I would like to create a simple wallpaper test app. I have tried a few things with no success. eventually I started playing with gallery codes and have a few achievements. but...I am not sure how to attach a wallpaper function to the gallery. i am new to all this (I am only a few months into learning Droid apps with eclipse) is there someplace where I can find complete java coding and possibly the xml files for a working wallpaper? I cannot build from scratch but I am getting better reading the source code creating buttons etc etc.
another option is how can I insert a save as wallpaper function to the working gallery I have? I am assuming I can set a long press function but I am not sure how to go about that either. I do have a tutorial for creating long presses but I am not sure about the proper java setup to accompany this.
any help will be appreciated. keep in mind I am new to both java and android coding. in other words keep it as simple as possible please. or if someone has a simple wallpaper app and they don't mind sharing the source code... that would help immensely..

Any ideas on how to take over the screen

Hello everyone!
I'm researching a little bit for a project at my university. I've got loads of books to educate myself, but instead of just going through them from the very beginning I would like to better orient myself. Any insights you might have would be very appreciated!
Basically I'm thinking about a way to make the screen respond to what's happening to the phone, independently of the app running in the foreground at any given moment. For example
the phone drops under the table where it's dark and the phone's screen begins flashing to make it easy to find,
you tap the side of the phone, or swirl it around playing a game, and the screen tints itself red giving an impression of taking in some damage
Obviously this would have to be an app connected for example to the accelerometer, able to modify or overlay what's currently being displayed. Is that stuff even possible?
I'm not expecting a solution here Just some brainstorming ideas that would send me in the right direction. Names of classes, sections of documentation, stuff like that. Thank you!
Do you look for ideas on how to overlay the screen? That's really easy. Look for WindowManager and System_Alert_Window.
But I don't know how you could code the other thing. For example a few devices have a light sensor which you can use - but for more complex actions this will be difficult.
Thank you EmptinessFiller I´m not really looking to launch popups.
I´m looking for a way to tap into the software or hadrware renderer and for example adjust brightness or tint the entire screen. Something my own, buggy CAT B15 does once in a while when I turn hardware accelleration on (it paints every interface item in a funny colour).
This would pertain more towards modifying the OS itself and creating a customized version of Android
Read this article a while ago whilst looking for stuff on surfaceflinger...might be of use to you....
http://jsharkey.org/blog/2010/07/01/android-surfaceflinger-tricks-for-fun-and-profit/
Sent from my AllianceROM'd S5
Excellent Goldie, thank you very much. That´s exactly the type of pointer that i needed!

[HELP] Android unlock mechanism

Hi,
I'm new in Android environment, but I have some experience with Java programming. I want to try some mobile apps, so i started to writing my first game. Everything is ok, but I don't know how to create mechanism like in "maze" Android unlock screen (can't put any link with photo ). I have list of points on screen and I want to give user ability to draw a path between these points. I've heard that there is special listener for this, but I can't find that.
Thanks for your help and sorry for my English
chris_black
chris_black said:
Hi,
I'm new in Android environment, but I have some experience with Java programming. I want to try some mobile apps, so i started to writing my first game. Everything is ok, but I don't know how to create mechanism like in "maze" Android unlock screen (can't put any link with photo ). I have list of points on screen and I want to give user ability to draw a path between these points. I've heard that there is special listener for this, but I can't find that.
Thanks for your help and sorry for my English
chris_black
Click to expand...
Click to collapse
Don't know it at the top of my head either, but checkout the source of this lockpattern library, I'm sure you can find out how they did it

Categories

Resources