android.os.Build.MANUFACTURER

by Wayne Wenthin » Tue, 20 Oct 2009 00:20:25 GMT


Sponsored Links
 Is this no longer available?   I find it here:
 http://developer.android.com/reference/android/os/Build.html #MANUFACTURER  but
when I try to use eclipse just gives me an error.
The reason I am looking for something like this is to make my unique id
something more substantial.   Since it appears
that android.provider.Settings.Secure.ANDROID_ID cannot be trusted to give
back a 16 digit hex number and the IMEI is probably not on devices without
phone guts I am trying to create my own.   I was going to use the
manufacturer since I would assume that each one would burn a unique
ANDROID_ID into the device but it does not seem to be there anymore.  I
suppose I could use the android.os.Build.PRODUCT if it is going to be around
for successive builds.

Wayne

-- 
Writing code is one of few things
that teaches me I don't know everything.

 http://www.fuligin.com 

--~--~---------~--~----~------------~-------~--~----~



android.os.Build.MANUFACTURER

by Greivin Lopez » Tue, 20 Oct 2009 06:02:15 GMT


 I think you could use IMEI value.  IMEI = International Mobile
Equipment Identity which is a unique number for every GSM, WCDMA, IDEN
phone.

The way to retrieve the value is by using something like this:

import android.telephony.TelephonyManager;

TelephonyManager telephonyManager = (TelephonyManager) getSystemService
(Context.TELEPHONY_SERVICE);

Because of the sensible nature of this value, if you want to send it
over the web I encourage you to encrypt it before. Or just apply a
hash algorithm like MD5 to it.
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


android.os.Build.MANUFACTURER

by Mark Murphy » Tue, 20 Oct 2009 06:05:05 GMT


 


1. Not all Android devices are phones (e.g., ARCHOS 5 Android tablet).

2. Not all Android phones are GSM. I hope CDMA phones will return
something unique for getSubscriberId()/getDeviceId(), but I wouldn't be
shocked if they do not.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android App Developer Training:  http://commonsware.com/training.html 

--~--~---------~--~----~------------~-------~--~----~



android.os.Build.MANUFACTURER

by Wayne Wenthin » Tue, 20 Oct 2009 06:13:56 GMT


 Exactly.







-- 
Writing code is one of few things
that teaches me I don't know everything.

 http://www.fuligin.com 

--~--~---------~--~----~------------~-------~--~----~



android.os.Build.MANUFACTURER

by Dianne Hackborn » Tue, 20 Oct 2009 07:44:32 GMT


 That was added in 1.6.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~



android.os.Build.MANUFACTURER

by Greivin Lopez » Tue, 20 Oct 2009 23:12:23 GMT


 Ok I see IMEI is not valid as a device identifier for Android
devices.  What do you guys suggest to use instead of the IMEI to
identify the device? Is there any best practice in Android environment
to do that?

I'm asking because I also working on that part of my application right
now.

Thanks for your help.
--~--~---------~--~----~------------~-------~--~----~



android.os.Build.MANUFACTURER

by Wayne Wenthin » Tue, 20 Oct 2009 23:45:05 GMT


 I'm currently using ANDROID_ID but it looks like I need to switch it up to a
custom one because of the Archos 5.   I will probably be using a
concatenation of  a custom 3 letter designating the app,
android.os.Build.PRODUCT
and the ANDROID_ID.   My assumption is that the ANDROID_ID will be unique
for any like product.  If it isn't then the OHA really needs to start
cracking down on manufacturers and running the ID's like they do for MAC
address's on network cards.






-- 
Writing code is one of few things
that teaches me I don't know everything.

 http://www.fuligin.com 

--~--~---------~--~----~------------~-------~--~----~



android.os.Build.MANUFACTURER

by junker37 » Tue, 20 Oct 2009 23:45:17 GMT


 This is what I have been using for a unique phone id.

Settings.Secure.getString(contentResolver,
Settings.Secure.ANDROID_ID);



--~--~---------~--~----~------------~-------~--~----~



android.os.Build.MANUFACTURER

by Wayne Wenthin » Wed, 21 Oct 2009 00:06:35 GMT


 That is what I was using also.   But Mark Murphy picked up an Archos 5 and
found that it does not return a 16 byte hex number like described in the
SDK.   This will no longer work for me if I can't expect the ID to be 16
bytes.  My previous post explains how I am going to use the ID along with
other non-unique values in an attempt to create a unique ID.   I have to
rewrite my backend also but that is pretty simple.







-- 
Writing code is one of few things
that teaches me I don't know everything.

 http://www.fuligin.com 

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How to set width and height of a View in DP through code not in XML ?

http://developer.android.com/guide/practices/screens_support.html

search 'Converting dp units to pixel units' on above page.






-- 

2. Notepad Sample - adding more columns to listview

I've done the notepad tutorial on Google's Android site, but I would
like to know how to add more fields to the list, in columns. At the
moment I can add the columns no problem, but they're not aligned like
you would a normal table on the layout:

john smith
heinrich cilliers
will peck

I would like it aligned as in a html table.

Any pointers?

-- 

3. How to set width and height of a View in DP through code not in XML ?

4. Control rotation of a 3D object using the touchscreen

5. Views with the same dip width number have different widths in appearance on device

6. MediaPlayer error( 1,-2147483648)

7. Music / Soundtrack composer available for interesting projects - perhaps even free.