Pregunta

My app uses TelephonyMagager.getDeviceId() to get the device's IMEI. I have implemented a service which starts during boot time. This works on Xperia (4.0.4) and Nexus (4.1.1) without problems.

On Galaxy S3 (running 4.1.1), getDeviceId() works fine if I start the service after boot time, but it returns NULL if I let the service start during boot time.

Any ideas?

¿Fue útil?

Solución

From the method description, the method returns null if device ID is not available. It seems like during boot time, for some reason, the device ID is indeed not available. I think you can possibly use this blog post to meet your needs.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top