...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public class LoaderSample implements LoaderCallback { Context _c; public LoaderSample(Context c) { this._c = c; } @Override public void onLoaded() { //loading the JCE has finished //get provider Provider p = Security.getProvider("CERTGATE"); //do something with the provider ... } public void startLoading() throws ProviderLoadingFailedException, ProviderSignatureInvalidException, ProviderNotFoundException { if (ProviderLoader.isProviderInstalled(this._c)) { if (!ProviderLoader.isProviderAvailable()) { ProviderLoader.load(this._c, this); } else { //already loaded! } } else { //not installed! } } } |
Automated loading via JCEInitTask
...