finish the activity-register function judging whether there is a space behind the bm