java - AppWidget refresh 12 times -


i have code:

    int = 0;     while(true){     i++;      remoteviews.settextviewtext(r.id.textview1,  "" +  );     appwidgetmanager.updateappwidget(thiswidget, remoteviews);     try {         thread.sleep(1000);     } catch (interruptedexception e) {         // todo auto-generated catch block         e.printstacktrace();     } 

this code refresh widget, 12 times. when "i" reaches 12 nothing happens. how fix it?

appwidgetprovider class extends broadcastreciever , , not correct have while(true) loop in reciever class.

if want refresh widget @ interval of every 1 second provide information in android:updateperiodmillis="1000" in app widget xml file placed @ res/xml/ folder in project.

thanks! bhushan


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -