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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:07:47+00:00 2026-05-28T05:07:47+00:00

I am using the API 2.1 and my debug shows a max zoom value

  • 0

I am using the API 2.1 and my debug shows a max zoom value of 15. The code here does not make the camera zoom. How do I get the camera to zoom?

camera = Camera.open();
Camera.Parameters parameters = camera.getParameters();
parameters.set("orientation", "portrait");
parameters.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_TWILIGHT);
int zoom = parameters.getMaxZoom();
Log.d(TAG, "Zoom " + zoom);
parameters.setZoom(15);
camera.setParameters(parameters);
  • 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-28T05:07:48+00:00Added an answer on May 28, 2026 at 5:07 am

    This functionality depends on your Android version.
    The method parameters.getMaxZoom() has been appeared since: API Level 8 (Android 2.2), so if you use Android 2.1 this code won’t work.
    And another thing. You should use your max zoom something like that parameters.setZoom(zoom); instead using constant parameters.setZoom(15);

    Also you need to check that user’s device support zooming. You can do it like this (only for Android 2.2 and higher)

       Camera.Parameters parameters = camera.getParameters();
       int maxZoom = parameters.getMaxZoom(); 
       if (parameters.isZoomSupported()) {
          if (zoom >=0 && zoom < maxZoom) {
            parameters.setZoom(zoom);
          } else {
            // zoom parameter is incorrect
          }
       }
    

    But as I know there are no standard API for setting zoom in Android 2.1 I am still investigating this question.

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

Sidebar

Related Questions

I am using the api twitterizer2 downloaded from http://code.google.com/p/twitterizer/downloads/list but when I try to
I am using an API which provides a Java version but not a Python
I'm using the Graph API Explorer to help debug my app. All I'm doing
I tried to grab my Facebook ID using open graph API. It is working
Can you call a vb.net api function using reflection from javascript code? I just
I am using the Java Debug Interface API to write the custom programs for
I am using API written in C++ in my code (writting in C#). API
I'm using ASIHTTPRequest API to get some JSON data from a web side. I'm
I'm creating a small service using api-libraries, such as Twitter. Is it possible to
I am using Scribd API (www.scribd.com) to display the PDF files in my website.

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.