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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:55:40+00:00 2026-06-17T08:55:40+00:00

I have an android app which was running good on HoneyComb but on ICS

  • 0

I have an android app which was running good on HoneyComb but on ICS it’s not working properly. I have google map and on top of that I am creating radar effect using the circles (circles’ radius keep on increasing giving kind of water wave effects.) The code is below:

class ShowRadar extends AsyncTask<Void, Void, RadarView>
        {

            private Context ctx;
            private int radius;
            private GeoPoint gp;
            private MapView mv;
            ShowRadar(Context ctxt, MapView mv, int radius, GeoPoint gp)
            {
                this.ctx = ctxt;
                this.radius = radius;
                this.gp = gp;
                this.mv = mv;
            }

            @Override
            protected RadarView doInBackground(Void... params) 
            {
                RadarView rdView = new RadarView(ctx, mv, gp, radius);
                LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
                rdView.setLayoutParams(lp);

                return rdView;
            }

            @Override
            protected void onPostExecute(RadarView result) {
                if(this.radius <= 10000)
                {
                    if(this.radius < 50)
                    {
                        this.radius += 50;
                    }
                    else if(this.radius < 100)
                    {
                        this.radius += 100;
                    }
                    else if(this.radius < 500)
                    {
                        this.radius += 500;
                    }
                    else
                    {
                        this.radius += 1000;
                    }
                }
                else
                    this.radius = 10;

                if(radarUpdated || radarCount > 1000)
                {
                    if(radarCount > 1000 && !radarUpdated)
                    {
                        Toast.makeText(mContext, "Delay in response, wait a while", Toast.LENGTH_SHORT).show();
                    }
                    radarCount = 0;
                    if (oldrd != null) {
                        rel.removeView(oldrd);
                        oldrd = null;
                    }

                }
                else
                {
                    radarCount++;

                    if(oldrd != null)
                    {
                        rel.removeView(oldrd);
                    }
                    oldrd = result;
                    rel.addView(result);

                    new ShowRadar(ctx, mv, this.radius, gp).execute();

                }
            }
        }
        new ShowRadar(mContext, mapView, 10, center).execute();

And below is the code for RadarView

  public class RadarView extends View {

private int circleRadius = 500;
private GeoPoint p;
public RadarView(Context context) {
 super(context);
 init();
}

public RadarView(Context context, MapView mv, GeoPoint pt, Integer radius)
{
    super(context);
    this.mapView = mv;
    this.p = pt;
    this.circleRadius = radius;
    init();
}

private void init(){
 paint = new Paint();
 paint.setColor(Color.GREEN);
 paint.setStrokeWidth(10);
 paint.setStyle(Paint.Style.STROKE);

}

@Override
protected void onDraw(Canvas canvas) {
 Projection projection = mapView.getProjection();
 Point pt = new Point();
 projection.toPixels(p, pt);

 float circleRadius = metersToRadius(this.circleRadius, mapView, (double)p.getLatitudeE6()/1E6);
 Paint circlePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
 circlePaint.setARGB(150, 12, 232, 91);
 circlePaint.setStyle(Style.STROKE);
 circlePaint.setStrokeWidth(10);
 if(canvas.isHardwareAccelerated())
 {
     mapView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
 }
 canvas.drawCircle((float)pt.x, (float)pt.y, circleRadius, circlePaint);

 super.onDraw(canvas);
}

 public static int metersToRadius(float meters, MapView map, double latitude) {
        return (int) (map.getProjection().metersToEquatorPixels(meters) * (1/ FloatMath.cos((float) Math.toRadians(latitude))));         
    }

}

I have gone through various forums and found that ICS by default activates HardwareAcceleration so I have added following tag in the manifest but no help. Could anybody
suggest me what’s going wrong here.

 <application
    android:hardwareAccelerated="false"
    ....
</application>
  • 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-17T08:55:41+00:00Added an answer on June 17, 2026 at 8:55 am

    I could resolve the issue simply by changing the android:targetVersion to 10 in android manifest file. The reason why it isn’t working with API>=11 is the change in the behaviour of the AsyncTask method. have a look at Android AsyncTask not being called for minutes on ICS

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

Sidebar

Related Questions

I have an Android app which is crashing on some phones, and not on
I have made an android app which working fine. I implemented the Login functionality
I have an Android app that I had working a few months ago which
I have installed the Android App on which I am currently working on my
I have an Android app, in which Activities fire long running operations that run
I have an Android app which uses a bit of OpenGL running on a
I have an android app which has native code. The native code needs to
I have an android app which let the user to submit a form ,
I have an Android app which calculates poker odds ( Shufflebot if you're interested).
I have an android app which gives the user the option of loading a

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.