当前位置: 首页>>代码示例>>Java>>正文


Java SMSSDK.getCountry方法代码示例

本文整理汇总了Java中cn.smssdk.SMSSDK.getCountry方法的典型用法代码示例。如果您正苦于以下问题:Java SMSSDK.getCountry方法的具体用法?Java SMSSDK.getCountry怎么用?Java SMSSDK.getCountry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cn.smssdk.SMSSDK的用法示例。


在下文中一共展示了SMSSDK.getCountry方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCurrentCountry

import cn.smssdk.SMSSDK; //导入方法依赖的package包/类
private String[] getCurrentCountry() {
	String mcc = getMCC();
	String[] country = null;
	if (!TextUtils.isEmpty(mcc)) {
		country = SMSSDK.getCountryByMCC(mcc);
	}

	if (country == null) {
		SMSLog.getInstance().d("no country found by MCC: " + mcc);
		country = SMSSDK.getCountry(DEFAULT_COUNTRY_ID);
	}
	return country;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:RegisterPage.java

示例2: onResult

import cn.smssdk.SMSSDK; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void onResult(HashMap<String, Object> data) {
	if (data != null) {
		int page = (Integer) data.get("page");
		if (page == 1) {
			// 国家列表返回
			currentId = (String) data.get("id");
			String[] country = SMSSDK.getCountry(currentId);
			if (country != null) {
				currentCode = country[1];
				tvCountryNum.setText("+" + currentCode);
				tvCountry.setText(country[0]);
			}
		} else if (page == 2) {
			// 验证码校验返回
			Object res = data.get("res");
			//Object smart = data.get("smart");

			HashMap<String, Object> phoneMap = (HashMap<String, Object>) data.get("phone");
			if (res != null && phoneMap != null) {
				int resId = ResHelper.getStringRes(activity, "smssdk_your_ccount_is_verified");
				if (resId > 0) {
					Toast.makeText(activity, resId, Toast.LENGTH_SHORT).show();
				}

				if (callback != null) {
					callback.afterEvent(
							SMSSDK.EVENT_SUBMIT_VERIFICATION_CODE,
							SMSSDK.RESULT_COMPLETE, phoneMap);
				}
				finish();
			}
		}
	}
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:36,代码来源:RegisterPage.java

示例3: getCurrentCountry

import cn.smssdk.SMSSDK; //导入方法依赖的package包/类
private String[] getCurrentCountry() {
    String mcc = getMCC();
    String[] country = null;
    if (!TextUtils.isEmpty(mcc)) {
        country = SMSSDK.getCountryByMCC(mcc);
    }

    if (country == null) {
        Log.w("SMSSDK", "no country found by MCC: " + mcc);
        country = SMSSDK.getCountry(DEFAULT_COUNTRY_ID);
    }
    return country;
}
 
开发者ID:zzlnewair,项目名称:Myshop,代码行数:14,代码来源:RegActivity.java

示例4: getCurrentCountry

import cn.smssdk.SMSSDK; //导入方法依赖的package包/类
private String[] getCurrentCountry() {
	String mcc = getMCC();
	String[] country = null;
	if (!TextUtils.isEmpty(mcc)) {
		country = SMSSDK.getCountryByMCC(mcc);
	}

	if (country == null) {
		Log.w("SMSSDK", "no country found by MCC: " + mcc);
		country = SMSSDK.getCountry(DEFAULT_COUNTRY_ID);
	}
	return country;
}
 
开发者ID:zzlnewair,项目名称:Myshop,代码行数:14,代码来源:RegisterPage.java

示例5: onResult

import cn.smssdk.SMSSDK; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void onResult(HashMap<String, Object> data) {
	if (data != null) {
		int page = (Integer) data.get("page");
		if (page == 1) {
			// 国家列表返回
			currentId = (String) data.get("id");
			countryRules = (HashMap<String, String>) data.get("rules");
			String[] country = SMSSDK.getCountry(currentId);
			if (country != null) {
				currentCode = country[1];
				tvCountryNum.setText("+" + currentCode);
				tvCountry.setText(country[0]);
			}
		} else if (page == 2) {
			// 验证码校验返回
			Object res = data.get("res");
			//Object smart = data.get("smart");

			HashMap<String, Object> phoneMap = (HashMap<String, Object>) data.get("phone");
			if (res != null && phoneMap != null) {
				int resId = getStringRes(activity, "smssdk_your_ccount_is_verified");
				if (resId > 0) {
					Toast.makeText(activity, resId, Toast.LENGTH_SHORT).show();
				}

				if (callback != null) {
					callback.afterEvent(
							SMSSDK.EVENT_SUBMIT_VERIFICATION_CODE,
							SMSSDK.RESULT_COMPLETE, phoneMap);
				}
				finish();
			}
		}
	}
}
 
开发者ID:zzlnewair,项目名称:Myshop,代码行数:37,代码来源:RegisterPage.java

示例6: getCountry

import cn.smssdk.SMSSDK; //导入方法依赖的package包/类
/**根据国家id获取国家名称区号等信息*/
public static Country getCountry(String coutryId) {
	return new Country(SMSSDK.getCountry(coutryId));
}
 
开发者ID:isuhao,项目名称:QMark,代码行数:5,代码来源:ShareSdk.java

示例7: initData

import cn.smssdk.SMSSDK; //导入方法依赖的package包/类
@Override
public void initData() {
    eventHandler = new SMSEvenHanlder();
    SMSSDK.registerEventHandler(eventHandler);


    String[] country = SMSSDK.getCountry(DEFAULT_COUNTRY_ID);
    if (country != null) {

        mTxtCountryCode.setText("+" + country[1]);

        mTxtCountry.setText(country[0]);

    }


}
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:18,代码来源:CorrectPasswordFirst.java

示例8: onCreate

import cn.smssdk.SMSSDK; //导入方法依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_reg);
        ViewUtils.inject(this);

        initToolBar();

        SMSSDK.initSDK(this, ManifestUtil.getMetaDataValue(this, "mob_sms_appKey"),
                ManifestUtil.getMetaDataValue(this,"mob_sms_appSecrect"));


        evenHanlder = new SMSEvenHanlder();
        SMSSDK.registerEventHandler(evenHanlder);



        String[] country = SMSSDK.getCountry(DEFAULT_COUNTRY_ID);
        if (country != null) {

            mTxtCountryCode.setText("+"+country[1]);

            mTxtCountry.setText(country[0]);

        }




//        SMSSDK.getSupportedCountries();

    }
 
开发者ID:zzlnewair,项目名称:Myshop,代码行数:33,代码来源:RegActivity.java


注:本文中的cn.smssdk.SMSSDK.getCountry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。