GithubHelp home page GithubHelp logo

aishik212 / androidphonenamesfinder Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 5.11 MB

This Library is useful to get the device name of the phone the user is using, instead of a code name or any other kind of names this library aims at generating the most perfect name possible

License: Apache License 2.0

Kotlin 100.00%

androidphonenamesfinder's Introduction

AndroidPhoneNamesFinder

This Library is useful to get the device name of the phone the user is using, instead of a code name
or any other kind of names this library aims at generating the most perfect name possible

Add it in your root build.gradle at the end of repositories:```

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

To Enable this Library first Add this line on the build.gradle(:app)

implementation 'com.github.aishik212:AndroidPhoneNamesFinder:v1.1.0'

Use this code at the mainactivity or in Application to initialise the DB

DeviceNameFinder.init(this)
It Return True or False, it can be checked while finding phone

Use this code to get the device name

DeviceNameFinder.getPhoneValues(this, object : DeviceDetailsListener
{  
    override fun details(doQuery: DeviceDetailsModel?) 
    {  
        super.details(doQuery)  
        Log.d(TAG, "details: "+doQuery?.calculatedName)  
    }  
})

These are the values you will get from DeviceDetailsModel

val brand: String? #This is the brandName of the Device  
val commonName: String?, #This is the most common Name of the Device  
val codeName: String?,  #This is the codeName of the Device
val modelName: String?,  #This is the another uncommon Name of the Device
val calculatedName: String?, #This is the special name that this library tries to create from the above data.

EG -

brand=Google commonName=Google Android Emulator codeName=generic_x86_arm modelName=sdk_gphone_x86 calculatedName=Google Android Emulator

This is the Details of the Android Emulator

To get the Current Device Data Stored in Prefs use this

getDeviceDataInPref(activity: Activity)

It will return a DeviceDetailsModel or Null Value

Please Contribute to the Project by providing me with issues

androidphonenamesfinder's People

Contributors

aishik212 avatar

Stargazers

Matt Vaughn avatar Ian Cross avatar CursedFunction avatar Paul Klauser avatar Sweet avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.