Grammar
N4AI-drafted〜あいだ/〜あいだに
while ~ / during ~
Formation
V辞書形/V-ている + あいだ(に) / N + の + あいだ(に) / い形容詞 + あいだ(に)
Usage
あいだ means a whole span of time: the action in the main clause continues throughout it (赤ちゃんが寝ている間、本を読んでいた). あいだに points to one moment inside that span, so the main clause is a short, completed action (寝ている間に電話があった). The clause before it usually takes a continuing form such as 〜ている. Choosing あいだ with a one-time verb like 電話が来る is the most common mistake.
Examples
夏休みの間、国に帰っていました。
なつやすみのあいだ、くににかえっていました。
I was back in my home country for the whole summer vacation.
母が料理をしている間、私はテレビを見ていた。
ははがりょうりをしているあいだ、わたしはてれびをみていた。
While my mother was cooking, I was watching TV.
彼が寝ている間に、部屋を掃除しておきました。
かれがねているあいだに、へやをそうじしておきました。
While he was asleep, I cleaned the room.