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 6963101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:44:45+00:00 2026-05-27T15:44:45+00:00

Based on this article, I’m trying do capture the photo from camera on Android

  • 0

Based on this article, I’m trying do capture the photo from camera on Android Emulator. I followed the instructions as per they said. But I didn’t get the positive result.

I’m getting the Player is null, while I’m running the WebcamBroadcaster.java(Java Application).

Is anyone achieve this before? If yes, Just let me how to do.

Or

Is there any other option to capture the photo from camera on Android Emulator?

  • 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-27T15:44:46+00:00Added an answer on May 27, 2026 at 3:44 pm

    In Android emulator 2.1 my code is working to capture image but not working in others version of android

    To start camera for capture you can start camera for capture using below intent filter

    Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
    startActivityForResult(i, CAMERA_RESULT);
    

    After capturing you will get the image as bitmap so you need to get activity result

    if (resultCode == RESULT_OK && requestCode == CAMERA_RESULT) {
        Bundle extras = data.getExtras();
        if(extras.containsKey("data")) {
            Bitmap bmp = (Bitmap) extras.get("data");
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            bmp.compress(Bitmap.CompressFormat.PNG, 100, baos);
            byte[] image = baos.toByteArray();
            if(image != null) {
                //User this byte array in your application
            }
        }else {
            Toast.makeText(getBaseContext(), "Fail to capture Image", Toast.LENGTH_LONG).show();
        }
    }
    

    Edit:

    Now almost in all the emulators this code is working.

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

Sidebar

Related Questions

I'm trying to use PowerShell with web deployment based on this article This is
Based on this drag/drop article: http://delphi.about.com/od/adptips2005/qt/dropontimage.htm I'm trying to catch an image dragged from
I am trying to create LinqToSql classes based on this article http://msdn.microsoft.com/en-us/library/bb425822.aspx I couldn't
Based on this article , it seems like SO is using Javascript OpenID Selector
I happened across this article about hardware based hard drive encryption and realized that
When I saw this article about using a python-like sintax (indentation based, without curly
I'm implementing a Announcement system that is loosely based on this article: https://web.archive.org/web/20211020111733/https://www.4guysfromrolla.com/articles/110409-1.aspx One
I am trying to use the code in this article that lets you know
Based on this article http://www.codeproject.com/KB/linq/bindinglist_sortable.aspx I implemented my bussines object with sortable feature. When
I want to make my session cookie HttpOnly . Based on this article ,

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.