Titanium native module for getting a device's IMEI
First, download a binary release from https://github.com/mihaiblaga89/ro.mihaiblaga.imei/blob/master/dist/ro.mihaiblaga.imei-android-1.1.0.zip
Then, put the ZIP file in the Resources directory.
or
Simply use the gitTio CLI:
$ gittio install ro.mihaiblaga.imei
Add the following to your project's tiapp.xml
:
...
<modules>
<module platform="android">ro.mihaiblaga.imei</module>
</modules>
...
then
var imeiModule = require('ro.mihaiblaga.imei');
var imei = imeiModule.getImei();
Ti.API.info(imei);
Note : On simulator it returns null
Returns the status of the automatic date checkbox from settings.
I know this module is named IMEI, that was it's main purpose. Later I needed the automatic date check as well. When i'll have more time i'll rename the module or separate them
var imeiModule = require('ro.mihaiblaga.imei');
Ti.API.info(imeiModule.isDateAutomatic());
- Me: Mihai Blaga
- Twitter: @blaga_mihai
- Work: AG Prime
Apache License Version 2.0