GVKun编程网logo

Stripe presentWithSetupIntent 不显示 SetupIntents 的 PaymentSheet

32

本文的目的是介绍StripepresentWithSetupIntent不显示SetupIntents的PaymentSheet的详细情况,我们将通过专业的研究、有关数据的分析等多种方式,同时也不会遗

本文的目的是介绍Stripe presentWithSetupIntent 不显示 SetupIntents 的 PaymentSheet的详细情况,我们将通过专业的研究、有关数据的分析等多种方式,同时也不会遗漏关于.net Web API 2,return HttpResponseMessage with ObjectContent、4.8 Beijing Rust Meetup | Call For Presenters、Android setContentView或Intents?、android.content.IntentSender.SendIntentException的实例源码的知识。

本文目录一览:

Stripe presentWithSetupIntent 不显示 SetupIntents 的 PaymentSheet

Stripe presentWithSetupIntent 不显示 SetupIntents 的 PaymentSheet

如何解决Stripe presentWithSetupIntent 不显示 SetupIntents 的 PaymentSheet?

我已经针对 PaymentIntents 测试了 Stripe 的 PaymentSheet,传递了支付意图客户端机密、客户 ID 和临时密钥。 无论是否通过银行验证步骤,我都成功关闭了付款。

我正在尝试使用 SetupIntent,因为我现在需要授权付款,但将来需要向用户收费。因此,我为客户生成了预定订阅并获得了设置意图客户端机密。

我的问题是,当我打电话时

paymentSheet.presentWithSetupIntent(
    setupIntentClientSecret,PaymentSheet.Configuration(
        merchantdisplayName = Constants.MERCHANT,customer = PaymentSheet.CustomerConfiguration(
            customerId,ephemeralKeySecret
        )
    )
)

我看到付款单从底部出来,只有一个无限的进度条,好像设置意图无效。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

.net Web API 2,return HttpResponseMessage with ObjectContent

.net Web API 2,return HttpResponseMessage with ObjectContent

