Pergunta

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?

Foi útil?

Solução

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 em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top