Solved

Windows phone Development

Posted on 2016-08-16
11
39 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 9

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 9

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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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 9

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
 

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 9

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 9

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 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