分享到其他聊天工具

Intent intent = new Intent(Intent.ACTION_SEND);

            intent.setType("image/jpg");
            intent.putExtra(Intent.EXTRA_STREAM, Uri.parse(uri));
            instance.startActivityForResult(Intent.createChooser(intent,RacingView.getString(R.string.TXT_SHARE_IMAGE)),SharedUtil.SHARE_REQUESTCODE);
        } else {
            mainView.showToast(RacingView
                    .getString(R.string.TXT_OPENING_IMAGE));
            Intent intent = new Intent();
            intent.setAction(Intent.ACTION_VIEW);
            intent.setDataAndType(Uri.parse(uri), "image/*");
            startActivity(intent);

你可能感兴趣的:(分享到其他聊天工具)