Questions tagged [flashlight]

Most phones (and even tablets) have one or more camera/s. For optimal lighting, a white LED (or more than one) is used to illuminate the scene and act as a flash light.

Most phones (and even tablets) have one or more camera/s. For optimal lighting, a white LED (or more than one) is used to illuminate the scene and act as a flash light.
Some apps use this LED to turn the device into a portable torch.

369 questions
0
votes
1 answer

Flashligth LED cannot be turned on in Galaxy S2 (JB)

I'm working on an app which will turn on the flash light LED of the handsets. The code is general: cam = Camera.open(); cam.setPreviewTexture(new SurfaceTexture(0)); camPara =…
kit
  • 31
  • 1
  • 3
0
votes
3 answers

My flashlight app keeps crashing when going to homescreen

My flashlight app is keep crashing when turn on the light and go to the homescreen, or use the back button or even when I turn on the screen, it doesn't crash right away; when I go back to the app, I press the button to turn off/on the light and it…
user3125900
0
votes
1 answer

Change Android Camera flashlight color

I have a simple app which turns on/off the flash light, but curious if there are any hue settings I can play around with to change the color of the light. This is my code to turn on the flashlight; private void turnOnFlash() { if (!isFlashOn) { …
SoftwareEnthusiast
  • 271
  • 2
  • 9
  • 26
0
votes
2 answers

After phone lock flashlight app stop flashing

I tried a code below but it just prevents screen to be slept. Window window = getWindow(); WindowManager.LayoutParams params = window.getAttributes(); window.setAttributes(params); window.addFlags( …
Axay Prajapati
  • 791
  • 5
  • 20
0
votes
1 answer

How to click other buttons while thread is sleeping

The problem I am having right now is that when I click a button in my app, that app stays pressed down and I cannot click any other buttons, such as one to stop the thread. Right now the app is just flashing the camera light (strobe light) and it…
Pythagoras
  • 25
  • 3
0
votes
0 answers

How To Toggle Android Camera Flash On Microphone Audio Capture?

The following code works. It makes the camera flash to blink on any audio captured by the Android phone microphone. It works on Samsung Galaxy S Duos. All I want is to make it more stable because of the presence of the thread. package…
superlinux
  • 476
  • 1
  • 4
  • 12
0
votes
2 answers

camera.cancelAutoFocus will not return or throw exception

I am testing an android application on a samsung gt i8260, a samsung s4 and a sony ericsson xperia mini st15i. The application at some point of the code while on preview mode and autofocusing constantly (callback calls camera.autoFocus again every…
Stavros Zotalis
  • 718
  • 4
  • 24
0
votes
1 answer

Flashlight windows phone 8 c#

I am a beginner who is trying to make a flashlight app for windows phone. I have added a single button in the XAML, and this is the c#-code: private async void Button_Click(object sender, RoutedEventArgs e) { CameraSensorLocation…
user3173015
0
votes
3 answers

How to assign a Button to processOnClick?

the code with the process is not the best, or it's too complicated for enabling Camera. i desided to change to something easyer. this is it package app.technozed.androlighter; import android.app.Activity; import android.hardware.Camera; import…
George Lungu
  • 125
  • 2
  • 4
  • 16
0
votes
0 answers

where should I release the camera in my android activity

I am making an android flashlight app. I it has two activities, a main activity and a settings activity where the camera led can be toggled on and off. It also has another class where all the camera changes are handled like opening it, releasing it,…
0
votes
0 answers

Exception throws in turning on flashlight - Camera in running mode

I am testing my Camera app on Samsung Galaxy Camera, but while i am trying to ON Flash getting Exception throws in turning on flashlight, because i am using this message in catch block.. Note:- Camera always in running mode So why i am not able…
Sun
  • 6,768
  • 25
  • 76
  • 131
0
votes
2 answers

Android start flash in zxing library

i made an android app using zxing library for barcode scan. barcode reader start when i tap on button, this is the code: //scan mScanBtn = (Button)findViewById(R.id.scan); mScanBtn.setOnClickListener(new View.OnClickListener() { …
0
votes
1 answer

Null Pointer Exception - Custom Camera with Flash Light

In my program i want to allow user to capture multiple Images back to back, but once i do tap on Capture button getting Null Pointer Exception (NPE). I have created a Custom Camera. If i will remove the flash light code from my existing code, then…
Sun
  • 6,768
  • 25
  • 76
  • 131
0
votes
0 answers

IOS - LED Strobe Flashlight Slider iPhone

Hi i am making a flashlight app in Objective C for iPhones, i have got some basic features such as an LED dimming slider and a button to turn the flashlight on and off but i wanted to add a second slider to add a strobe light effect where sliding…
CoconidoHD
  • 27
  • 6
0
votes
2 answers

FlashLight Widget Crash

Tried to write widget for my Android app. onUpdate: @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { RemoteViews remoteViews = new…
ZanMax
  • 365
  • 4
  • 13