Magnetically responsive manipulation of droplets and bubbles