![]() ![]() public class DownloadDealService extends void onHandleIntent(Intent intent)Ĭurrent todaysCurrent = Utils.downloadTodaysCurrent() // ![]() How can I get rid of this error, without duplicating code? Thanks. I was able to get rid of the error by copying all the shared code and sticking it directly into DownloadDealService's onHandleIntent method, but it is very sloppy and I'm looking for a better solution that doesn't require duplicating code. However, I do not understand how or why this stack trace got on a different thread. Realm objects can only be accessed on the thread they were created. However, I got an error saying Realm access from incorrect thread. But this same code needs to be called by an IntentService whenever an alarm goes off (when the app is not running any UI), and also by an AsyncTask while the app is running. I have some code that downloads a "Current" object's JSON. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |