v1.0.0
KInfo is Compose Multiplatform Library allows to access the device details of android, ios, desktop e web devices
[versions]
kinfo = "1.0.0"
[libraries]
kinfo = { module = "io.github.n7ghtm4r3:KInfo", version.ref = "kinfo" }
Add the JitPack repository to your build file
-
Add it in your root build.gradle at the end of repositories
repositories { ... maven { url 'https://jitpack.io' } }
repositories { ... maven("https://jitpack.io") }
-
Add the dependency
dependencies { implementation 'io.github.n7ghtm4r3:Kinfo:1.0.0' }
dependencies { implementation("io.github.n7ghtm4r3:Kinfo:1.0.0") }
dependencies { implementation(libs.kinfo) }
OnPlatform(
onAndroid = { androidInfo ->
// uses the Android information retrieved
Text(
text = androidInfo.model
)
},
onIos = { iosInfo ->
// uses the iOs information retrieved
Text(
text = iosInfo.model
)
},
onDesktop = { desktopInfo ->
// uses the desktop information retrieved
Text(
text = desktopInfo.hardware.computerSystem.model // hardware information
)
Text(
text = desktopInfo.operatingSystem.versionInfo.codeName // operating system information
)
},
onWeb = { webInfo: WebInfo ->
// uses the web information retrieved
Text(
text = webInfo.browser.name
)
}
)
onPlatform(
onAndroid = { androidInfo ->
// uses the Android information retrieved
println(androidInfo.model)
},
onIos = { iosInfo ->
// uses the iOs information retrieved
println(iosInfo.model)
},
onDesktop = { desktopInfo ->
// uses the desktop information retrieved
println(desktopInfo.hardware.computerSystem.model) // hardware information
println(desktopInfo.operatingSystem.versionInfo.codeName) // operating system information
},
onWeb = { webInfo: WebInfo ->
// uses the web information retrieved
println(webInfo.browser.name)
}
)
Take a look to related documentation about the information available for each platform
Will be gradually added new information for each platform
If you need help using the library or encounter any problems or bugs, please contact us via the following links:
Thank you for your help!
If you want support project and developer
Crypto | Address | Network |
---|---|---|
3H3jyCzcRmnxroHthuXh22GXXSmizin2yp | Bitcoin | |
0x1b45bc41efeb3ed655b078f95086f25fc83345c4 | Ethereum | |
AtPjUnxYFHw3a6Si9HinQtyPTqsdbfdKX3dJ1xiDjbrL | Solana |
If you want support project and developer with PayPal
MIT License
Copyright (c) 2024 Swapnil Musale
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Copyright © 2025 Tecknobit