Solved

Windows phone Development

Posted on 2016-08-16
11
33 Views
Last Modified: 2016-10-25
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?
0
Comment
Question by:websss
  • 5
  • 5
11 Comments
 
LVL 8

Expert Comment

by:Paweł
ID: 41758011
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
 

Author Comment

by:websss
ID: 41758017
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
 
LVL 8

Expert Comment

by:Paweł
ID: 41758024
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
 

Author Comment

by:websss
ID: 41758027
That's kinda the point
It's meant for a GPS tracking app, and the unique identifier is the IMEI
:(
0
 
LVL 8

Expert Comment

by:Paweł
ID: 41758047
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:websss
ID: 41758051
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
 
LVL 8

Expert Comment

by:Paweł
ID: 41758055
so i'm not following why you cant use the DeviceUnique ID like you mentioned at first?
0
 

Author Comment

by:websss
ID: 41758059
because the software that accepts the data requires imei as the unique identifier (15 digit number)
DeviceUniqueId is an alphanumeric string
0
 
LVL 8

Expert Comment

by:Paweł
ID: 41758069
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
 

Author Comment

by:websss
ID: 41758072
thanks for you help
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 41833369
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now