I live in a condo on the 5th floor in an urban setting. Trigger needs frequent stimulation and exercise. I take him to doggie day care 2 - 3 days a week where he plays so hard he's content being home the next day to rest. Fortunately, I am able to go home and walk Trigger at lunch most days. We also hit the trail most every weekend.
I live on the 5th floor and I used a Pet Loo from Amazon on my balcony until Trigger had all of his shots. I would set my alarm and get up a couple times a night and take him out on the balcony even in the rain and cold. At age 2 he is better about going out in the rain, does his business and wants to head back to the building.