Open
Description
Hello community! I have a quick question.
Is there a way to smoothly filter supported devices for this SDK?
I am trying to implement a feature that requires Gemini Nano, and I want the feature button to be disabled in unsupported devices.
I thought of filtering the device model names, but it would require an app update every time a new device is supported... and I do not want to implement it this way.
Edit: I am currently using the following code:
private fun checkAICoreAvailability(aiCore: PackageInfo?, privateComputeServices: PackageInfo?): Boolean {
aiCore ?: return false
privateComputeServices ?: return false
val privateComputeMinVersion = "1.0.release.658389993"
val aiCoreCondition = aiCore.versionName?.contains("thirdpartyeap") == true
val privateComputeCondition = (privateComputeServices.versionName ?: "").padEnd(privateComputeMinVersion.length, '0') > privateComputeMinVersion
return aiCoreCondition && privateComputeCondition
}
Metadata
Metadata
Assignees
Labels
No labels