I am working on an android chat application using smack api when i try to connect and login with openfire server I am getting an error:
jks implementation not found
But sometimes it allow me to login.
I am not getting the problem.
Here is my code:
if (Build.VERSION.SDK_INT >= 15) {
config.setTruststoreType("AndroidCAStore");
config.setTruststorePassword(null);
config.setTruststorePath(null);
} else {
config.setTruststoreType("JKS");
String path = System.getProperty("javax.net.ssl.trustStore");
if (path == null)
path = System.getProperty("java.home") + File.separator + "etc"
+ File.separator + "security" + File.separator
+ "cacerts.bks";
config.setTruststorePath(path);
}