mobspec

package module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

README

go get github.com/absolute-algorithmic/mobspecs@latest
package main

import (
	"fmt"

	"github.com/absolute-algorithmic/mobspecs"
)

func main() {
	getSpec, err := mobspec.GetMobileSpec()

	if err != nil {
		fmt.Println(err)
	}

	fmt.Println("Product Build ID:", getSpec.BuildID)
	fmt.Println("Product Display ID:", getSpec.BuildDisplayID)
	fmt.Println("Product Name:", getSpec.ProductName)
	fmt.Println("Product Device:", getSpec.ProductDevice)
	fmt.Println("Product Board:", getSpec.ProductBoard)
	fmt.Println("Product Manufacturer:", getSpec.ProductManufacturer)
	fmt.Println("Product Brand:", getSpec.ProductBrand)
	fmt.Println("Product Model:", getSpec.ProductModel)
	fmt.Println("Bootloader:", getSpec.Bootloader)
	fmt.Println("Hardware:", getSpec.Hardware)
	fmt.Println("Build Type:", getSpec.BuildType)
	fmt.Println("Build Tags:", getSpec.BuildTags)
	fmt.Println("Build Fingerprint:", getSpec.BuildFingerprint)
	fmt.Println("Build User:", getSpec.BuildUser)
	fmt.Println("Build Host:", getSpec.BuildHost)
	fmt.Println("Build Version Incremental:", getSpec.BuildVersionIncremental)
	fmt.Println("Build Version Release:", getSpec.BuildVersionRelease)
	fmt.Println("Build Version SDK:", getSpec.BuildVersionSDK)
	fmt.Println("Build Version Codename:", getSpec.BuildVersionCodename)
	fmt.Println("Screen Height:", getSpec.ScreenHeight)
	fmt.Println("Screen Width:", getSpec.ScreenWidth)
	fmt.Println("Screen Density:", getSpec.ScreenDensity)
	fmt.Println("Screen X DPI:", getSpec.ScreenXDPI)
	fmt.Println("Screen Y DPI:", getSpec.ScreenYDPI)
	fmt.Println("Screen DPI:", getSpec.ScreenDPI)
	fmt.Println("Screen Scaled Density:", getSpec.ScreenScaledDensity)

}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MobileSpecsData = []MobileSpecs{}/* 1700 elements not displayed */

Functions

func InitializeSpecs

func InitializeSpecs() error

InitializeSpecs initializes the mobile specs

Types

type MobileSpecs

type MobileSpecs struct {
	BuildID                 string
	BuildDisplayID          string
	ProductName             string
	ProductDevice           string
	ProductBoard            string
	ProductManufacturer     string
	ProductBrand            string
	ProductModel            string
	Bootloader              string
	Hardware                string
	BuildType               string
	BuildTags               string
	BuildFingerprint        string
	BuildUser               string
	BuildHost               string
	BuildVersionIncremental string
	BuildVersionRelease     string
	BuildVersionSDK         string
	BuildVersionCodename    string
	ScreenHeight            string
	ScreenWidth             string
	ScreenDensity           string
	ScreenXDPI              string
	ScreenYDPI              string
	ScreenDPI               string
	ScreenScaledDensity     string
}

MobileSpecs is a struct that represents a mobile specification

func GetMobileSpec

func GetMobileSpec() (MobileSpecs, error)

GetMobileSpecs returns the mobile specs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL