PayPalOneTouch/src/main/java/com/paypal/android/sdk/onetouch/core/PayPalOneTouchCore.java
public static PendingRequest getStartIntent(Context context, Request request) {
        initService(context);

        // calling this method functionally does nothing, but ensures that we send off FPTI data about wallet installs.
        isWalletAppInstalled(context);

        Recipe recipe = request.getRecipeToExecute(context, sConfigManager.getConfig());

        if (recipe == null) {
            return new PendingRequest(false, null, null, null);
        }

        if (RequestTarget.wallet == recipe.getTarget()) {
            request.trackFpti(context, TrackingPoint.SwitchToWallet, recipe.getProtocol());
            return new PendingRequest(true, RequestTarget.wallet, request.getClientMetadataId(),
                    AppSwitchHelper.getAppSwitchIntent(sContextInspector, sConfigManager, request, recipe));
        } else {
            Intent intent = BrowserSwitchHelper.getBrowserSwitchIntent(sContextInspector, sConfigManager, request);
            if (intent != null) {
                return new PendingRequest(true, RequestTarget.browser, request.getClientMetadataId(), intent);
            } else {
                return new PendingRequest(false, RequestTarget.browser, request.getClientMetadataId(), null);
            }
        }
    }
public static PendingRequest getStartIntent(Context context, Request request) {
        initService(context);

        // calling this method functionally does nothing, but ensures that we send off FPTI data about wallet installs.
        isWalletAppInstalled(context);

        Recipe recipe = request.getRecipeToExecute(context, sConfigManager.getConfig());

        if (recipe == null) {
            return new PendingRequest(false, null, null, null);
        }

        if (RequestTarget.wallet == recipe.getTarget()) {
            request.trackFpti(context, TrackingPoint.SwitchToWallet, recipe.getProtocol());
            return new PendingRequest(true, RequestTarget.wallet, request.getClientMetadataId(),
                    AppSwitchHelper.getAppSwitchIntent(sContextInspector, sConfigManager, request, recipe));
        } else {
            Intent intent = BrowserSwitchHelper.getBrowserSwitchIntent(sContextInspector, sConfigManager, request);
            if (intent != null) {
                return new PendingRequest(true, RequestTarget.browser, request.getClientMetadataId(), intent);
            } else {
                return new PendingRequest(false, RequestTarget.browser, request.getClientMetadataId(), null);
            }
        }
    }
public static PendingRequest getStartIntent ( Context context , Request request ) { initService ( context ) ; // calling this method functionally does nothing, but ensures that we send off FPTI data about wallet installs. isWalletAppInstalled ( context ) ; Recipe recipe = request . getRecipeToExecute ( context , sConfigManager . getConfig ( ) ) ; if ( recipe == null ) { return new PendingRequest ( false , null , null , null ) ; } if ( RequestTarget . wallet == recipe . getTarget ( ) ) { request . trackFpti ( context , TrackingPoint . SwitchToWallet , recipe . getProtocol ( ) ) ; return new PendingRequest ( true , RequestTarget . wallet , request . getClientMetadataId ( ) , AppSwitchHelper . getAppSwitchIntent ( sContextInspector , sConfigManager , request , recipe ) ) ; } else { Intent intent = BrowserSwitchHelper . getBrowserSwitchIntent ( sContextInspector , sConfigManager , request ) ; if ( intent != null ) { return new PendingRequest ( true , RequestTarget . browser , request . getClientMetadataId ( ) , intent ) ; } else { return new PendingRequest ( false , RequestTarget . browser , request . getClientMetadataId ( ) , null ) ; } } }
Get a {@link PendingRequest} containing an {@link Intent} used to start a PayPal
authentication request using the best possible authentication mechanism: wallet or browser.

@param context
@param request the {@link Request} used to build the {@link Intent}.
@return {@link PendingRequest}. {@link PendingRequest#isSuccess()} should be
checked before attempting to use the {@link Intent} it contains. If {@code true} an
{@link Intent} was created and can be used to start a PayPal authentication request.
If {@code false} it is not possible to authenticate given the current environment
and request.
Get a { @link PendingRequest } containing an { @link Intent } used to start a PayPal authentication request using the best possible authentication mechanism : wallet or browser .