### startIntentSender Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Starts an IntentSender. This allows for starting activities or services that have been pre-defined. ```APIDOC ## startIntentSender ### Description Starts an IntentSender. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags) ``` ### Response #### Success Response This function does not return a value directly upon successful execution, but rather initiates an IntentSender. #### Response Example None ``` -------------------------------- ### supportStartPostponedEnterTransition Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Starts the postponed enter transition for the drop-in UI. ```APIDOC ## supportStartPostponedEnterTransition ### Description Starts the postponed enter transition for the drop-in UI. ### Method N/A (This appears to be a function call within the SDK) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` -------------------------------- ### Permission and Activity Functions Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-add-card-fragment/index.html Functions for handling permission requests and starting activities. ```APIDOC ## shouldShowRequestPermissionRationale /api/drop-in ### Description Checks if the app should show a rationale for a permission request. ### Method open ### Endpoint shouldShowRequestPermissionRationale ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **permission** (String) - Required - The permission to check. ### Request Example ```json { "permission": "android.permission.CAMERA" } ``` ### Response #### Success Response (200) - **result** (Boolean) - True if the app should show a rationale, false otherwise. #### Response Example ```json { "result": true } ``` ``` ```APIDOC ## startActivity /api/drop-in ### Description Starts an activity. ### Method open ### Endpoint startActivity ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **intent** (Intent) - Required - The intent to start the activity. ### Request Example ```json { "intent": "start_activity_intent" } ``` ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## startActivityForResult /api/drop-in ### Description Starts an activity for a result. ### Method open ### Endpoint startActivityForResult ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **intent** (Intent) - Required - The intent to start the activity. - **requestCode** (Int) - Required - The request code. ### Request Example ```json { "intent": "start_activity_for_result_intent", "requestCode": 1002 } ``` ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## startIntentSenderForResult /api/drop-in ### Description Starts an intent sender for a result. ### Method open ### Endpoint startIntentSenderForResult ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **intent** (IntentSender) - Required - The intent sender. - **requestCode** (Int) - Required - The request code. - **fillInIntent** (Intent) - Optional - An intent to fill in. - **flagsMask** (Int) - Optional - The flags mask. - **flagsValues** (Int) - Optional - The flags values. - **extraFlags** (Int) - Optional - Extra flags. - **options** (Bundle) - Optional - Options for starting the activity. ### Request Example ```json { "intent": "intent_sender", "requestCode": 1003, "fillInIntent": "fill_in_intent", "flagsMask": 1, "flagsValues": 2, "extraFlags": 3, "options": "bundle_options" } ``` ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### startIntentSenderForResult Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Starts an IntentSender and expects a result. This is commonly used when you need to get a result back from the started activity. ```APIDOC ## startIntentSenderForResult ### Description Starts an IntentSender and expects a result. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin startIntentSenderForResult(intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags) ``` ### Response #### Success Response This function does not return a value directly upon successful execution, but rather initiates an IntentSender and expects a result via `onActivityResult`. #### Response Example None ``` -------------------------------- ### Activity and Transition Management Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Functions related to starting activities, managing transitions, and handling UI elements. ```APIDOC ## startNextMatchingActivity ### Description Starts the next activity that matches the given Intent. ### Method open fun ### Endpoint startNextMatchingActivity(intent: Intent): Boolean ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (Boolean) Returns true if an activity was started, false otherwise. #### Response Example None ## startPostponedEnterTransition ### Description Starts the postponed enter transition. ### Method open fun ### Endpoint startPostponedEnterTransition() ### Parameters None ### Request Example None ### Response None #### Response Example None ## startSupportActionMode ### Description Starts support action mode with the given callback. ### Method open fun ### Endpoint startSupportActionMode(callback: ActionMode.Callback): ActionMode ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (ActionMode) Returns the ActionMode instance that was started. #### Response Example None ## stopLocalVoiceInteraction ### Description Stops the local voice interaction. ### Method open fun ### Endpoint stopLocalVoiceInteraction() ### Parameters None ### Request Example None ### Response None #### Response Example None ## stopLockTask ### Description Stops the lock task mode. ### Method open fun ### Endpoint stopLockTask() ### Parameters None ### Request Example None ### Response None #### Response Example None ## stopManagingCursor ### Description Stops managing the given cursor. ### Method open fun ### Endpoint stopManagingCursor(c: Cursor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response None #### Response Example None ## supportFinishAfterTransition ### Description Finishes the current activity after the transition. ### Method open fun ### Endpoint supportFinishAfterTransition() ### Parameters None ### Request Example None ### Response None #### Response Example None ## supportInvalidateOptionsMenu ### Description Invalidates the options menu. ### Method open fun ### Endpoint supportInvalidateOptionsMenu() ### Parameters None ### Request Example None ### Response None #### Response Example None ## supportPostponeEnterTransition ### Description Postpones the enter transition. ### Method open fun ### Endpoint supportPostponeEnterTransition() ### Parameters None ### Request Example None ### Response None #### Response Example None ``` -------------------------------- ### startForegroundService Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Starts a foreground service. This function is used to initiate a background service that requires user notification. ```APIDOC ## startForegroundService ### Description Starts a foreground service. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin startForegroundService(intent) ``` ### Response #### Success Response (ComponentName) - **ComponentName** (ComponentName) - The component name of the started service. #### Response Example ```json { "example": "ComponentName" } ``` ``` -------------------------------- ### startInstrumentation Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Starts an instrumentation. This is typically used for testing purposes to control and monitor application execution. ```APIDOC ## startInstrumentation ### Description Starts an instrumentation. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin startInstrumentation(className, profileFile, arguments) ``` ### Response #### Success Response (Boolean) - **Boolean** (Boolean) - True if the instrumentation was started successfully, false otherwise. #### Response Example ```json { "example": true } ``` ``` -------------------------------- ### Activity and Intent Management Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-card-details-fragment/index.html Functions for starting activities and handling intents, including those requiring results. ```APIDOC ## startActivity /api/users ### Description Starts a new activity. ### Method open fun ### Endpoint startActivity(intent: Intent) ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **intent** (Intent) - The intent to start. ### Request Example ```json { "intent": { "action": "android.intent.action.VIEW", "data": "https://www.example.com" } } ``` ### Response #### Success Response (200) - None (This is a void function) #### Response Example None ``` ```APIDOC ## startActivityForResult /api/users ### Description Starts an activity for which you would like a result when it finishes. ### Method open fun ### Endpoint startActivityForResult(intent: Intent, requestCode: Int) ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **intent** (Intent) - The intent to start. - **requestCode** (Int) - Identifier for the request. ### Request Example ```json { "intent": { "action": "android.intent.action.PICK", "type": "image/*" }, "requestCode": 100 } ``` ### Response #### Success Response (200) - None (This is a void function) #### Response Example None ``` ```APIDOC ## startIntentSenderForResult /api/users ### Description Starts a `IntentSender`, and you would like a result when it finishes. ### Method open fun ### Endpoint startIntentSenderForResult(intent: IntentSender, requestCode: Int, fillInIntent: Intent, flagsMask: Int, flagsValues: Int, extraFlags: Int, options: Bundle) ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **intent** (IntentSender) - The IntentSender to start. - **requestCode** (Int) - Identifier for the request. - **fillInIntent** (Intent) - An optional Intent to merge into the IntentSender. - **flagsMask** (Int) - Flags to be applied to the Intent. - **flagsValues** (Int) - Values for the flags. - **extraFlags** (Int) - Additional flags. - **options** (Bundle) - Options for launching the activity. ### Request Example ```json { "intent": null, // Placeholder for IntentSender object "requestCode": 101, "fillInIntent": null, // Placeholder for Intent object "flagsMask": 0, "flagsValues": 0, "extraFlags": 0, "options": null // Placeholder for Bundle object } ``` ### Response #### Success Response (200) - None (This is a void function) #### Response Example None ``` -------------------------------- ### UI and Activity Management Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Functions for showing dialogs, starting activities, and managing the action mode. ```APIDOC ## showAssist ### Description Shows an assist action with the provided arguments. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **args** (Bundle) - The arguments for the assist action. ### Request Example None ### Response #### Success Response (Boolean) - **return value** (Boolean) - True if the assist action was shown, false otherwise. #### Response Example None ## showDialog ### Description Shows a dialog with a given ID, optionally with arguments. ### Method fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **id** (Int) - The ID of the dialog to show. - **args** (Bundle) - Optional arguments for the dialog. ### Request Example None ### Response #### Success Response (Boolean) - **return value** (Boolean) - True if the dialog was shown, false otherwise. #### Response Example None ## showLockTaskEscapeMessage ### Description Displays a message to escape the lock task mode. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters None ### Request Example None ### Response None ## startActionMode ### Description Starts an action mode with the given callback. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **callback** (ActionMode.Callback) - The callback to handle action mode events. ### Request Example None ### Response #### Success Response (ActionMode) - **return value** (ActionMode) - The started action mode. #### Response Example None ## startActivities ### Description Starts multiple activities in sequence. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **intents** (Array) - An array of intents to start. ### Request Example None ### Response None ## startActivity ### Description Starts a new activity. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **intent** (Intent) - The intent for the activity to start. ### Request Example None ### Response None ## startActivityForResult ### Description Starts an activity for which you would like a result when it finishes. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **intent** (Intent) - The intent for the activity to start. - **requestCode** (Int) - The integer request code originally supplied to startActivityForResult(), allowing you to associate the result back with the original request. ### Request Example None ### Response None ## startActivityFromChild ### Description Starts an activity from a child activity. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **child** (Activity) - The child activity from which to start the new activity. - **intent** (Intent) - The intent for the activity to start. - **requestCode** (Int) - The integer request code. ### Request Example None ### Response None ## startActivityFromFragment ### Description Starts an activity from a fragment. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **fragment** (Fragment) - The fragment from which to start the new activity. - **intent** (Intent) - The intent for the activity to start. - **requestCode** (Int) - The integer request code. ### Request Example None ### Response None ## startActivityIfNeeded ### Description Like `startActivity(Intent)`, but with the added capability of just returning the Intent if it cannot be launched. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **intent** (Intent) - The intent for the activity to start. - **requestCode** (Int) - The integer request code. ### Request Example None ### Response #### Success Response (Boolean) - **return value** (Boolean) - True if the activity was started, false otherwise. #### Response Example None ## startForegroundService ### Description Starts a foreground service. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### CardDetailsFragment - onCreate Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-card-details-fragment/on-create.html The onCreate method is called when the fragment is first created. It is where you can perform initial setup of the fragment, such as initializing variables, inflating layouts, and setting up event listeners. ```APIDOC ## onCreate CardDetailsFragment ### Description This method is called when the fragment is first created. It is where you can perform initial setup of the fragment, such as initializing variables, inflating layouts, and setting up event listeners. ### Method open fun ### Endpoint N/A (This is a method within a class, not an API endpoint) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Window Focus and Action Mode Functions Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Functions related to managing window focus and starting action modes. ```APIDOC ## onWindowFocusChanged ### Description Called when the window of this view has gained or lost focus. ### Method open fun ### Endpoint N/A (Method within a class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ## onWindowStartingActionMode ### Description Called when an action mode is requested. ### Method open fun ### Endpoint N/A (Method within a class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **callback** (ActionMode.Callback) - Required - The callback to be invoked when the action mode is created. ### Request Example None ### Response #### Success Response (200) - **ActionMode** (ActionMode) - The ActionMode that was created, or null if the action mode could not be created. #### Response Example None ## onWindowStartingSupportActionMode ### Description Called when a support action mode is requested. ### Method open fun ### Endpoint N/A (Method within a class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **callback** (ActionMode.Callback) - Required - The callback to be invoked when the action mode is created. ### Request Example None ### Response #### Success Response (200) - **ActionMode** (ActionMode) - The ActionMode that was created, or null if the action mode could not be created. #### Response Example None ``` -------------------------------- ### onPrepareOptionsMenu Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-add-card-fragment/index.html Called to prepare the options menu before it is displayed. ```APIDOC ## onPrepareOptionsMenu ### Description Called to prepare the options menu before it is displayed. ### Method open fun ### Endpoint N/A (Lifecycle Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Instantiate DropInClient with Tokenization Key or Client Token (Java) Source: https://github.com/braintree/braintree-android-drop-in/blob/main/v6_MIGRATION_GUIDE.md Use this when initializing DropInClient with a tokenization key or client token. Replace `` with the appropriate context. ```Java DropInClient dropInClient = new DropInClient(, "TOKENIZATION_KEY_OR_CLIENT_TOKEN"); ``` -------------------------------- ### onSupportContentChanged Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Called when the content of the activity has changed. This method is called when the activity's content view is changed, for example, when a new activity is started or when the current activity is resumed. ```APIDOC ## onSupportContentChanged ### Description Called when the content of the activity has changed. This method is called when the activity's content view is changed, for example, when a new activity is started or when the current activity is resumed. ### Method open fun ### Endpoint onSupportContentChanged() ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Launch Drop-In UI Source: https://github.com/braintree/braintree-android-drop-in/blob/main/README.md Instantiate DropInClient with client authorization and launch the Drop-in UI using launchDropInForResult. ```kotlin val dropInClient = DropInClient(this, "<#CLIENT_AUTHORIZATION#>") dropInClient.setListener(this) dropInClient.launchDropIn(dropInRequest) ``` -------------------------------- ### startIntentSenderFromChild Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Starts an IntentSender from a child activity. This is useful when you need to start an activity from a context that is not the direct parent. ```APIDOC ## startIntentSenderFromChild ### Description Starts an IntentSender from a child activity. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin startIntentSenderFromChild(child, intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags) ``` ### Response #### Success Response This function does not return a value directly upon successful execution, but rather initiates an IntentSender. #### Response Example None ``` -------------------------------- ### Initialize DropInClient with Tokenization Key Source: https://context7.com/braintree/braintree-android-drop-in/llms.txt Instantiate DropInClient using a tokenization key for basic integrations or testing. Implement the DropInListener interface to handle payment results and errors. ```kotlin class CheckoutActivity : AppCompatActivity(), DropInListener { private lateinit var dropInClient: DropInClient override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // Option 1: Using a tokenization key (for testing or basic use) dropInClient = DropInClient(this, "sandbox_your_tokenization_key") dropInClient.setListener(this) } // Option 2: Using ClientTokenProvider for dynamic token fetching private fun setupWithClientTokenProvider() { dropInClient = DropInClient(this, ClientTokenProvider { callback -> // Fetch client token from your server asynchronously yourApi.getClientToken { token, error -> if (token != null) { callback.onSuccess(token) } else { callback.onFailure(error) } } }) dropInClient.setListener(this) } override fun onDropInSuccess(result: DropInResult) { // Payment method nonce received - send to your server val nonce = result.paymentMethodNonce?.string val deviceData = result.deviceData // POST nonce and deviceData to your server to complete the transaction } override fun onDropInFailure(error: Exception) { when (error) { is UserCanceledException -> Log.d("Checkout", "User canceled") else -> Log.e("Checkout", "Error: ${error.message}") } } } ``` -------------------------------- ### Instantiate DropInClient with Tokenization Key or Client Token (Kotlin) Source: https://github.com/braintree/braintree-android-drop-in/blob/main/v6_MIGRATION_GUIDE.md Use this when initializing DropInClient with a tokenization key or client token. Replace `` with the appropriate context. ```Kotlin val dropInClient = DropInClient(, "TOKENIZATION_KEY_OR_CLIENT_TOKEN") ``` -------------------------------- ### Voice Interactor Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the VoiceInteractor. ```APIDOC ## getVoiceInteractor ### Description Returns the VoiceInteractor. ### Method fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **VoiceInteractor** (VoiceInteractor) - The VoiceInteractor object. #### Response Example None ``` -------------------------------- ### ViewModel Store Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the ViewModelStore. ```APIDOC ## getViewModelStore ### Description Returns the ViewModelStore. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **ViewModelStore** (ViewModelStore) - The ViewModelStore object. #### Response Example None ``` -------------------------------- ### onCreateSupportNavigateUpTaskStack Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Called to build the task stack for navigating up. ```APIDOC ## onCreateSupportNavigateUpTaskStack ### Description Called to build the task stack for navigating up. ### Method open fun ### Endpoint N/A (Android Lifecycle Method) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body - **builder** (androidx.core.app.TaskStackBuilder) - Required - The TaskStackBuilder to configure. ### Request Example N/A ### Response #### Success Response N/A #### Response Example N/A ``` -------------------------------- ### Title Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the current title. ```APIDOC ## getTitle ### Description Returns the title. ### Method fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **CharSequence** (CharSequence) - The title. #### Response Example None ``` -------------------------------- ### Instantiate DropInClient with ClientTokenProvider (Java) Source: https://github.com/braintree/braintree-android-drop-in/blob/main/v6_MIGRATION_GUIDE.md Initialize DropInClient using a ClientTokenProvider to asynchronously fetch the client token. The callback should be invoked with the token or an error. ```Java DropInClient dropInClient = new DropInClient(, callback -> { // fetch client token asynchronously... callback.onSuccess("CLIENT_TOKEN_FROM_SERVER"); }); ``` -------------------------------- ### Theme Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the current theme. ```APIDOC ## getTheme ### Description Returns the current theme. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Resources.Theme** (Resources.Theme) - The current theme. #### Response Example None ``` -------------------------------- ### DropInClient Initialization with Fragment and Tokenization Key Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-client/-drop-in-client.html Initializes the DropInClient from a Fragment using a Tokenization Key for authorization. ```APIDOC ## DropInClient Initialization with Fragment and Tokenization Key ### Description Creates a new instance of `DropInClient` from within a Fragment using a Tokenization Key authorization. ### Method `DropInClient(fragment: Fragment, authorization: String)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin val dropInClient = DropInClient(this, "YOUR_TOKENIZATION_KEY") ``` ### Response #### Success Response (200) N/A (Constructor) #### Response Example N/A ``` -------------------------------- ### Loader Manager Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the SupportLoaderManager. ```APIDOC ## getSupportLoaderManager ### Description Returns the SupportLoaderManager. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **LoaderManager** (LoaderManager) - The LoaderManager object. #### Response Example None ``` -------------------------------- ### Fragment Manager Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the SupportFragmentManager. ```APIDOC ## getSupportFragmentManager ### Description Returns the SupportFragmentManager. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **FragmentManager** (FragmentManager) - The FragmentManager object. #### Response Example None ``` -------------------------------- ### Instantiate DropInClient with ClientTokenProvider (Kotlin) Source: https://github.com/braintree/braintree-android-drop-in/blob/main/v6_MIGRATION_GUIDE.md Initialize DropInClient using a ClientTokenProvider to asynchronously fetch the client token. The callback should be invoked with the token or an error. ```Kotlin val dropInClient = DropInClient(, ClientTokenProvider { callback -> // fetch client token asynchronously... callback.onSuccess("CLIENT_TOKEN_FROM_SERVER"); }) ``` -------------------------------- ### onCreateOptionsMenu Function Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-add-card-fragment/index.html Initialize the contents of the standard options menu. ```APIDOC ## onCreateOptionsMenu ### Description Initialize the contents of the standard options menu. This is where you inflate your menu layout. ### Method N/A (Lifecycle method) ### Endpoint N/A (This is a function call within the SDK) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example N/A ### Response None ``` -------------------------------- ### ActionBarDrawerToggle Delegate Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Gets the delegate for the ActionBarDrawerToggle. ```APIDOC ## getDrawerToggleDelegate ### Description Returns the delegate for the ActionBarDrawerToggle. ### Method GET ### Endpoint N/A (Function call) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **ActionBarDrawerToggle.Delegate** (object) - The ActionBarDrawerToggle delegate. ``` -------------------------------- ### AppCompatDelegate Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Gets the AppCompatDelegate for the current activity. ```APIDOC ## getDelegate ### Description Retrieves the AppCompatDelegate associated with this context. ### Method GET ### Endpoint N/A (Function call) ### Parameters None ### Request Example None ### Response #### Success Response (200) - **AppCompatDelegate** (object) - The AppCompatDelegate instance. ``` -------------------------------- ### Launch Drop-In UI (Kotlin) Source: https://github.com/braintree/braintree-android-drop-in/blob/main/v6_MIGRATION_GUIDE.md Launch the Drop-in UI after instantiating DropInClient. A DropInRequest object is required. ```Kotlin val dropInRequest = DropInRequest() dropInClient.launchDropIn(dropInRequest) ``` -------------------------------- ### onGetLayoutInflater Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-add-card-fragment/index.html Called to get the LayoutInflater for this fragment. ```APIDOC ## onGetLayoutInflater ### Description Called to get the LayoutInflater for this fragment. ### Method open fun ### Endpoint N/A (Lifecycle Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **LayoutInflater** (android.view.LayoutInflater) - The LayoutInflater instance. #### Response Example None ``` -------------------------------- ### onLocalVoiceInteractionStarted Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Called when local voice interaction starts. ```APIDOC ## onLocalVoiceInteractionStarted ### Description Called when local voice interaction starts. ### Method open fun ### Endpoint N/A (Callback function) ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### onCreate Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-card-details-fragment/index.html Called when the activity is first created. This is where most initialization should go. ```APIDOC ## onCreate ### Description Called when the activity is first created. ### Method open fun ### Endpoint N/A (Lifecycle method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### DropInClient Initialization with Fragment and Tokenization Key Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-client/-drop-in-client.html Creates a new instance of DropInClient from within a Fragment using a Tokenization Key for authorization. ```APIDOC ## DropInClient(fragment: Fragment, dropInRequest: DropInRequest, authorization: String) ### Description Create a new instance of [DropInClient](index.html) from within a Fragment using a Tokenization Key authorization. ### Method Constructor ### Endpoint N/A (Constructor) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response N/A ### Deprecated use [DropInClient](-drop-in-client.html) instead. ``` -------------------------------- ### Title Color Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the color of the title. ```APIDOC ## getTitleColor ### Description Returns the color of the title. ### Method fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Int** (Int) - The title color. #### Response Example None ``` -------------------------------- ### Launch Drop-In For Result Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-client/index.html Launches the Drop-In UI and expects a result back. Requires an Activity context and a request code. ```APIDOC ## launchDropInForResult ### Description Launches the Drop-In UI and expects a result back. ### Method Open Function ### Parameters - **activity** (FragmentActivity) - Required - The Activity context. - **requestCode** (Int) - Required - The request code to identify the result. ``` -------------------------------- ### Action Bar Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the Support ActionBar. ```APIDOC ## getSupportActionBar ### Description Returns the Support ActionBar associated with this activity. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **ActionBar** (ActionBar) - The ActionBar object. #### Response Example None ``` -------------------------------- ### Splash Screen Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the current SplashScreen. ```APIDOC ## getSplashScreen ### Description Returns the current SplashScreen. ### Method fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **SplashScreen** (SplashScreen) - The SplashScreen object. #### Response Example None ``` -------------------------------- ### DropInClient Initialization with Fragment and ClientTokenProvider Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-client/-drop-in-client.html Initializes the DropInClient from a Fragment using a ClientTokenProvider to fetch authorization. ```APIDOC ## DropInClient Initialization with Fragment and ClientTokenProvider ### Description Creates a new instance of `DropInClient` from within a Fragment using a `ClientTokenProvider` to fetch authorization. ### Method `DropInClient(fragment: Fragment, clientTokenProvider: ClientTokenProvider)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin val clientTokenProvider = object : ClientTokenProvider { override fun getClientToken(): String { // Implement logic to fetch client token return "YOUR_CLIENT_TOKEN" } } val dropInClient = DropInClient(this, clientTokenProvider) ``` ### Response #### Success Response (200) N/A (Constructor) #### Response Example N/A ``` -------------------------------- ### Text Resources Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get a CharSequence resource by its ID. ```APIDOC ## getText ### Description Retrieves a CharSequence from resources using its resource ID. ### Method fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **CharSequence** (CharSequence) - The text resource. #### Response Example None ``` -------------------------------- ### onCreateOptionsMenu Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-card-details-fragment/index.html Initialize the contents of the activity's standard options menu. ```APIDOC ## onCreateOptionsMenu ### Description Initialize the contents of the activity's standard options menu. ### Method open fun ### Endpoint N/A (Lifecycle method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### String Resources Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get a string resource by its ID. ```APIDOC ## getString ### Description Retrieves a string from resources using its resource ID. ### Method fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **String** (String) - The string resource. #### Response Example None ``` -------------------------------- ### Prepare Support Navigate Up Task Stack Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Prepares the task stack for navigating up in the application hierarchy, specifically for support library activities. ```APIDOC ## onPrepareSupportNavigateUpTaskStack ### Description Prepares the task stack for navigating up in the application's hierarchy, using the support library's TaskStackBuilder. This is called before navigating up to ensure the back stack is correctly constructed. ### Method open fun ### Endpoint N/A (Callback method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **builder** (TaskStackBuilder) - Required - A TaskStackBuilder used to construct the parent activity stack for support activities. ``` -------------------------------- ### Object Representation Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-card-details-fragment/index.html Function for getting the string representation of an object. ```APIDOC ## toString /api/users ### Description Returns a string representation of the object. ### Method open fun ### Endpoint toString(): String ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```json { "operation": "toString" } ``` ### Response #### Success Response (200) - **return_value** (String) - The string representation of the object. #### Response Example ```json { "return_value": "SomeObject@1a2b3c4d" } ``` ``` -------------------------------- ### Layout and Resource Accessors Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-add-card-fragment/index.html Functions to get the LayoutInflater and Resources. ```APIDOC ## GET Layout and Resource Accessors ### Description Provides access to the LayoutInflater for inflating layouts and the Resources object for accessing application resources. ### Method GET ### Endpoint N/A (These are methods within a Fragment class) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **LayoutInflater** (android.view.LayoutInflater) - The LayoutInflater instance. - **Resources** (android.content.res.Resources) - The Resources object. #### Response Example N/A ``` -------------------------------- ### Prepare Options Menu Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Called before the options menu is displayed. Allows for dynamic modification of menu items. ```APIDOC ## onPrepareOptionsMenu ### Description Called just before the options menu is displayed. This method provides an opportunity to modify the menu items dynamically based on the current state of the application. ### Method open fun ### Endpoint N/A (Callback method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **menu** (Menu) - Required - The options menu to prepare. ### Response #### Success Response (200) - **Boolean** - Returns true if the menu should be displayed, false otherwise. ``` -------------------------------- ### Task ID Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the current task's ID. ```APIDOC ## getTaskId ### Description Returns the identifier of the current task. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Int** (Int) - The task ID. #### Response Example None ``` -------------------------------- ### Fragment Instantiation and Utility Functions Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-add-card-fragment/index.html This section covers functions for instantiating fragments and other utility methods. ```APIDOC ## Fragment Instantiation and Utility Functions ### Description Functions for creating new fragment instances and utility methods. ### Functions - **`instantiate(context: Context, fname: String)`**: Instantiates a fragment given a class name. - **`getText(resId: Int)`**: Retrieves a CharSequence from resources using a resource ID. - **`getTargetRequestCode()`**: Returns the target request code. - **`hashCode()`**: Returns the hash code of the fragment. - **`hasOptionsMenu()`**: Returns whether the fragment has an options menu. ``` -------------------------------- ### Transition Accessors Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-add-card-fragment/index.html Methods to get the reenter and return transition objects. ```APIDOC ## GET Transition Accessors ### Description Retrieves the transition objects used for fragment re-entry and return animations. ### Method GET ### Endpoint N/A (These are methods within a Fragment class) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **Any** (kotlin.Any) - The transition object. #### Response Example N/A ``` -------------------------------- ### Launch Drop-In UI (Java) Source: https://github.com/braintree/braintree-android-drop-in/blob/main/v6_MIGRATION_GUIDE.md Launch the Drop-in UI after instantiating DropInClient. A DropInRequest object is required. ```Java DropInRequest dropInRequest = new DropInRequest(); dropInClient.launchDropIn(dropInRequest); ``` -------------------------------- ### Wallpaper and Permission Functions Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Functions to set the wallpaper and check for permission rationale. ```APIDOC ## setWallpaper ### Description Sets the device wallpaper. ### Method open fun ### Endpoint setWallpaper ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **bitmap** (Bitmap) - Required - The Bitmap to set as wallpaper. ### Request Example ```json { "bitmap": "Bitmap object" } ``` ### Response #### Success Response (200) None #### Response Example None ## shouldDockBigOverlays ### Description Checks if big overlays should be docked. ### Method open fun ### Endpoint shouldDockBigOverlays ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **return value** (Boolean) - True if big overlays should be docked, false otherwise. #### Response Example ```json { "returnValue": true } ``` ## shouldShowRequestPermissionRationale ### Description Checks if the system should show a rationale for a permission request. ### Method open fun ### Endpoint shouldShowRequestPermissionRationale ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **return value** (Boolean) - True if rationale should be shown, false otherwise. #### Response Example ```json { "returnValue": true } ``` ``` -------------------------------- ### System Service Name Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the name of a system service by its class. ```APIDOC ## getSystemServiceName ### Description Returns the name of the system service for the given class. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **String** (String) - The name of the system service. #### Response Example None ``` -------------------------------- ### Parent Activity Intent Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Function to get the Support Parent Activity Intent. ```APIDOC ## getSupportParentActivityIntent ### Description Returns the Intent for the parent activity. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **Intent** (Intent) - The Intent for the parent activity. #### Response Example None ``` -------------------------------- ### DropInClient Initialization with Activity and Tokenization Key Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-client/-drop-in-client.html Initializes the DropInClient from an Activity using a Tokenization Key for authorization. ```APIDOC ## DropInClient Initialization with Activity and Tokenization Key ### Description Creates a new instance of `DropInClient` from within an Activity using a Tokenization Key authorization. ### Method `DropInClient(activity: FragmentActivity, authorization: String)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin val dropInClient = DropInClient(this, "YOUR_TOKENIZATION_KEY") ``` ### Response #### Success Response (200) N/A (Constructor) #### Response Example N/A ``` -------------------------------- ### startManagingCursor Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Starts managing a cursor. This is used to ensure that a cursor is properly closed when the activity is destroyed. ```APIDOC ## startManagingCursor ### Description Starts managing a cursor. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin startManagingCursor(c) ``` ### Response #### Success Response This function does not return a value directly upon successful execution. #### Response Example None ``` -------------------------------- ### Configure Sonatype Snapshots Repo for SNAPSHOT Builds Source: https://github.com/braintree/braintree-android-drop-in/blob/main/README.md Add this repo to your top-level build.gradle to import SNAPSHOT builds. ```groovy allprojects { repositories { maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } } } ``` -------------------------------- ### startLocalVoiceInteraction Source: https://github.com/braintree/braintree-android-drop-in/blob/main/docs/Drop-In/com.braintreepayments.api/-drop-in-activity/index.html Starts a local voice interaction. This is used for initiating voice-based interactions within the application. ```APIDOC ## startLocalVoiceInteraction ### Description Starts a local voice interaction. ### Method open fun ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin startLocalVoiceInteraction(privateOptions) ``` ### Response #### Success Response This function does not return a value directly upon successful execution. #### Response Example None ```