private static String getStringResourceByName(Context ctx, String resourceName) {
        String packageName = ctx.getPackageName();
        int resId = ctx.getResources().getIdentifier(resourceName, "string", packageName);
        if (resId == 0) {
            return "";
        } else {
            return ctx.getString(resId);
        }
    }
private static String getStringResourceByName ( Context ctx , String resourceName ) { String packageName = ctx . getPackageName ( ) ; int resId = ctx . getResources ( ) . getIdentifier ( resourceName , "string" , packageName ) ; if ( resId == 0 ) { return "" ; } else { return ctx . getString ( resId ) ; } }
helper class to retrieve a string by it's resource name