Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by timshaya · Sep 27, 2012 at 05:12 PM · androiddeviceid

SystemInfo.deviceUniqueIdentifier returns IMEI on Android?

After searching the Unity forums and Unity Answers, I've seen a few people mention that SystemInfo.deviceUniqueIdentifier returns the IMEI of an Android device. I haven't yet seen any official confirmation from Unity Technologies on this (continuing to look).

I need to add an ad network's conversion tracking logic to Unity 3.5 built Android app.

When I try using SystemInfo.deviceUniqueIdentifier in my C# class it returns a number in the following format:

 51F30A87-BBFA-128F-E915-C92391D2F164

However, if I dial *#06# and press Call on my test HTC Inspire 4G, the phone tells me my IMEI number looks similar to this:

 8127362567812635

The HTC Inspire 4G is running Android 2.3.3 and is currently working over WiFi, not hooked up to a cellular network of any kind. However, it still has a TelephonyManager since it used to be connected to an AT&T account.

Does anyone have any ideas? Am I missing something here?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image timshaya · Sep 27, 2012 at 10:36 PM 0
Share

At this point, I'm giving up on using Unity's SystemInfo.deviceUniqueIdentifier and turning to writing a Java plugin to grab it from Android natively.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by googler · Apr 04, 2013 at 09:43 AM

The magic is that when using READ_PHONE_STATE permission IMEI returned, otherwise Android_ID

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GeorgeRigato · Nov 22, 2013 at 08:14 PM 0
Share

This info about Android_ID when no READ_PHONE_STATE used is confirmed?

avatar image rahaf · Dec 25, 2013 at 07:55 AM 0
Share

How i can active this magic way (READ_PHONE_STATE) in mono because i don't know that and when i just use SystemInfo.deviceUniqueIdentifier, no result is happen :(

avatar image
0

Answer by DSamson · Mar 23, 2019 at 01:01 PM

string IMEI = TM.Call("getDeviceId"); imeiNumber2.text = "2 " + IMEI;

As well add below line in your Androidmanifest.xml file. and your Androidmanifest.xml file must be at Assets-Plugins-Android-Androidmanifest.xml.

,

add above line in your Androidmanifest.xml file and your androidmanifest.xml file must be at Assets-Plugin-Android- Androidmanifest.xml

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Show device info such as resolution, OS, GPU, etc... 1 Answer

how do I get a unique device id for an android device? 2 Answers

Unity networking - can't connect from other device. 1 Answer

Access AndroidTargetDevice (PlayerSettings) from code 1 Answer

Mobile aspect ratio and scaling - Use 16:10 or 16:9 base for full screen background ? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges