Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect Phone Vendor at installation

Tags:

android

I am developing device specific application, Can anybody knows how to detect android phone vendor i.e samsung or htc etc in android ... Is this possible?. That according to phone vendor i can decide to install application on that phone or not !!!!

like image 603
HrishikeshB Avatar asked Oct 20 '11 06:10

HrishikeshB


1 Answers

Use below code to get phone vendor

String manufacturer = android.os.Build.MANUFACTURER;

It will return name of vendor. For example Samsung if it is a samsung phone.

I think detecting is not possible at installation time but you can detect this in your first activity screen like splash screen if manufacturer name is same then you run the application and if vendor is different you can show error screen with message that this app run only on phones of specified vendor.

like image 134
anujprashar Avatar answered Oct 19 '22 00:10

anujprashar