Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7805897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:21:33+00:00 2026-06-02T02:21:33+00:00

There is described on this page how android is able to select all user

  • 0

There is described on this page how android is able to select all user certificates and show them in a spinner…
http://source-android.frandroid.com/packages/apps/Settings/src/com/android/settings/vpn2/VpnDialog.java

They use the Method:

private void loadCertificates(Spinner spinner, String prefix, int firstId, String selected) {
    Context context = getContext();
    String first = (firstId == 0) ? "" : context.getString(firstId);
    String[] certificates = mKeyStore.saw(prefix);

    if (certificates == null || certificates.length == 0) {
        certificates = new String[] {first};
    } else {
        String[] array = new String[certificates.length + 1];
        array[0] = first;
        System.arraycopy(certificates, 0, array, 1, certificates.length);
        certificates = array;
    }

    ArrayAdapter<String> adapter = new ArrayAdapter<String>(
            context, android.R.layout.simple_spinner_item, certificates);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(adapter);

    for (int i = 1; i < certificates.length; ++i) {
        if (certificates[i].equals(selected)) {
            spinner.setSelection(i);
            break;
        }
    }
}

with this call:

loadCertificates(mIpsecUserCert, Credentials.USER_CERTIFICATE,
            0, mProfile.ipsecUserCert);

now they use Credetials.USER_CERTIFICATE for the Method mKeyStore.saw(String prefix)

thats exactly what im looking for, but i cannot invoke the method saw and its also not mentioned in the android api…

so is there somehow a way of getting the same result for me?

the keystore library is not able of making a difference of user or system certs, and if i want to put all certs in a dropdown list it will cost me a lot of loading time. The other way of typing the subject name of the cert and looping through all certs till its the right one is not really practicable for a non-IT guy, so its crappy to handle for a normal user…

there are almost no references on this topic in the net, thats why im asking google android pro’s on this post only.

thankyou

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:21:35+00:00Added an answer on June 2, 2026 at 2:21 am

    This is a private API, it cannot be used by third party applications. Why do you want to select a user certificate? You generally want the user’s private key, and the KeyChain API supports letting the user select one of those.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Smack API, there is a configuration class for connection, described at this page
The web part lifecycle is described like this: On Page Load Constructor OnInit OnLoad
There is one thing, what I should make for client web page. All done,
Why there is InvalidCastException thrown? Can someone describe me this behavior? object zero =
Is there any 256 color xterm for MacOS x? Like the one described below?
I get this error on my Android emulator: Sorry The application has stopped unexpectedly.
If you scroll down a bit at this Apple Developer Page you'll find the
I have a web page on which I have a form. This form contains
I recently found this web page Crime in Downtown Houston that I'm interested in
I posted this question on the django-users list, but haven't had a reply there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.