Windows phone Development

Hi all am trying to work on app(Windows phone ),part of it should get an IMEI number of a device,however its giving the DeviceUnique ID instead.
My requirement is that i should get the device IMEI not the DeviceUniqueId,Is there a way i should get the IMEI on windows phone devices?
websssAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
Would this suggestion work out for you?
I found that on another site...
Provided as is:

add a head file "CoreTelephony.h" to your project

CoreTelephony.h

struct CTServerConnection
{
    int a;
    int b;
    CFMachPortRef myport;
    int c;
    int d;
    int e;
    int f;
    int g;
    int h;
    int i;
};

struct CTResult
{
    int flag;
    int a;
};

struct CTServerConnection * _CTServerConnectionCreate(CFAllocatorRef, void *, int *);

void _CTServerConnectionCopyMobileIdentity(struct CTResult *, struct CTServerConnection *, NSString **);
add the following code to your class

#import "CoreTelephony.h"

struct CTServerConnection *sc=NULL;
struct CTResult result;
void callback() { }
now, you can get imei easily

    NSString *imei;
_CTServerConnectionCopyMobileIdentity

Open in new window

0
 
PawełI Design & Develop SoftwareCommented:
https://msdn.microsoft.com/en-us/library/windows/apps/ff769508(v=vs.105).aspx

are you trying to unlock it for development, win 8.1 phone?
0
 
websssAuthor Commented:
I've developed an app with xamarin
The app is working fine

Within the app, I need to reveal the IMEI number to the user, so they can type this number into a webpage to register onto a separate system

However, I can't seem to get the IMEI number
I know you can type *06#* on the phone and call it, but it needs to be done within the app
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
PawełI Design & Develop SoftwareCommented:
I really don't think that's possible, because there'd be nothing preventing your application from getting this information and posting it to a database somewhere.
0
 
websssAuthor Commented:
That's kinda the point
It's meant for a GPS tracking app, and the unique identifier is the IMEI
:(
0
 
PawełI Design & Develop SoftwareCommented:
yes, but from what i understand if i had that number i could track your phone, and hence stalk you, so i think that's why MS doesn't allow your app to get it.

if your'e trying to track the phone, have you tried creating a background task that would periodically post it's GPS location to a service?
0
 
websssAuthor Commented:
No, you cant track a phone with an imei number

I have this background task pointing to a service already, but if 1000 phones are on your account you'll not know which one is yours
0
 
PawełI Design & Develop SoftwareCommented:
so i'm not following why you cant use the DeviceUnique ID like you mentioned at first?
0
 
websssAuthor Commented:
because the software that accepts the data requires imei as the unique identifier (15 digit number)
DeviceUniqueId is an alphanumeric string
0
 
PawełI Design & Develop SoftwareCommented:
well my friend I wish you luck, if you ever figure it out please let me know how. Sorry i couldn't be of more help.
0
 
websssAuthor Commented:
thanks for you help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.