1.29: getCurrentState now accepts application, not only id as before