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


Java Im.PROTOCOL_GOOGLE_TALK属性代码示例

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


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

示例1: getAndroidImProtocolType

public static int getAndroidImProtocolType(ImProtocolType type) {
	switch (type) {
	case PROTOCOL_AIM:
		return Im.PROTOCOL_AIM;
	case PROTOCOL_CUSTOM:
		return Im.PROTOCOL_CUSTOM;
	case PROTOCOL_GOOGLE_TALK:
		return Im.PROTOCOL_GOOGLE_TALK;
	case PROTOCOL_ICQ:
		return Im.PROTOCOL_ICQ;
	case PROTOCOL_JABBER:
		return Im.PROTOCOL_JABBER;
	case PROTOCOL_MSN:
		return Im.PROTOCOL_MSN;
	case PROTOCOL_NETMEETING:
		return Im.PROTOCOL_NETMEETING;
	case PROTOCOL_QQ:
		return Im.PROTOCOL_QQ;
	case PROTOCOL_SKYPE:
		return Im.PROTOCOL_SKYPE;
	case PROTOCOL_YAHOO:
		return Im.PROTOCOL_YAHOO;
	default:
		return Im.PROTOCOL_CUSTOM;
	}
}
 
开发者ID:mgrieder,项目名称:ntsync-android,代码行数:26,代码来源:ContactManager.java

示例2: getImProtocolType

public static ImProtocolType getImProtocolType(int androidType) {
	switch (androidType) {
	case Im.PROTOCOL_AIM:
		return ImProtocolType.PROTOCOL_AIM;
	case Im.PROTOCOL_CUSTOM:
		return ImProtocolType.PROTOCOL_CUSTOM;
	case Im.PROTOCOL_GOOGLE_TALK:
		return ImProtocolType.PROTOCOL_GOOGLE_TALK;
	case Im.PROTOCOL_ICQ:
		return ImProtocolType.PROTOCOL_ICQ;
	case Im.PROTOCOL_JABBER:
		return ImProtocolType.PROTOCOL_JABBER;
	case Im.PROTOCOL_MSN:
		return ImProtocolType.PROTOCOL_MSN;
	case Im.PROTOCOL_NETMEETING:
		return ImProtocolType.PROTOCOL_NETMEETING;
	case Im.PROTOCOL_QQ:
		return ImProtocolType.PROTOCOL_QQ;
	case Im.PROTOCOL_SKYPE:
		return ImProtocolType.PROTOCOL_SKYPE;
	case Im.PROTOCOL_YAHOO:
		return ImProtocolType.PROTOCOL_YAHOO;
	default:
		return ImProtocolType.PROTOCOL_CUSTOM;
	}
}
 
开发者ID:mgrieder,项目名称:ntsync-android,代码行数:26,代码来源:ContactManager.java

示例3: lookupProviderNameFromId

@Override
public String lookupProviderNameFromId(int protocol) {
    switch (protocol) {
        case Im.PROTOCOL_GOOGLE_TALK:
            return GTALK;
        case Im.PROTOCOL_AIM:
            return AIM;
        case Im.PROTOCOL_MSN:
            return MSN;
        case Im.PROTOCOL_YAHOO:
            return YAHOO;
        case Im.PROTOCOL_ICQ:
            return ICQ;
        case Im.PROTOCOL_JABBER:
            return JABBER;
        case Im.PROTOCOL_SKYPE:
            return SKYPE;
        case Im.PROTOCOL_QQ:
            return QQ;
        case Im.PROTOCOL_NETMEETING:
            return NETMEETING;
    }
    return null;
}
 
开发者ID:SafeSlingerProject,项目名称:SafeSlinger-Android,代码行数:24,代码来源:ContactAccessorApi5.java

示例4: lookupProviderIdFromName

@Override
public int lookupProviderIdFromName(String name) {
    if (GTALK.equalsIgnoreCase(name))
        return Im.PROTOCOL_GOOGLE_TALK;
    else if (AIM.equalsIgnoreCase(name))
        return Im.PROTOCOL_AIM;
    else if (MSN.equalsIgnoreCase(name))
        return Im.PROTOCOL_MSN;
    else if (YAHOO.equalsIgnoreCase(name))
        return Im.PROTOCOL_YAHOO;
    else if (ICQ.equalsIgnoreCase(name))
        return Im.PROTOCOL_ICQ;
    else if (JABBER.equalsIgnoreCase(name))
        return Im.PROTOCOL_JABBER;
    else if (SKYPE.equalsIgnoreCase(name))
        return Im.PROTOCOL_SKYPE;
    else if (QQ.equalsIgnoreCase(name))
        return Im.PROTOCOL_QQ;
    else if (NETMEETING.equalsIgnoreCase(name))
        return Im.PROTOCOL_NETMEETING;
    else
        return Im.PROTOCOL_CUSTOM;
}
 
开发者ID:SafeSlingerProject,项目名称:SafeSlinger-Android,代码行数:23,代码来源:ContactAccessorApi5.java

示例5: byProtocolId

/**
 * Retrieve the Protocol instance for a given raw database value.
 * @param id The raw database value.
 * @return The corresponding Protocol instance, or null.
 */
