Presumably, when the small amount of explosive was put into the devices, they also implanted a detonator programmed to trigger when the device received a preset message, as they must have been receiving notmal messages without setting them off?
Guessing here, but the explosive (if that's what it was) could be embedded into the battery, and the battery could become the detonator by overheating - something it could be programmed to do.
I've seen suggested that it wasn't so much an explosive, but rather a thermite device which would burn extremely hot. That would explain the relatively few deaths - supposedly less than a dozen, despite ~3,000 people being injured which if I'm right would be from extreme burns. Would only need a few grams of thermite, which could also be triggered by a battery overload - and of course a lithium battery would add significantly to the pyre.
Thermite reactions can hit 2,500 Celsius. And the powder would be odourless, undetectable. You don't want it in your pocket.