public async TaskHttpResponseMessage Register(AllenRegistration model) { 1. Will return 400 Error return Request.CreateResponse( HttpStatusCode.BadReques t); 2. Will return Json Type like {return1:A,returnBL:B} return new HttpResponseMessa

public async Task Register(AllenRegistration model)

{

1.


Will return 400 Error 

  return Request.CreateResponse(HttpStatusCode.BadRequest);


2.

Will return Json Type like   {"return1":"A","returnB"L:"B"}

return new HttpResponseMessage(HttpStatusCode.OK)

            {
                Content = new ObjectContent(new
                {
                    return1="A",

                    return2="B"
                }, Configuration.Formatters.JsonFormatter)
            };
        }


4.8 Beijing Rust Meetup | Call For Presenters

4.8 Beijing Rust Meetup | Call For Presenters

如果你有兴趣参与探讨Rust作为一种强调性能、安全和并发性的编程语言的各种应用、实践和无限可能性的头脑风暴,就一定不能错过这场来自达坦科技、南京大学、CloudWeGo、华为等技术专家带来的关于Rust编程语言相关应用的线下Meetup。我们的主题是Rust X意在探讨用Rust编程语言“点亮”的任何应用、实践和探索。

时间:2023年4月8日 14:00

地点:环球财讯中心M层 北京市西城区宣武门外大街甲 1 号

嘉宾演讲(Presenter & Topic)

目前已经锁定的分享嘉宾和演讲主题有:

嘉宾:冯洋 南京大学计算机科学与技术系助理研究员

议题:基于实际场景应用分析的Rust库模糊测试技术报告

摘要:Rust是一种诺内存安全和并发安全的语言,而各类Rust库中API的漏洞与缺陷可能会对所有使用该库的程序产生影响。因此,保障Rust库的安全性与可靠性是一个极为重要的问题。为了进一步保障Rust库的安全,通过模糊测试来对Rust的库进行测试是一个可行方法。在本报告中,我们提出了一种依靠现有Rust生态系统来生成模糊测试目标的方法,该方法利用MIR解析待测库所在生态系统中的项目,找到现实中API之间的调用和依赖关系,从而从中提取出待测库的API序列,依此生成Rust库的模糊测试目标。

嘉宾:施继成 达坦科技联合创始人兼CTO

议题:在Linux 6.2中用Rust语言写驱动

摘要: Linux 在 6.1 中加入了 rust 语言的支持,自此开发者可以使用 Rust 语言进行 Linux 内核驱动开发。因为 Rust 语言的安全性,未来驱动的开发工作使用 Rust 语言将成为必然趋势。虽然 Rust 语言的支持还有许多不完善的地方,但不妨碍我们“吃螃蟹”——使用 Rust 语言写一个 Linux 驱动。

本次分享将:

  1. 介绍 Linux 系统的 Rust 语言支持。
  2. 以 Linux 上的简单 Driver 举例,说明如何用 Rust 写驱动。
  3. 分析 Rust 在 Linux 中工作的原理。
  4. 列举 Rust 进行驱动编写时的限制。
  5. 给出使用 Rust 编写驱动的 Guideline。

嘉宾:叶天星 华为技术有限公司

议题:用Rust实现Git传输协议、Git对象解析和数据库存储

摘要:本次分享将包含:

使用 Rust 实现 Git 传输协议 - Git 传输协议是一种用于 Git 客户端和服务器之间进行通信的协议,有两种实现方式:HTTP 和 SSH。Git 传输协议可以确保数据传输的安全性和可靠性,并且能够高效地处理大量的数据。通过使用 Rust,可以轻松地实现 Git 客户端和服务器之间的数据传输,并确保高效的网络通信和数据安全性。
Git 存储结构介绍 - Git 使用了一种称为对象存储的方式来存储代码版本信息。Git 对象有四种类型:blob、tree、commit 和 tag。

提交议题 (Call for Presenters)

无论是您正在用Rust编写安全性要求高的系统级软件,还是高效的并发程序,或是游戏、Web/移动应用程序等,只要是有关Rust应用的有趣、有意义的想法和实践,欢迎提交议题,和更多的同行分享交流。

请将姓名、公司、议题、摘要,联系方式等信息,发送至tianwei.wang@datenlord.com
WechatIMG3715.jpeg

Meetup报名方式 (Registration)

欢迎点击链接报名:https://www.meetup.com/rust-chinese-group/events/292379002

Android setContentView或Intents?

Android setContentView或Intents?

我有一个非常简单的2屏幕android应用.

如果仅通过setContentView切换版面有什么弊端吗?或者我应该使用Intents吗?

解决方法:

如Android Dev http://developer.android.com/reference/android/content/Intent.html所述

An Intent provides a facility for
performing late runtime binding
between the code in different
applications. Its most significant use
is in the launching of activities,
where it can be thought of as the glue
between activities. It is basically a
passive data structure holding an
abstract description of an action to
be performed.

因此,如果您的两个屏幕是2个不同的应用程序,那么我会说您只想使用setContentView.

当您要将信息从一个视图传递到另一个视图时,它将简化您的代码

android.content.IntentSender.SendIntentException的实例源码

android.content.IntentSender.SendIntentException的实例源码

项目:GodotGoogleService    文件:PlayService.java   
private void handleSignInResult(GoogleSignInResult m_result) {
    if (m_result.isSuccess()) {
        mAccount = m_result.getSignInAccount();
        succeedSignIn();
    } else {
        Status s = m_result.getStatus();

        Log.w(TAG,"SignInResult::Failed code="
        + s.getStatusCode() + ",Message: " + s.getStatusMessage());

        if (isResolvingConnectionFailure) { return; }
        if (!isIntentInProgress && m_result.getStatus().hasResolution()) {
            try {
                isIntentInProgress = true;

                activity.startIntentSenderForResult(
                s.getResolution().getIntentSender(),GOOGLE_SIGN_IN_REQUEST,null,0);
            } catch (SendIntentException ex) {
                connect();
            }

            isResolvingConnectionFailure = true;
        }
    }
}
项目:GodotFireBase    文件:GoogleSignIn.java   
@Override
public void onConnectionFailed(@NonNull ConnectionResult m_result) {
    Utils.d("Google:Connection:Failed");

    if (isResolvingConnectionFailure) { return; }
    if(!isIntentInProgress && m_result.hasResolution()) {
        try {
            isIntentInProgress = true;

            activity.startIntentSenderForResult(
            m_result.getResolution().getIntentSender(),Utils.FIREBASE_GOOGLE_SIGN_IN,0);

        } catch (SendIntentException ex) {
            isIntentInProgress = false;
            signIn();
        }

        isResolvingConnectionFailure = true;
        Utils.d("Google:Connection:Resolving.");
               }
}
项目:godot-gpgs    文件:Client.java   
public boolean resolveConnectionFailure(ConnectionResult result,int requestCode) {
    if (result.hasResolution()) {
        try {
            result.startResolutionForResult(activity,requestCode);
            return true;
        } catch (IntentSender.SendIntentException e) {
            // The intent was canceled before it was sent.  Return to the default
            // state and attempt to connect to get an updated ConnectionResult.
            googleapiclient.connect();
            return false;
        }
    } else {
        // not resolvable... so show an error message
        int errorCode = result.getErrorCode();

        if (errorCode == ConnectionResult.INTERNAL_ERROR) {
            googleapiclient.connect();
        }

        GodotLib.calldeferred(instance_id,"_on_google_play_game_services_connection_Failed",new Object[] { });
        Log.i(TAG,"GPGS: onConnectionFailed error code: " + String.valueOf(errorCode));
        return false;
    }
}
项目:FMTech    文件:ehh.java   
public final void run()
{
  if (this.b.a()) {
    try
    {
      int i = 1 + (1 + this.c.f().b.a.d.f().indexOf(this.c) << 16);
      this.b.a(this.c.f(),i);
      return;
    }
    catch (IntentSender.SendIntentException localSendIntentException)
    {
      ehe.a(this.c);
      return;
    }
  }
  if (eer.b(this.b.c))
  {
    eer.a(this.b.c,this.c.f(),this.c,2,this.c);
    return;
  }
  ehe.a(this.c,this.a,this.b);
}
项目:zulip-android    文件:LoginActivity.java   
@Override
public void onConnectionFailed(ConnectionResult result) {
    if (commonProgressDialog.isShowing()) {
        // The user clicked the sign-in button already. Start to resolve
        // connection errors. Wait until onConnected() to dismiss the
        // connection dialog.
        if (result.hasResolution()) {
            try {
                result.startResolutionForResult(this,REQUEST_CODE_RESOLVE_ERR);
            } catch (SendIntentException e) {
                Log.e(TAG,e.getMessage(),e);
                // Yeah,no idea what to do here.
                commonProgressDialog.dismiss();
                Toast.makeText(LoginActivity.this,R.string.google_app_login_Failed,Toast.LENGTH_SHORT).show();
            }
        } else {
            commonProgressDialog.dismiss();
            if (!isNetworkAvailable()) {
                Toast.makeText(LoginActivity.this,R.string.toast_no_internet_connection,Toast.LENGTH_SHORT).show();
            } else {
                Toast.makeText(LoginActivity.this,Toast.LENGTH_SHORT).show();
            }

        }
    }
}
项目:yelo-android    文件:GooglePlusManager.java   
/**
 * A helper method to flip the mResolveOnFail flag and start the resolution
 * of the ConnenctionResult from the Failed connect() call.
 */
private void startResolution() {

    try {
        // Don't start another resolution Now until we have a
        // result from the activity we're about to start.
        mResolveOnFail = false;
        // If we can resolve the error,then call start resolution
        // and pass it an integer tag we can use to track. This means
        // that when we get the onActivityResult callback we'll kNow
        // its from being started here.
        mConnectionResult
                        .startResolutionForResult(mActivity,CONNECTION_UPDATE_ERROR);
    } catch (final SendIntentException e) {
        // Any problems,just try to connect() again so we get a new
        // ConnectionResult.
        mPlusClient.connect();
    }
}
项目:tinytimetracker    文件:TinyTimeTracker.java   
public void purchaseIntent(String sku,int REQUEST_CODE) {
    if (mService == null) return;
    try {
        String developerPayload = "abcdefghijklmnopqrstuvwxyz";
        Bundle buyIntentBundle = mService.getBuyIntent(3,getPackageName(),sku,"inapp",developerPayload);
        PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");
        startIntentSenderForResult(pendingIntent.getIntentSender(),REQUEST_CODE,new Intent(),Integer.valueOf(0),Integer.valueOf(0));
    } catch (remoteexception e1) {
        return;
    } catch (SendIntentException e2) {
        return;
    }
}
项目:365browser    文件:ActivityWindowAndroid.java   
@Override
public int showCancelableIntent(
        PendingIntent intent,IntentCallback callback,Integer errorId) {
    Activity activity = getActivity().get();
    if (activity == null) return START_INTENT_FAILURE;

    int requestCode = generateNextRequestCode();

    try {
        activity.startIntentSenderForResult(
                intent.getIntentSender(),requestCode,0);
    } catch (SendIntentException e) {
        return START_INTENT_FAILURE;
    }

    storeCallbackData(requestCode,callback,errorId);
    return requestCode;
}
项目:Weedsim    文件:StartActivity.java   
@Override
public void onConnectionFailed(ConnectionResult result) {
    if (!mIntentInProgress && result.hasResolution()) {
        try {
            mIntentInProgress = true;
            startIntentSenderForResult(result.getResolution()
                    .getIntentSender(),RC_SIGN_IN,0);
        } catch (SendIntentException e) {
            // The intent was canceled before it was sent. Return to the
            // default
            // state and attempt to connect to get an updated
            // ConnectionResult.
            mIntentInProgress = false;
            mGoogleapiclient.connect();
        }
    }
}
项目:cordova-fusedlocation    文件:FusedLocationHelper.java   
@Override
public void onResult(LocationSettingsResult locationSettingsResult) {
    final Status status = locationSettingsResult.getStatus();
    switch (status.getStatusCode()) {
        case LocationSettingsstatusCodes.SUCCESS:
            Log.i(TAG,"All location settings are satisfied.");
            GetLastLocation();
            break;
        case LocationSettingsstatusCodes.RESOLUTION_required:
            Log.i(TAG,"Location settings are not satisfied. Show the user a dialog to" +
                    "upgrade location settings ");

            try {
                // Show the dialog by calling startResolutionForResult(),and check the result
                // in onActivityResult().
                status.startResolutionForResult(mActivity,REQUEST_CHECK_SETTINGS);
            } catch (IntentSender.SendIntentException e) {                   
                ErrorHappened("PendingIntent unable to execute request.");
            }
            break;
        case LocationSettingsstatusCodes.SETTINGS_CHANGE_UNAVAILABLE:              
            ErrorHappened("Location settings are inadequate,and cannot be fixed here. Dialog " +
                    "not created.");
            break;
    }
}
项目:snake-game-aws    文件:LoginActivity.java   
private void resolveSignInError() {
    if (connectionResult.hasResolution()) {
        try {
            intentInProgress = true;
            startIntentSenderForResult(connectionResult.getResolution()
                    .getIntentSender(),0);
        } catch (SendIntentException e) {
            Log.i(LOG_TAG,"Sign in intent Could not be sent: "
                            + e.getLocalizedMessage());
            // The intent was canceled before it was sent. Return to the
            // default
            // state and attempt to connect to get an updated
            // ConnectionResult.
            intentInProgress = false;
            googleapiclient.connect();
        }
    }
}
项目:QuizUpWinner    文件:SettingsFragment.java   
public void onConnectionFailed(ConnectionResult paramConnectionResult)
{
  if (paramConnectionResult.hasResolution())
    try
    {
      ˎ localˎ = getActivity();
      getActivity();
      paramConnectionResult.startResolutionForResult(localˎ,9000);
      return;
    }
    catch (IntentSender.SendIntentException localSendIntentException)
    {
      this.mGoogleapiclient.connect();
      localSendIntentException.printstacktrace();
    }
}
项目:QuizUpWinner    文件:HomeActivityLocationHelper.java   
public void onConnectionFailed(ConnectionResult paramConnectionResult)
{
  if (this.activity == null)
    return;
  if (paramConnectionResult.hasResolution())
    try
    {
      paramConnectionResult.startResolutionForResult(this.activity,9000);
      return;
    }
    catch (IntentSender.SendIntentException localSendIntentException)
    {
      localSendIntentException.printstacktrace();
      return;
    }
  paramConnectionResult.getErrorCode();
}
项目:Little-Nibolas    文件:AndroidLauncher.java   
@Override
public void onConnectionFailed(ConnectionResult result) {
    if (mResolvingError) {
           // Already attempting to resolve an error.
           return;
       } else if (result.hasResolution()) {
           try {
               mResolvingError = true;
               result.startResolutionForResult(this,REQUEST_RESOLVE_ERROR);
           } catch (SendIntentException e) {
               // There was an error with the resolution intent. Try again.
               mGoogleapiclient.connect();
           }
       } else {
           // Show dialog using GooglePlayServicesUtil.getErrorDialog()
           showErrorDialog(result.getErrorCode());
           mResolvingError = true;
       }

}
项目:XamarinAdmobTutorial    文件:RetrieveContentsWithProgressDialogActivity.java   
@Override
public void onConnected(Bundle connectionHint) {
    super.onConnected(connectionHint);

    // If there is a selected file,open its contents.
    if (mSelectedFileDriveId != null) {
        open();
        return;
    }

    // Let the user pick an mp4 or a jpeg file if there are
    // no files selected by the user.
    IntentSender intentSender = Drive.DriveApi
            .newOpenFileActivityBuilder()
            .setMimeType(new String[]{ "video/mp4","image/jpeg" })
            .build(getGoogleapiclient());
    try {
        startIntentSenderForResult(intentSender,REQUEST_CODE_OPENER,0);
    } catch (SendIntentException e) {
      Log.w(TAG,"Unable to send intent",e);
    }
}
项目:XamarinAdmobTutorial    文件:CreateFileWithCreatorActivity.java   
@Override
public void onResult(ContentsResult result) {
    MetadataChangeSet MetadataChangeSet = new MetadataChangeSet.Builder()
            .setMimeType("text/html").build();
    IntentSender intentSender = Drive.DriveApi
            .newCreateFileActivityBuilder()
            .setinitialMetadata(MetadataChangeSet)
            .setinitialContents(result.getContents())
            .build(getGoogleapiclient());
    try {
        startIntentSenderForResult(
                intentSender,REQUEST_CODE_CREATOR,0);
    } catch (SendIntentException e) {
        Log.w(TAG,e);
    }
}
项目:GooglePlayServicesGameSample    文件:GamesClientHelperImpl.java   
private void handleConnectionResult(ConnectionResult result) {
    if (result.hasResolution()) {
        try {
            result.startResolutionForResult(activity,REQUEST_START_RESOLUTION_FOR_RESULT);
        } catch (SendIntentException e) {
            Log.e(this.getClass().getSimpleName(),"unexpected exception for startResolutionForResult",e);
        }
        return;
    }
    listener.onError(result);
    Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
            result.getErrorCode(),activity,REQUEST_GET_ERROR_DIALOG);
    if (errorDialog != null) {
        errorDialog.show();
    }

}
项目:UbiNomadLib    文件:GoogleConnector.java   
public void resolveSignInError() {
    if (mSignInIntent != null) {
        try {
            mSignInProgress = STATE_IN_PROGRESS;
            ubiNomadActivity.startIntentSenderForResult(mSignInIntent.getIntentSender(),0);
        } catch (SendIntentException e) {
            Log.i(TAG,"Sign in intent Could not be sent: "
                    + e.getLocalizedMessage());
            // The intent was canceled before it was sent.  Attempt to connect to
            // get an updated ConnectionResult.
            mSignInProgress = STATE_SIGN_IN;
            mGoogleapiclient.connect();
        }
    } else {
        // Google Play services wasn't able to provide an intent for some
        // error types,so we show the default Google Play services error
        // dialog which may still start an intent on our behalf if the
        // user can resolve the issue.
        DialogFragment dialog = new GoogleSignInDialog();
        Bundle args = new Bundle();
        args.putInt("id",DIALOG_PLAY_SERVICES_ERROR);
        dialog.setArguments(args);
        dialog.show(ubiNomadActivity.getSupportFragmentManager(),"tag");
    }  
}
项目:barterli_android    文件:GooglePlusManager.java   
/**
 * A helper method to flip the mResolveOnFail flag and start the resolution
 * of the ConnenctionResult from the Failed connect() call.
 */
