getString Outside of a Context or Activity

Yes, we can access resources without using `Context`

You can use:

Resources.getSystem().getString(android.R.string.somecommonstuff)

… everywhere in your application, even in static constants declarations.
Unfortunately, it supports the system resources only.

For local resources use this solution. It is not trivial, but it works.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)