Phương Quyên
New member
How do you find activity context?
Answer
Rules:
Answer
Rules:
- Use getContext() or Activity. …
- Use getApplicationContext() if you need application-level context, which is not tight to any views/activities (for instance, in BroadcastReceiver or Service)
- Do not use getBaseContext(). …
- Make use of WeakReference if you need to access context from inside the threads.