What is this rectangular device on my apartment wall?
It looks like a doorbell to me.  Can't be sure though unless you pop off the case, which should come off fairly easily if you pull it straight out from the wall.