Solved

Windows phone Development

Posted on 2016-08-16
11
58 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

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 143

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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