资金冻结

判断手机是否安装招商银行APP

Android平台样例:

private boolean isCMBAppInstalled()
{    
    PackageInfo packageInfo;    
    
    try    
    {        
        packageInfo = getPackageManager().getPackageInfo("cmb.pb", 0);    
    }    
    catch (PackageManager.NameNotFoundException e)    
    {        
        packageInfo = null;    
    }    
    
    if(packageInfo ==null)    
    {        
        //System.out.println("没有安装");        
        return false;    
    }    
    else    
    {        
        //System.out.println("已经安装");        
        return true;    
    }
}

iOS平台样例:

1、需要先在商户的APP的plist文件中LSApplicationQueriesSchemes下添加cmbmobilebank的scheme

2、代码示例:

    NSURL *url = [NSURL URLWithString:    
    @"cmbmobilebank://CMBLS/FunctionJump?action=gofuncid&funcid=200007&serverid= CMBEUserPay&cmb_app_trans_parms_start=here&…"];       
        if (![[UIApplication sharedApplication] canOpenURL:url]) {       
        //未安装手机银行       
        } else {       
        //已安装手机银行       
        }