public static Protocol byProtocolId(int id) {
    switch(id) {
    case Im.PROTOCOL_CUSTOM: return CUSTOM;
    case Im.PROTOCOL_AIM: return AIM;
    case Im.PROTOCOL_MSN: return MSN;
    case Im.PROTOCOL_YAHOO: return YAHOO;
    case Im.PROTOCOL_SKYPE: return SKYPE;
    case Im.PROTOCOL_QQ: return QQ;
    case Im.PROTOCOL_GOOGLE_TALK: return GOOGLE_TALK;
    case Im.PROTOCOL_ICQ: return ICQ;
    case Im.PROTOCOL_JABBER: return JABBER;
    case Im.PROTOCOL_NETMEETING: return NETMEETING;
    }
    return null;
}
 
开发者ID:rtreffer,项目名称:ContactMerger,代码行数:20,代码来源:ImMetadata.java

示例6: getProtocolName

private String getProtocolName(String protocolId, String customProtocol) {
    if (protocolId == null) {
        throw new InvalidCursorTypeException();
    }
    switch (Integer.valueOf(protocolId)) {
        case Im.PROTOCOL_AIM:
            return "AIM";
        case Im.PROTOCOL_MSN:
            return "MSN";
        case Im.PROTOCOL_YAHOO:
            return "Yahoo";
        case Im.PROTOCOL_SKYPE:
            return "Skype";
        case Im.PROTOCOL_QQ:
            return "QQ";
        case Im.PROTOCOL_GOOGLE_TALK:
            return "Google Talk";
        case Im.PROTOCOL_ICQ:
            return "ICQ";
        case Im.PROTOCOL_JABBER:
            return "Jabber";
        case Im.PROTOCOL_NETMEETING:
            return "NetMeeting";
        case Im.PROTOCOL_CUSTOM:
            return customProtocol;
        default:
            return "Other";

    }
}
 
开发者ID:wix,项目名称:react-native-paged-contacts,代码行数:30,代码来源:InstantMessagingAddress.java

示例7: buildIMPP

protected Builder buildIMPP(Builder builder, Impp impp) {
	int typeCode = 0;
	String typeLabel = null;
	for (ImppType type : impp.getTypes())
		if (type == ImppType.HOME)
			typeCode = Im.TYPE_HOME;
		else if (type == ImppType.WORK || type == ImppType.BUSINESS)
			typeCode = Im.TYPE_WORK;
	if (typeCode == 0)
		if (impp.getTypes().isEmpty())
			typeCode = Im.TYPE_OTHER;
		else {
			typeCode = Im.TYPE_CUSTOM;
			typeLabel = xNameToLabel(impp.getTypes().iterator().next().getValue());
		}
	
	int protocolCode = 0;
	String protocolLabel = null;
	
	String protocol = impp.getProtocol();
	if (protocol == null) {
		Log.w(TAG, "Ignoring IMPP address without protocol");
		return null;
	}
	
	// SIP addresses are IMPP entries in the VCard but locally stored in SipAddress rather than Im
	boolean sipAddress = false;
	
	if (impp.isAim())
		protocolCode = Im.PROTOCOL_AIM;
	else if (impp.isMsn())
		protocolCode = Im.PROTOCOL_MSN;
	else if (impp.isYahoo())
		protocolCode = Im.PROTOCOL_YAHOO;
	else if (impp.isSkype())
		protocolCode = Im.PROTOCOL_SKYPE;
	else if (protocol.equalsIgnoreCase("qq"))
		protocolCode = Im.PROTOCOL_QQ;
	else if (protocol.equalsIgnoreCase("google-talk"))
		protocolCode = Im.PROTOCOL_GOOGLE_TALK;
	else if (impp.isIcq())
		protocolCode = Im.PROTOCOL_ICQ;
	else if (impp.isXmpp() || protocol.equalsIgnoreCase("jabber"))
		protocolCode = Im.PROTOCOL_JABBER;
	else if (protocol.equalsIgnoreCase("netmeeting"))
		protocolCode = Im.PROTOCOL_NETMEETING;
	else if (protocol.equalsIgnoreCase("sip"))
		sipAddress = true;
	else {
		protocolCode = Im.PROTOCOL_CUSTOM;
		protocolLabel = protocol;
	}
	
	if (sipAddress)
		// save as SIP address
		builder = builder
			.withValue(Data.MIMETYPE, SipAddress.CONTENT_ITEM_TYPE)
			.withValue(Im.DATA, impp.getHandle())
			.withValue(Im.TYPE, typeCode);
	else {
		// save as IM address
		builder = builder
			.withValue(Data.MIMETYPE, Im.CONTENT_ITEM_TYPE)
			.withValue(Im.DATA, impp.getHandle())
			.withValue(Im.TYPE, typeCode)
			.withValue(Im.PROTOCOL, protocolCode);
		if (protocolLabel != null)
			builder = builder.withValue(Im.CUSTOM_PROTOCOL, protocolLabel);
	}
	if (typeLabel != null)
		builder = builder.withValue(Im.LABEL, typeLabel);
	return builder;
}
 
开发者ID:eXfio,项目名称:CucumberSync,代码行数:73,代码来源:LocalAddressBook.java


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