grant1842 Active Member Licensed User Longtime User Nov 20, 2012 #1 Im trying to understand the Widget Sample . I thought I would try to show the temp with the ICOSWorldForecast lib. The code works great on a button . I am trying to get it to work in the Widgets example. I wrote this Code: Copy Sub gettemp Dim w As ICOSWorldForecast Dim s As String w.Initialize("w") w.ApiKey="111111111111111111111" s= w.GetList("wise ","Search Results",False) w.CityName= s rv.SetText("Label1",s) Log(s) It makes the app force close. in the log it shows. Code: Copy widgetservice_settemp (java line: 159) android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application What am I doing wrong in the service widget sample ? Thanks Last edited: Nov 20, 2012
Im trying to understand the Widget Sample . I thought I would try to show the temp with the ICOSWorldForecast lib. The code works great on a button . I am trying to get it to work in the Widgets example. I wrote this Code: Copy Sub gettemp Dim w As ICOSWorldForecast Dim s As String w.Initialize("w") w.ApiKey="111111111111111111111" s= w.GetList("wise ","Search Results",False) w.CityName= s rv.SetText("Label1",s) Log(s) It makes the app force close. in the log it shows. Code: Copy widgetservice_settemp (java line: 159) android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application What am I doing wrong in the service widget sample ? Thanks
Erel B4X founder Staff member Licensed User Longtime User Nov 20, 2012 #2 Seems like this library requires an activity context. Maybe its author can provide more information about this issue. Upvote 0
Seems like this library requires an activity context. Maybe its author can provide more information about this issue.
grant1842 Active Member Licensed User Longtime User Nov 21, 2012 #4 This issue is solved the author of the library fix the problem Sent from my SCH-S720C Upvote 0