private void startResolution() {

    try {
        // Don't start another resolution Now until we have a
        // result from the activity we're about to start.
        mResolveOnFail = false;
        // If we can resolve the error,just try to connect() again so we get a new
        // ConnectionResult.
        mPlusClient.connect();
    }
}
项目:HereAStory-Android    文件:PinFileActivity.java   
/**
 * Starts a file opener intent to pick a file.
 */
@Override
public void onConnected(Bundle connectionHint) {
    super.onConnected(connectionHint);
    if (mFileId == null) {
        IntentSender intentSender = Drive.DriveApi
                .newOpenFileActivityBuilder()
                .setMimeType(new String[] {"application/octet-stream"})
                .build(getGoogleapiclient());
        try {
            startIntentSenderForResult(intentSender,0);
        } catch (SendIntentException e) {
            Log.w(TAG,e);
        }
    } else {
        DriveFile file = Drive.DriveApi.getFile(getGoogleapiclient(),mFileId);
        file.getMetadata(getGoogleapiclient()).setResultCallback(MetadataCallback);
    }
}
项目:HereAStory-Android    文件:RetrieveContentsWithProgressDialogActivity.java   
@Override
public void onConnected(Bundle connectionHint) {
    super.onConnected(connectionHint);

    // If there is a selected file,e);
    }
}
项目:HereAStory-Android    文件:CreateFileWithCreatorActivity.java   
@Override
public void onResult(ContentsResult result) {
    MetadataChangeSet MetadataChangeSet = new MetadataChangeSet.Builder()
            .setMimeType("text/html").build();
    IntentSender intentSender = Drive.DriveApi
            .newCreateFileActivityBuilder()
            .setinitialMetadata(MetadataChangeSet)
            .setinitialContents(result.getContents())
            .build(getGoogleapiclient());
    try {
        startIntentSenderForResult(
                intentSender,e);
    }
}
项目:HereAStory-Android    文件:ListenChangeEventsForFilesActivity.java   
/**
 * Forces user to pick a file on connection.
 */
