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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:35:55+00:00 2026-06-03T04:35:55+00:00

I have a Droid X, which has a physical camera button. I am using

  • 0

I have a Droid X, which has a physical camera button. I am using the example used here: http://marakana.com/forums/android/examples/39.html

The app sort-of works. The on-screen button captures and displays the preview image. But if I push the physical camera button, the app crashes.

How should I handle this, and more importantly – is this going to cause problems across different devices that do / do not have physical buttons?

  • 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-06-03T04:35:57+00:00Added an answer on June 3, 2026 at 4:35 am

    You need to override onKeyDown in your Activity

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
    
        if(event.getAction() == KeyEvent.ACTION_DOWN)
        {
            switch(keyCode)
            {
            case KeyEvent.KEYCODE_CAMERA:
               // handle the event here
            }
        }
    
        return super.onKeyDown(keyCode, event);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
I have an android app for which i need to ensure that it has
In my application I have many classes and activities. Droid is a class which
I have the following AndroidManifest file... <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android package=net.obviam.droidz android:versionCode=1 android:versionName=1.0
I have been writing apps for my Droid x2 using the new Android update
I am attempting to have an opacity effect on my div which has a
Have a matrix report now that has Position, Hours and Wages for a location
Have you ever had to justify the choice over using .NET instead of Java
I have an application which is of size 130MB. when i try to install
i have created application using layout font sizes in pixels font and other layout

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.