Switch for battery device
reed switches require precise alignment of the electrodes for correct operation glass is an ideal matrerial as is it rigid, non-coductive, and non-magnetic. 

If embedding in epoxy does not harden the reed switch enough (they are pretty tough to start with) pad the reed switch by placing it inside a tube of silicone before encapsulating it.