Lacrimas Blog Keep your mind away…

31May/110

Getting Manufacturer on Android Device

It was hard to investigate the problem with version 1.5 and Build Manufacturer, and here is the solution:

	public String GetManufacturer(){
		try {
			return android.os.Build.class.getField("MANUFACTURER").get(null).toString();
		} catch (Exception e) {
			return "undefined";
		}
	}

Now we will catch Exception without Unexpected Error in Runtime.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.