How do you know when your baby is hungry while pregnant?

You don't. A fetus is constantly receiving nutrition from it's mother via the placenta and through the umbilical cord. A fetus can and does swallow (amniotic fluid) while inside - but it does not eat and it receives its sustinence only through the placenta.