Update the SDK for the Sample Mobile Application

You update the sample application code to make it use the Oracle Identity Cloud Service SDK for Android Applications.

  1. Start Android Studio.
  2. To ensure that your Android Studio installation has the Android API Level 24 installed, click Configure, and then click SDK Manager.
    The Default Settings window appears. The SDK Platforms tab lists the Android API Levels available for installation. The SDK Tools tab shows the version of the SDK Build-Tools installed.
  3. Click Open an existing Android Studio project, select the sample application folder, and then click OK.
  4. On the Project pane, expand app, expand java, expand com.oracle.idm.mobile.idcssampleapp, and then expand wrapper.
  5. Double-click the Constant class.
  6. On the Const.java tab, update the following entries:
    • OPEN_ID_DISCOVERY_URL: Enter the configuration URL of your Oracle Identity Cloud Service.
    • OPEN_ID_CLIENT_ID: Replace SDK_MOBILE_APP_CLIENT_ID with the value of the client ID of the application that you registered.
    • OAUTH_AUTHZ_CODE_RESOURCE_URL: Enter the domain name URL of your Oracle Identity Cloud Service.

    In the following example, replace MYTENANT with the name of your Oracle Identity Cloud Service tenant.

    public static final String OPEN_ID_DISCOVERY_URL = "https://MYTENANT.identity.oraclecloud.com/.well-known/idcs-configuration";
    public static final String OPEND_ID_REDIRECT_EP = "idcsmobileapp://nodata";
    public static final String OPEN_ID_CLIENT_ID = "SDK_MOBILE_APP_CLIENT_ID";
    public static final String OAUTH_AUTHZ_CODE_RESOURCE_URL = "https://MYTENANT.identity.oraclecloud.com/";
  7. On the Project pane, select the app application, select Build from the top menu, and then click Rebuild Project.
    Android Studio downloads all the necessary components and libraries to build the application.
  8. If you're behind a proxy, to set up the HTTP Proxy, from the File menu, select Settings.