A pH sensor can help understand chemical conditions of solutions, such as precise cell culture medium monitoring in real time. High-quality whispering-gallery-mode (WGM) microresonators have been utilized for surface sensing and are mainly based on the tracking of refractive index changes occurring within a wavelength range from their wall surface. This high sensitivity, reaching up to 10-5 RIU (∼2.5 nm/RIU and measured at a femtometer resolution) leads to a broad range of applications, especially for biosensing purposes through the monitoring of molecular binding events. Here, we study the deposition of thin layers of poly(vinyl alcohol)/poly(acrylic acid) (PVA/PAA) hydrogels inside a whispering gallery mode (WGM) microbubble resonator (MBR), fabricated inline with a silica capillary. The generation of such layers is achieved by withdrawing a liquid solution of 25% PVA/PAA in pure water into the MBR and locally heating the microbubble region, resulting in hydrogel formation only in the cavity. The capillary is then rinsed and tested with varying pH solutions. The swelling ability of these gels is directly proportional to the pH of samples brought into contact with the cavity, leading to physical modifications of the WGM coupling properties. We show the preliminary results obtained for the polymerization and characterization of these gels in microbubbles and present the related signal shifts observed for several pH values. We also discuss the gel kinetics over time and investigate practical uses such as reversible and tunable detection of small pH changes.