Мне известно о доступности Context.getApplicationContext() и View.getContext(), через который я могу фактически вызвать Context.getPackageName(), чтобы получить имя пакета приложения.
Они работают, если я вызываю метод, к которому доступен объект View
или Activity
, но если я хочу найти имя пакета из полностью независимого класса без View
или Activity
, есть ли способ сделать это (прямо или косвенно)?