leverage onDeviceReady to determine platform at runtime.