VMware Workspace ONE Community
lduport
Contributor
Contributor

[Android] Retrieve a certificate installed by a profile

Hello, 

I want to read a certificate installed by a profile.

 IMG_0263.jpg

Then in my android application i initialize the Airwatch SDK like this : 

awSDKManager = SDKManager.init(applicationContext)

I have an exception "AirWatch MDM Service Not Available".

Other question : Is this code is correct to retrieve the certificate ? 

val awAppProfile = awSDKManager?.applicationProfile
awAppProfile?.let {
val certs = it.certificates
if (!certs.isNullOrEmpty()) {
Log.v(TAG, "Found certificates")
}
}

Thanks for your help. 

0 Kudos
0 Replies