本文整理汇总了Java中com.alipay.sdk.app.PayTask.checkAccountIfExist方法的典型用法代码示例。如果您正苦于以下问题:Java PayTask.checkAccountIfExist方法的具体用法?Java PayTask.checkAccountIfExist怎么用?Java PayTask.checkAccountIfExist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.alipay.sdk.app.PayTask
的用法示例。
在下文中一共展示了PayTask.checkAccountIfExist方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: check
import com.alipay.sdk.app.PayTask; //导入方法依赖的package包/类
public void check() {
Runnable checkRunnable = new Runnable() {
@Override
public void run() {
PayTask payTask = new PayTask(OrderDetailActivity.this);
boolean isExist = payTask.checkAccountIfExist();
Message msg = new Message();
msg.what = SDK_CHECK_FLAG;
msg.obj = isExist;
mHandler.sendMessage(msg);
}
};
Thread checkThread = new Thread(checkRunnable);
checkThread.start();
}
示例2: check
import com.alipay.sdk.app.PayTask; //导入方法依赖的package包/类
public void check() {
Runnable checkRunnable = new Runnable() {
@Override
public void run() {
PayTask payTask = new PayTask(OrderActivity.this);
boolean isExist = payTask.checkAccountIfExist();
Message msg = new Message();
msg.what = SDK_CHECK_FLAG;
msg.obj = isExist;
mHandler.sendMessage(msg);
}
};
Thread checkThread = new Thread(checkRunnable);
checkThread.start();
}
示例3: check
import com.alipay.sdk.app.PayTask; //导入方法依赖的package包/类
/**
* check whether the device has authentication alipay account.
* 查询终端设备是否存在支付宝认证账户
*
*/
public void check(View v) {
if(!NetWorkUtil.isNetWorkConnected(getApplicationContext())){
Toast.makeText(PayDemoActivity.this, ""+getResources().getString(R.string.networkdisabled),
Toast.LENGTH_SHORT).show();
return;
}
Runnable checkRunnable = new Runnable() {
@Override
public void run() {
// 构造PayTask 对象
PayTask payTask = new PayTask(PayDemoActivity.this);
// 调用查询接口,获取查询结果
boolean isExist = payTask.checkAccountIfExist();
Log.i("Account Check1", isExist +"");
Message msg = new Message();
msg.what = SDK_CHECK_FLAG;
msg.obj = isExist;
mHandler.sendMessage(msg);
}
};
Thread checkThread = new Thread(checkRunnable);
checkThread.start();
}
示例4: checkPayChannel
import com.alipay.sdk.app.PayTask; //导入方法依赖的package包/类
/**
* 此方法为同步方法,需要再线程中运行,检查是否与支付宝已经建立支付渠道
* @return
*/
@Override
public boolean checkPayChannel() {
PayTask payTask = new PayTask(mContext);
return payTask.checkAccountIfExist();
}