So, kind of a noob situation, but today, out of curiosity, I tried to do something like:
new Activity().runOnUiThread( new Runnable{...})
mostly because i don't actually have access to any activities (working on a 3rd party library). I just have the applicationContext, which i don't think allows me to make that runOnUiThread
call.
So i guess i'm kind of wondering if there is a way to somehow fake out a minimally-invasive activity just so i can run something on the UI thread (or do other things, like pop up dialog...etc.) ??
if not, does anyone know what's wrong with just making new Activity()
? ( i mean, aside from the fact that, yes, i will get a null pointer because i haven't set my base context since the onCreate
for the activity never got called ). if possible, i would like to accept an answer that can provide a little more detail and more "context" (no pun intended)