0

I was asked by my boss to come up with an android application that checks the IMEI of a phone and then compares that IMEI to a database, displaying on the app if the IMEI is registered or not.

I was assigned this project since nobody in the office has the faintest clue on how to do this, and they are not willing to hire outside help (cheapskates).

I am the more tech oriented person in the team, nevertheless I have very little programming experience, basically some very rudimentary Java and I don't have a clue on where to start.

I am hard worker that is willing to put on the hours and learn what is needed, but I could use somebody in pointing me to the tools I need to use and what learning resources I have available online so I can accomplish this task.

I have been looking at PhoneGap and Appbuilder as solutions, but I don't think that those frameworks could give me access to the IMEI on a phone.

I truly appreciate any input that you might have, thank you very much in advance for all your comments.

  • Start here: http://developer.android.com/sdk/index.html and then here: https://developer.android.com/training/basics/firstapp/index.html?hl=it – FoamyGuy May 22 '14 at 17:15

2 Answers2

1

Check this link

To get IMEI in android you can use the below code..

TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String imeistr=telephonyManager.getDeviceId();

imeistr will hold the IMEI number of the device..

And you should add the following permission into your Manifest.xml file:

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

Try it..

Lal
  • 14,726
  • 4
  • 45
  • 70
0

Firstly , if you are not so confident about Java you can look at this proper tutorial by Oracle : Java Official Tutorial.

Then you can start learning Android from : Official Android Tutorials. In case you need any documentation reference look at : Android Documentation

You can also try free online Android course on Coursera : Coursera : Programming mobile applications

You can learn the database SQLite here: TutorialsPoint sqlite tutorial And sqlite in depth with documentation here : sqlite org Finally the code which gives you the IMEI number of your phone:

public static String getUniqueDeviceId(Context context) {
    TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
    String deviceId = telephonyManager.getDeviceId();
    if (deviceId == null) {
        deviceId = android.provider.Settings.Secure.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
    }
    return deviceId;
}

You need to give following permission in AndroidManifest.xml:

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
Krati Jain
  • 368
  • 2
  • 10