Maximum Refresh Rate of Widget

Discussion in 'Application Development' started by morty346, Oct 16, 2010.

  1. morty346

    morty346 New Member

    Oct 16, 2010
    I know that the default is 30 minutes, however I am looking at making a game in a widget

    This would require millisecond responses.... has anyone messed with the AlarmClock Timing that is described to use instead to achieve this? does it work well?

    I haven't finished the Software Arc for the project yet because I see a lot of complaints about this on the net, so need to know if this is feasable before I go for the adventure... but the game would consist of a large widget size of one screen... many areas to click on and interact with and multiple textured animations

    Looks like I can draw to a canvas and then pop it up to the bitmap to do this... but that still confuses me a bit, so if anyone knows of some good tutorials I would greatly appreciate it

    this is what I was told works:

    Code (Text):
    1. Paint p = new Paint();
    2.             p.setAntiAlias(true);
    3.             p.setStyle(Style.STROKE);
    4.             p.setStrokeWidth(8);
    5.             p.setColor(0xFFFF0000);
    7.             Bitmap bitmap = Bitmap.createBitmap(100, 100, Config.ARGB_8888);
    8.             Canvas canvas = new Canvas(bitmap);
    9.             canvas.drawArc(new RectF(10, 10, 90, 90), 0, 270, false, p);
    11.            // RemoteViews views = new RemoteViews(updateService.getPackageName(), R.layout.main);
    12.             RemoteViews updateViews = null;
    14.             updateViews.setImageViewBitmap(, bitmap);
    16.             ComponentName componentName = new ComponentName(updateService, DashboardAppWidgetProvider.class);
    17.             AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(updateService);
    18.             appWidgetManager.updateAppWidget(componentName, views);
    but I am struggling with the concepts of this code having an ID for the canvas and how to use that so I have not been able to test this code

    (I am a experienced c/c++/c#/dx/opengl coder first time with android and java)

    Thank you!


Share This Page