Sample Mobile Application API Reference
The sample mobile application uses the IDCSSDKWrapper,
Const,
WebActivity,
and HomeActivity
Java classes.
IDCSSDKWrapper
The sample mobile application uses the com.oracle.idm.mobile.idcssampleapp.wrapper.IDCSSDKWrapper.java
class to interact with the SDK for Anroid Applications for most of the use cases.
-
The
getConfigMap()
method creates a map of the initialization parameters to be used by the SDK. -
The
IDCSSDKWrapper.java
class implements the singleton pattern (one instance of the Java object), so that the sample mobile application can interact with only one Oracle Identity Cloud Service instance. - The
initialize()
method instantiates the instance of theOMMobileSecurityService
class to be used by the sample application. -
This class also contains
OMMobileSecurityServiceCallbackImp
private inner class that implements theOMMobileSecurityServiceCallback
interface. An instance of this inner class is registered in the initialization of theOMMobileSecurityService
class object.
Const
The com.oracle.idm.mobile.idcssampleapp.wrapper.Const.java
class contains Oracle Identity Cloud Service information, such as the base URL, the well-known configuration service URL, and the Client ID that is generated for the mobile application that you registered in Oracle Identity Cloud Service.
WebActivity
The com.oracle.idm.mobile.idcssampleapp.ui.WebActivity.java
class represents the sample mobile application sign-in process.
-
The
initializeSDK()
method is executed during theonCreate
event. The method determines how the sample application interacts with the device browser. -
In the sample mobile application, the
browserMode
andtype
variables control the browser behavior. -
If the device supports Chrome Tab, then a layout-customizable Chrome browser window opens and displays the Oracle Identity Cloud Service sign-in page. If Chrome Tab isn't supported, then an external browser opens the sign-in page.
By default, the sample mobile application is configured to use the EMBEDDED
browser mode.
HomeActivity
After successful sign-in, the sample mobile application displays the home page, represented by the HomeActivity
class. It uses the instance of the OMMobileSecurityService
class to request the following information from Oracle Identity Cloud Service:
-
Get the list of applications that the user is assigned to, defined in the
getMyApps()
method. -
Get the list of groups that the user is assigned to, defined in the
getMyGroups()
method.