@Override
public void onConnected(Bundle connectionHint) {
    if (mSelectedFileId == null) {
        IntentSender intentSender = Drive.DriveApi
                .newOpenFileActivityBuilder()
                .setMimeType(new String[] { "text/plain" })
                .build(getGoogleapiclient());
        try {
            startIntentSenderForResult(intentSender,e);
        }
    }
}
项目:HereAStory-Android    文件:BaseDriveActivity.java   
@Override
public void onConnectionFailed(ConnectionResult result) {
    Log.i(TAG,"Connection Failed: " + result.getErrorCode());
    if (!result.hasResolution()) {
        GooglePlayServicesUtil.showErrorDialogFragment(result.getErrorCode(),this,0);
        return;
    }
    // If user interaction is required to resolve the connection failure,the result will
    // contain a resolution.  This will launch a UI that allows the user to resolve the issue.
    // (E.g.,authorize your app.)
    try {
        result.startResolutionForResult(this,RESOLVE_CONNECTION_REQUEST_CODE);
    } catch (SendIntentException e) {
        Log.i(TAG,"Send intent Failed",e);
    }
}
项目:omni-note    文件:DriveActivity.java   
/**
 * Called when {@code mGoogleapiclient} is trying to connect but Failed.
 * Handle {@code result.getResolution()} if there is a resolution is
 * available.
 */
