Galaxy Z-flip (flip opens and close event) I want to know

  1. When opening and closing the Z-flip, I wonder if there is a reference available to detect the event.
  2. Where should I refer if possible?
    ※ Like a folder phone, when an acquaintance opens and closes, the event was processed by screen on/off to make sound, but the response speed is slow and most of all, external displays exist, so when a message or reception is received, the sound effect is played unintentionally, so I would like to ask for more accurate development. Thank you very much

Hi,
Folding/unfolding triggers a configuration change for smallestScreenSize, screenSize and screenLayout . You can learn about configuration change from here. You can get more details about developing an app for Foldable device from Galaxy Fold - Overview.
Thank you.