Get IMEI number



how can I get IMEI no of mobile device ?


Hi, I've tried it but it only returns empty string. maybe how i use it is wrong ?


Hi Tobit,

Try the following:

window.plugins.imeiplugin.getImei(function (imei) {
    $parameters.IMEI = imei;

The use of callbacks impose an asynchronous programming model, thus you have to use the $resolve implicit function to tell the platform that this is an async block of code. Check out this article for more details:


Hi Joao,

tq, the Imei working now. 

Just curious, how you know that this is an async block code ?

Usually cordova callbacks are async.

Ic, ok thanks.

Hi Joao,

just now when I m testing apps, my app is stuck when getImei action is called.

I tried to remove $resolve() from the plugin, and it's ok now.

can you help me to identify what is the cause  ?

Probably its throwing an error, but since the plugin doesn't have an error callback its not possible to understand the cause. I recommend that you try another plugin:

hi Joao,

I'm confused how to use it. my javascript skill is a bit sucks :(

btw, i tried it like this, but it returns an error : "cannot assign a javascript object with value [object Object] to an output parameter of type Text. Check the javascript node 'Javascript1' ...

I realized something. I tried to make again a new application with this imei plugin.

at the first, it worked, but second time I login, the same symtomp appeared (stuck).

Regarding you previous attempt the info parameter is an object, so try do the following

    function (info) {
        $parameters.IMEI = info.deviceId;
    function (error) {

i think the plugin doesn't work, it return empty string.

After discussed with my team, we decided to use UUID instead.

tq for your help Joao.