Implemented retrieving device info
This commit is contained in:
parent
c5bddd94b0
commit
0fbf376a89
|
@ -0,0 +1,16 @@
|
|||
package net.dankito.utils.multiplatform.os
|
||||
|
||||
|
||||
open class DeviceInfo(
|
||||
open val manufacturer: String,
|
||||
open val deviceModel: String,
|
||||
open val osName: String,
|
||||
open val osVersion: String,
|
||||
open val osArch: String
|
||||
) {
|
||||
|
||||
override fun toString(): String {
|
||||
return "$manufacturer $deviceModel: $osName $osVersion"
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package net.dankito.utils.multiplatform.os
|
||||
|
||||
|
||||
expect class DeviceInfoRetriever {
|
||||
|
||||
fun getDeviceInfo(): DeviceInfo
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package net.dankito.utils.multiplatform.os
|
||||
|
||||
|
||||
actual class DeviceInfoRetriever {
|
||||
|
||||
actual fun getDeviceInfo(): DeviceInfo {
|
||||
// TODO:
|
||||
return DeviceInfo("", "", "", "", "")
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package net.dankito.utils.multiplatform.os
|
||||
|
||||
|
||||
actual class DeviceInfoRetriever {
|
||||
|
||||
actual fun getDeviceInfo(): DeviceInfo {
|
||||
// TODO: retrieve manufacturer and device model
|
||||
return DeviceInfo("", "", System.getProperty("os.name", ""), System.getProperty("os.version", ""), System.getProperty("os.arch", ""))
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue