Android : I need to tell an Activity to refresh data, from a Service. Is there any reason to use a bound service or intent, instead of a singleton?

on Wednesday, October 29, 2014


I don't need to pass any data, just tell it to refresh. I'm currently doing something like:



Activity a = MyActivity.getSingleton();
if (a != null) {
a.refreshUI();
}


Is this OK, or do I need to use a bound service, intent, etc. for some reason?


0 comments:

Post a Comment