I am installing a certificate in my application when application starts. I have gone through few of the links as below and successfully install the certificate.

I came to know we cannot install the certificate silently without user interaction.Currently I don't know how to stop prompt each time user open my app.

Whenever my application starts currently every time it ask user to install certificate. Is there some way I can detect whether a certificate(in this case my certificate) is already installed or not, programmatically.

Code snippet where I have installing certificate in my app

private void installCertificate()
    {
        try 
        {
            BufferedInputStream bis = new BufferedInputStream(getAssets().open(MY_CERT));
            byte[] keychain = new byte[bis.available()];
            bis.read(keychain);

            Intent installIntent = KeyChain.createInstallIntent();
            X509Certificate x509 = X509Certificate.getInstance(keychain);
            installIntent.putExtra(KeyChain.EXTRA_CERTIFICATE, x509.getEncoded());
            installIntent.putExtra(KeyChain.EXTRA_NAME, MY_CERT);
            startActivityForResult(installIn
Edit
Report