IMEI PhoneGap Plugin in Android

*爱你&永不变心* 提交于 2019-12-24 14:47:40

问题


I am trying to retrieve the IMEI in android using PhoneGap. I have followed this one PhoneGap Plugin for IMEI

The output is "It works...". I am not getting the imei.

Where do I put the imei.js?

Thanks in advance.


回答1:


In order to run that example, you need to build a custom plugin.

How to build a custom plugin?? Here is the way Plugin development

Using these tutorials you need to build a custom plugin and then put java and js files in the right places.(Not only js, you need a java file too as shown in you link)

(N.B. If you need exact IMEI, then you'll need some third party plugin. But if you just need an unique number to recognize each device individually, I would suggest you should use the UUID That will avoid the hassle of creating custom plugin. Here is the example Get UUID)

And you can see the answers of this question to find out more about getting IMEI.

How to get IMEI number in phonegap?



来源:https://stackoverflow.com/questions/24300839/imei-phonegap-plugin-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!