Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3212492
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:50:38+00:00 2026-05-17T14:50:38+00:00

I am writing an Android 1.5 application which starts just after boot-up. This is

  • 0

I am writing an Android 1.5 application which starts just after boot-up. This is a Service and should take a picture without preview. This app will log the light density in some areas whatever. I was able to take a picture but the picture was black.

After researching for a long time, I came across a bug thread about it. If you don’t generate a preview, the image will be black since Android camera needs preview to setup exposure and focus. I’ve created a SurfaceView and the listener, but the onSurfaceCreated() event never gets fired.

I guess the reason is, the surface is not being created visually. I’ve also seen some examples of calling the camera statically with MediaStore.CAPTURE_OR_SOMETHING which takes a picture and saves in the desired folder with two lines of code, but it doesn’t take a picture too.

Do I need to use IPC and bindService() to call this function? Or is there an alternative method to achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:50:38+00:00Added an answer on May 17, 2026 at 2:50 pm

    it is really weird that camera on android platform can’t stream video until it given valid preview surface. it seems that the architects of the platform was not thinking about 3rd party video streaming applications at all. even for augmented reality case the picture can be presented as some kind of visual substitution, not real time camera stream.

    anyway, you can simply resize preview surface to 1×1 pixels and put it somewhere in the corner of the widget (visual element). please pay attention – resize preview surface, not camera frame size.

    of course such trick does not eliminate unwanted data streaming (for preview) which consumes some system resources and battery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an Android application that interfaces with a RESTful service. This web
Hello I was just writing a little Android application which takes an image from
I'm writing a simple Android application that needs some text which should be written
I'm writing a custom camera application which follow this tutorial: http://marakana.com/forums/android/examples/39.html Now I'm able
I've followed this tutorial: http://anandhansubbiah.com/blog/writing-your-first-android-application/ , but no matter what I do, and what
I am writing an Android application in which I'll have to create a video
I wondered if anybody had encountered this problem. I'm writing an application for Android
I am writing event based android application in which I start main thread which
Hi I am writing an Android application in which I want to retrieve the
I'm writing an application. It has a Service which is started using a receiver

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.