@Override
public void onConnectionFailed(ConnectionResult result) {
    Log.i(TAG,"Googleapiclient connection Failed: " + result.toString());
    if (!result.hasResolution()) {
        // show the localized error dialog.
        GooglePlayServicesUtil.getErrorDialog(result.getErrorCode(),0).show();
        return;
    }
    try {
        result.startResolutionForResult(this,REQUEST_CODE_RESOLUTION);
    } catch (SendIntentException e) {
        Log.e(TAG,"Exception while starting resolution activity",e);
    }
}
项目:googleplayservices    文件:GooglePlayServices.java   
@Override public void onConnectionFailed (ConnectionResult result) {
 String errormessage = result.toString();
 Log.w (LOG_TAG,errormessage);
 connectionAttempts += 1;
 if (!result.hasResolution() || connectionAttempts >= 2) {
  Log.w (LOG_TAG,"Error: no resolution. Google Play Services connection Failed.");
  tryConnectCallback.error ("Error: " + errormessage + "."); tryConnectCallback = null;
  return;
 }
 try {
  result.startResolutionForResult (cordova.getActivity(),result.getErrorCode());
 } catch (SendIntentException e) {
  // There was an error with the resolution intent. Try again.
  mGoogleapiclient.connect ();
 }
}
项目:aws-mobile-self-paced-labs-samples    文件:LoginActivity.java   
private void resolveSignInError() {
    if (connectionResult.hasResolution()) {
        try {
            intentInProgress = true;
            startIntentSenderForResult(connectionResult.getResolution()
                    .getIntentSender(),"Sign in intent Could not be sent: "
                            + e.getLocalizedMessage());
            // The intent was canceled before it was sent. Return to the
            // default
            // state and attempt to connect to get an updated
            // ConnectionResult.
            intentInProgress = false;
            googleapiclient.connect();
        }
    }
}
项目:mtransit-for-android    文件:MTActivityWithGoogleapiclient.java   
@Override
public void onConnectionFailed(ConnectionResult result) {
    if (this.resolvingError) {
        return;
    }
    if (result.hasResolution()) {
        try {
            this.resolvingError = true;
            result.startResolutionForResult(this,REQUEST_RESOLVE_ERROR);
        } catch (SendIntentException sie) {
            MTLog.w(this,sie,"Error while resolving Google Play Services error!");
            Googleapiclient googleapiclient = getGoogleapiclientOrInit();
            if (googleapiclient != null) {
                googleapiclient.connect();
            }
        }
    } else {
        showErrorDialog(result.getErrorCode());
        this.resolvingError = true;
    }
}
项目:tensiontunnel    文件:MainActivity.java   
@Override
public void onConnectionFailed(ConnectionResult result)
{
    if ((!this.intentInProgress) && result.hasResolution())
    {
        try
        {
            this.intentInProgress = true;
            result.startResolutionForResult(this,MainActivity.REQUEST_RESOLVE_ERROR);
        }
        catch (SendIntentException e)
        {
            this.intentInProgress = false;
            this.apiclient.connect();
        }
    }
}
项目:go    文件:GamesApiActivity.java   
@Override
public void onConnectionFailed(ConnectionStatus status) {
  int errorCode = status.getErrorCode();
  if (status.hasResolution()) {
    try {
      // This usually happen when user needs to authenticate into Games API.
      status.startResolutionForResult(this,REQUEST_CODE_RECONNECT);
    } catch (SendIntentException e) {
      Log.e(TAG,"Unable to recover from a connection failure: " + errorCode + ".");
      this.finish();
    }
  } else {
    Log.e(TAG,"Did you install Gmscore.apk?");
    this.finish();
  }
}
项目:cursoAndroidUTN    文件:lay_google.java   
private void resolveSignInError()
{
    if (mConnectionResult.hasResolution())
    {
        try
        {
            mIntentInProgress = true;
            startIntentSenderForResult(mConnectionResult.getResolution().getIntentSender(),0);
        }
        catch (SendIntentException e)
        {
            // The intent was canceled before it was sent. Return to the
            // default
            // state and attempt to connect to get an updated
            // ConnectionResult.
            mIntentInProgress = false;
            mGoogleapiclient.connect();
        }
    }
}
项目:spots    文件:LoginActivity.java   
@Override
public void onClick(View view) {
    if (view.getId() == R.id.sign_in_button && !mPlusClient.isConnected()) {
        if (mConnectionResult == null) {
            mConnectionProgressDialog.show();
        } else {
            try {
                mConnectionResult.startResolutionForResult(LoginActivity.this,CONNECTION_FAILURE_RESOLUTION_REQUEST);
            } catch (SendIntentException e) {
                // Try connecting again.
                mConnectionResult = null;
                mPlusClient.connect();
            }
        }
    }
}
项目:spots    文件:LoginActivity.java   
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    if (mConnectionProgressDialog.isShowing()) {
        // The user clicked the sign-in button already. Start to resolve
        // connection errors. Wait until onConnected() to dismiss the
        // connection dialog.
        if (connectionResult.hasResolution()) {
          try {
                   connectionResult.startResolutionForResult(this,CONNECTION_FAILURE_RESOLUTION_REQUEST);
           } catch (SendIntentException e) {
                   mPlusClient.connect();
           }
        }
      }
      // Save the result and resolve the connection failure upon a user click.
      mConnectionResult = connectionResult;
}
项目:Allow    文件:LoginActivity.java   
@Override
public void onClick(View view) {
    if (view.getId() == R.id.sign_in_button && !mPlusClient.isConnected()) {
        if (mConnectionResult == null) {
            mPlusClient.connect();
            mProgress.setVisibility(View.VISIBLE);

        } else {
            try {
                mConnectionResult.startResolutionForResult(this,REQUEST_CODE_RESOLVE_ERR);
            } catch (SendIntentException e) {
                // Try connecting again.
                e.printstacktrace();
                mConnectionResult = null;
                connectGPlus();
            }
        }
    }
}
项目:Allow    文件:LoginActivity.java   
@Override
public void onConnectionFailed(ConnectionResult result) {
    if (mProgress.getVisibility() == View.VISIBLE) {
        // The user clicked the sign-in button already. Start to resolve
        // connection errors. Wait until onConnected() to dismiss the
        // connection dialog.
        if (result.hasResolution()) {
            try {
                result.startResolutionForResult(this,REQUEST_CODE_RESOLVE_ERR);
            } catch (SendIntentException e) {
                e.printstacktrace();
                connectGPlus();
            }
        }
    }
    // Save the result and resolve the connection failure upon a user click.
    mConnectionResult = result;
}
项目:jcertif-android-2013    文件:LoginFragment.java   
@Override
public void onConnectionFailed(ConnectionResult res) {
    if (mConnectionProgressDialog.isShowing()) {

        if (res.hasResolution()) {
            try {
                res.startResolutionForResult(this.getActivity(),REQUEST_CODE_RESOLVE_ERR);
            } catch (SendIntentException e) {
                mPlusClient.connect();
            }
        }
    }

    // Save the intent so that we can start an activity when the user clicks
    // the sign-in button.
    mConnectionResult = res;
}
项目:q-mail    文件:MessageViewFragment.java   
@Override
public void startPendingIntentForCryptoPresenter(IntentSender si,Integer requestCode,Intent fillIntent,int flagsMask,int flagValues,int extraFlags) throws SendIntentException {
    if (requestCode == null) {
        getActivity().startIntentSender(si,fillIntent,flagsMask,flagValues,extraFlags);
        return;
    }

    requestCode |= REQUEST_MASK_CRYPTO_PRESENTER;
    getActivity().startIntentSenderForResult(
            si,extraFlags);
}
项目:q-mail    文件:MessageViewFragment.java   
@Override
public void startIntentSenderForMessageLoaderHelper(IntentSender si,int requestCode,int extraFlags) {
    showProgressthreshold = null;
    try {
        requestCode |= REQUEST_MASK_LOADER_HELPER;
        getActivity().startIntentSenderForResult(
                si,extraFlags);
    } catch (SendIntentException e) {
        Timber.e(e,"Irrecoverable error calling PendingIntent!");
    }
}
项目:q-mail    文件:MessageCompose.java   
@Override
public void onMessagebuildreturnPendingIntent(PendingIntent pendingIntent,int requestCode) {
    requestCode |= REQUEST_MASK_MESSAGE_BUILDER;
    try {
        startIntentSenderForResult(pendingIntent.getIntentSender(),0);
    } catch (SendIntentException e) {
        Timber.e(e,"Error starting pending intent from builder!");
    }
}
项目:q-mail    文件:MessageCompose.java   
public void launchUserInteractionPendingIntent(PendingIntent pendingIntent,int requestCode) {
    requestCode |= REQUEST_MASK_RECIPIENT_PRESENTER;
    try {
        startIntentSenderForResult(pendingIntent.getIntentSender(),0);
    } catch (SendIntentException e) {
        e.printstacktrace();
    }
}

关于Stripe presentWithSetupIntent 不显示 SetupIntents 的 PaymentSheet的介绍已经告一段落,感谢您的耐心阅读,如果想了解更多关于.net Web API 2,return HttpResponseMessage with ObjectContent、4.8 Beijing Rust Meetup | Call For Presenters、Android setContentView或Intents?、android.content.IntentSender.SendIntentException的实例源码的相关信息,请在本站寻找。

本文标签: