A beat is a singularly felt pulse. You're probably used to feeling 4 of these beats per measure (a.k.a. bar). So if you tap your foot along to most popular music you'll probably do it 4 times per measure. Though 4 beats per measure is common, other numbers are possible and are determined by the time signature.
As for your 8 beats, I suspect that you're familiar with using some kind of grid-based sequencer where you click to activate a drum sample or something? If so, those 8 beats are usually subdivisions of the 4 foot taps I just mentioned. So each of the 4 beats gets 2 subdivisions which are called eighth notes. In the context of these sequencers one measure (or one grid) is sometimes called a "pattern". That's specific to these grid-based sequencers though.
Or maybe you meant repeating groups of measures in which case there isn't really a standard term. You might see "section", "repeat", "phrase", etc or song structure terms like "verse", "chorus", "intro", "bridge" etc.
Definitely don't use "interval" for anything like this because that's used for something completely different—the distance between pitches. And as others have stated in the comments, you might want to brush up a bit if this app is for public distribution (and not just for learning or programming practice).