• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RongExtension类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中io.rong.imkit.RongExtension的典型用法代码示例。如果您正苦于以下问题:Java RongExtension类的具体用法?Java RongExtension怎么用?Java RongExtension使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

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

示例1: onClick

点赞 3

import io.rong.imkit.RongExtension; //导入依赖的package包/类
@Override
public void onClick(Fragment currentFragment, RongExtension extension) {
    context = currentFragment.getActivity();
    conversationType = extension.getConversationType();
    targetId = extension.getTargetId();

    IContactCardSelectListProvider iContactCardSelectListProvider
            = ContactCardContext.getInstance().getContactCardSelectListProvider();
    IContactCardInfoProvider iContactInfoProvider
            = ContactCardContext.getInstance().getContactCardInfoProvider();
    if (iContactCardSelectListProvider != null) {
        iContactCardSelectListProvider.onContactPluginClick(REQUEST_CONTACT, currentFragment, extension, this);
        extension.collapseExtension();
    } else if (iContactInfoProvider != null) {
        Intent intent = new Intent(context, ContactListActivity.class);
        extension.startActivityForPluginResult(intent, REQUEST_CONTACT, this);
        extension.collapseExtension();
    } else {
        Toast.makeText(context, "尚未实现\"名片模块\"相关接口", Toast.LENGTH_LONG).show();
    }
}
 

开发者ID:hushengjun,
项目名称:FastAndroid,
代码行数:22,
代码来源:ContactCardPlugin.java

示例2: onClick

点赞 3

import io.rong.imkit.RongExtension; //导入依赖的package包/类
@Override
public void onClick(Fragment currentFragment, final RongExtension extension) {
    String[] permissions = {Manifest.permission.RECORD_AUDIO};
    if (!PermissionCheckUtil.requestPermissions(currentFragment, permissions)) {
        return;
    }
    Recognizer recognizerView = new Recognizer(extension.getContext());
    recognizerView.setResultCallBack(new IRecognizedResult() {
        @Override
        public void onResult(String data) {
            Editable editable = extension.getInputEditText().getText();
            String str = editable.toString() + data;
            extension.getInputEditText().setText(str);
            extension.getInputEditText().setSelection(str.length());
        }

        @Override
        public void onClearClick() {
            extension.getInputEditText().setText("");
        }
    });
    extension.addPluginPager(recognizerView);
    recognizerView.startRecognize();
}
 

开发者ID:hushengjun,
项目名称:FastAndroid,
代码行数:25,
代码来源:RecognizePlugin.java

示例3: onClick

点赞 3

import io.rong.imkit.RongExtension; //导入依赖的package包/类
@Override
public void onClick(Fragment currentFragment, final RongExtension extension) {
    String[] permissions = {Manifest.permission.RECORD_AUDIO};
    if (!PermissionCheckUtil.requestPermissions(currentFragment, permissions)) {
        return;
    }
    if (SpeechUtility.getUtility() == null) {
        SpeechUtility.createUtility(extension.getContext().getApplicationContext(), SpeechConstant.APPID + "=581f2927"); //初始化
    }
    recognizerView = new RecognizerView(extension.getContext());
    recognizerView.setResultCallBack(new IRecognizedResult() {
        @Override
        public void onResult(String data) {
            Editable editable = extension.getInputEditText().getText();
            String str = editable.toString() + data;
            extension.getInputEditText().setText(str);
            extension.getInputEditText().setSelection(str.length());
        }

        @Override
        public void onClearClick() {
            extension.getInputEditText().setText("");
        }
    });
    extension.addPluginPager(recognizerView);
}
 

开发者ID:LanguidSheep,
项目名称:sealtalk-android-master,
代码行数:27,
代码来源:RecognizePlugin.java

示例4: onAttachedToExtension

点赞 2

