getting application context for resource based toggle check