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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:44:51+00:00 2026-06-12T15:44:51+00:00

I know how minSdkVersion and targetSdkVersion work, but I need confirmation in this concrete

  • 0

I know how minSdkVersion and targetSdkVersion work, but I need confirmation in this concrete case (I don’t want to accidently overlook anything).

My app (game) supports all devices from Android 2.2 and above. Up to now, minSdkVersion and targetSdkVersionwere set to 8 (i.e. API level 8, which corresponds to Android 2.2).

One of my Views works significantly smoother if hardware acceleration is turned on for it, but I can’t set it in the project, because it requires API level 11. (How did I notice it then? One of my test devices offered a checkbox “force GPU mapping” in Developer Settings, so when I ran my app, I noticed the difference.)

I suppose the solution is to set targetSdkVersion to 11 (but keep the minSdkVersion at 8), and from code, check if we’re running on API level 11 or above, and then enable HW acceleration for the View (Window). The last step is what requires the higher API level, because otherwise FLAG_HARDWARE_ACCELERATED is not recognized in the source code.

Assuming all my code uses only minSdkVersion APIs (except when checking the platform version for exceptional calls at runtime, such as the hardware acceleration), is it guaranteed that there won’t be issues on devices below targetSdkVersion? (Due to the above solution, I mean.) I would like to avoid that my app doesn’t work properly on pre-Honeycomb devices. (Note that I test my app on a wide scale of devices in terms of platform versions, too, so testing is not a problem.)

  • 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-12T15:44:53+00:00Added an answer on June 12, 2026 at 3:44 pm

    In your Activity, use this line to set Hardware Acceleration for your window if it is API level 11 or higher:

    if( Build.VERSION.SDK_INT >= Build.HONEYCOMB ) {
        getWindow().setFlags(
        WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
        WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
    }
    

    EDIT:
    As an answer for your edit, Android Lint might throw an error saying it is not meant for the TargetSDK, but it will work and not throw any exception for older versions. If it does, the version is somehow > 10, and that cannot be possible.

    But you should update your TargetSDK, because by using hardware acceleration, you are aiming for a higher API target.

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

Sidebar

Related Questions

I know this is a pretty basic question, but I don't know how to
Know this might be rather basic, but I been trying to figure out how
I know that this sort of question has been asked here before, but still
i know this is a stupid question but i d'ont know how to do
I know theres a lot of posts about redirects but this is a little
I know that the heading of this thread sound silly, but I can not
I don't know why this is happening. When i check the DDMS there is
I know this is a very simple question for you experts,but please forgive me.Im
I have an Android application with this lines in the manifest: <uses-sdk android:minSdkVersion=8 android:targetSdkVersion=13/>
I know this is silly question, but i am just stuck with this: 1.I

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.