import io.rong.imkit.RongExtension; //导入依赖的package包/类
@Override
public void onAttachedToExtension(RongExtension extension) {
    super.onAttachedToExtension(extension);
    ContactCardPlugin.getInstance().setContactCardInfoProvider(new IContactCardInfoProvider() {
        @Override
        public void getContactCardInfoProvider(final IContactCardInfoCallback contactInfoCallback) {
            SealUserInfoManager.getInstance().getFriends(new SealUserInfoManager.ResultCallback<List<Friend>>() {
                @Override
                public void onSuccess(List<Friend> friendList) {
                    contactInfoCallback.getContactCardInfoCallback(friendList);
                }

                @Override
                public void onError(String errString) {
                    contactInfoCallback.getContactCardInfoCallback(null);
                }
            });
        }
    });

    ContactCardPlugin.getInstance().setContactCardClickCallback(new IContactCardClickCallback() {
        @Override
        public void onContactCardMessageClick(View view, int position, ContactMessage content, UIMessage message) {
            Intent intent = new Intent(view.getContext(), UserDetailActivity.class);
            Friend friend = SealUserInfoManager.getInstance().getFriendByID(content.getId());
            if (friend == null) {
                UserInfo userInfo = new UserInfo(content.getId(), content.getName(), Uri.parse(TextUtils.isEmpty(content.getImgUrl()) ? RongGenerate.generateDefaultAvatar(content.getName(), content.getId()) : content.getImgUrl()));
                friend = CharacterParser.getInstance().generateFriendFromUserInfo(userInfo);
            }
            intent.putExtra("friend", friend);
            view.getContext().startActivity(intent);
        }
    });

}
 

开发者ID:LanguidSheep,
项目名称:sealtalk-android-master,
代码行数:36,
代码来源:SealExtensionModule.java

示例5: onClick

点赞 2

import io.rong.imkit.RongExtension; //导入依赖的package包/类
@Override
public void onClick(Fragment currentFragment, RongExtension extension) {
    Conversation.ConversationType conversationType = extension.getConversationType();
    String targetId = extension.getTargetId();
    Intent intent = new Intent(currentFragment.getActivity(), ContactListActivity.class);
    intent.putExtra("conversationType", conversationType);
    intent.putExtra("targetId", targetId);
    extension.startActivityForPluginResult(intent, REQUEST_CONTACT, this);
    extension.collapseExtension();
}
 

开发者ID:LanguidSheep,
项目名称:sealtalk-android-master,
代码行数:11,
代码来源:ContactCardPlugin.java

示例6: onCreateView

点赞 2

import io.rong.imkit.RongExtension; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = super.onCreateView(inflater, container, savedInstanceState);
    rongExtension = (RongExtension) v.findViewById(io.rong.imkit.R.id.rc_extension);
    View messageListView = findViewById(v, io.rong.imkit.R.id.rc_layout_msg_list);
    listView = findViewById(messageListView, io.rong.imkit.R.id.rc_list);
    return v;
}
 

开发者ID:sealtalk,
项目名称:sealtalk-android,
代码行数:9,
代码来源:ConversationFragmentEx.java

示例7: onContactPluginClick

点赞 2

import io.rong.imkit.RongExtension; //导入依赖的package包/类
void onContactPluginClick(int requestCode, Fragment currentFragment,
RongExtension extension, IPluginModule pluginModule);
 

开发者ID:hushengjun,
项目名称:FastAndroid,
代码行数:3,
代码来源:IContactCardSelectListProvider.java

示例8: onAttachedToExtension

点赞 2

import io.rong.imkit.RongExtension; //导入依赖的package包/类
@Override
public void onAttachedToExtension(RongExtension extension) {
    super.onAttachedToExtension(extension);
}
 

开发者ID:zqHero,
项目名称:rongyunDemo,
代码行数:5,
代码来源:SealExtensionModule.java

示例9: onAttachedToExtension

点赞 1

import io.rong.imkit.RongExtension; //导入依赖的package包/类
@Override
public void onAttachedToExtension(RongExtension extension) {

}
 

开发者ID:hushengjun,
项目名称:FastAndroid,
代码行数:5,
代码来源:ContactCardExtensionModule.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)