i would like to know if it's possible check connectivity in android without having a Context, because the thread i have running in background doesn't know the context. if there's no way, is a best practice passing to the thread the context?
thanks
Yes, you need the Context
. Possibly, your thread will already have access to a Context
, courtesy of the Runnable
it uses being an inner class of the Activity
or Service
that forked the thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With