Detecting if two objects are close to each other
Could an Arduino Near Field Communication (NFC) shield do the job?  Or a RFID shield.
As an example: NFC Shield V2.0 of Seeed
But there must be other once in the market.