mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
added ability to retrieve device manufacturer
This commit is contained in:
@@ -12,6 +12,7 @@ export module platformNames {
|
||||
// It is not meant to be initialized - thus it is not capitalized
|
||||
export class device implements definition.device {
|
||||
private static MIN_TABLET_PIXELS = 600;
|
||||
private static _manufacturer: string;
|
||||
private static _model: string;
|
||||
private static _osVersion: string;
|
||||
private static _sdkVersion: string;
|
||||
@@ -22,6 +23,14 @@ export class device implements definition.device {
|
||||
return platformNames.android;
|
||||
}
|
||||
|
||||
static get manufacturer(): string {
|
||||
if (!device._manufacturer) {
|
||||
device._manufacturer = android.os.Build.MANUFACTURER;
|
||||
}
|
||||
|
||||
return device._manufacturer;
|
||||
}
|
||||
|
||||
static get osVersion(): string {
|
||||
if (!device._osVersion) {
|
||||
device._osVersion = android.os.Build.VERSION.RELEASE;
|
||||
|
||||
Reference in New Issue
Block a user