Returns the activity context if available. Otherwise, returns the application context if initialized.