當前位置:首頁 » 安卓系統 » android分享qq

android分享qq

發布時間: 2022-04-30 01:48:33

Ⅰ android 如何實現bitmap分享到QQ空調

public class AndroidShare {
/**
* 上下文
*/
private Context context;
/**
* 文本類型
*
*/
public static int TEXT = 0;
/**
* 圖片類型
*/
public static int DRAWABLE = 1;
public AndroidShare(Context context) {
this.context = context;
}
/**
* 分享到QQ好友
*
* @param msgTitle
* (分享標題)
* @param msgText
* (分享內容)
* @param type
* (分享類型)
* @param drawable
* (分享圖片,若分享類型為AndroidShare.TEXT,則可以為null)
*/
public void shareQQFriend(String msgTitle, String msgText, int type,
Bitmap drawable) {
shareMsg("com.tencent.mobileqq",
"com.tencent.mobileqq.activity.JumpActivity", "QQ", msgTitle,
msgText, type, drawable);
}
/**
* 分享到微信好友
*
* @param msgTitle
* (分享標題)
* @param msgText
* (分享內容)
* @param type
* (分享類型)
* @param drawable
* (分享圖片,若分享類型為AndroidShare.TEXT,則可以為null)
*/
public void shareWeChatFriend(String msgTitle, String msgText, int type,
Bitmap drawable) {
shareMsg("com.tencent.mm", "com.tencent.mm.ui.tools.ShareImgUI", "微信",
msgTitle, msgText, type, drawable);
}
/**
* 分享到微信朋友圈(分享朋友圈一定需要圖片)
*
* @param msgTitle
* (分享標題)
* @param msgText
* (分享內容)
* @param drawable
* (分享圖片)
*/
public void shareWeChatFriendCircle(String msgTitle, String msgText,
Bitmap drawable) {
shareMsg("com.tencent.mm", "com.tencent.mm.ui.tools.ShareToTimeLineUI",
"微信", msgTitle, msgText, AndroidShare.DRAWABLE, drawable);
}
/**
* 點擊分享的代碼
*
* @param packageName
* (包名,跳轉的應用的包名)
* @param activityName
* (類名,跳轉的頁面名稱)
* @param appname
* (應用名,跳轉到的應用名稱)
* @param msgTitle
* (標題)
* @param msgText
* (內容)
* @param type
* (發送類型:text or pic 微信朋友圈只支持pic)
*/
@SuppressLint("NewApi")
private void shareMsg(String packageName, String activityName,
String appname, String msgTitle, String msgText, int type,
Bitmap drawable) {
if (!packageName.isEmpty() && !isAvilible(context, packageName)) {// 判斷APP是否存在
Toast.makeText(context, "請先安裝" + appname, Toast.LENGTH_SHORT)
.show();
return;
}
Intent intent = new Intent("android.intent.action.SEND");
if (type == AndroidShare.TEXT) {
intent.setType("text/plain");
} else if (type == AndroidShare.DRAWABLE) {
intent.setType("image/*");
// BitmapDrawable bd = (BitmapDrawable) drawable;
// Bitmap bt = bd.getBitmap();
final Uri uri = Uri.parse(MediaStore.Images.Media.insertImage(
context.getContentResolver(), drawable, null, null));
intent.putExtra(Intent.EXTRA_STREAM, uri);
}
intent.putExtra(Intent.EXTRA_SUBJECT, msgTitle);
intent.putExtra(Intent.EXTRA_TEXT, msgText);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (!packageName.isEmpty()) {
intent.setComponent(new ComponentName(packageName, activityName));
context.startActivity(intent);
} else {
context.startActivity(Intent.createChooser(intent, msgTitle));
}
}
/**
* 判斷相對應的APP是否存在
*
* @param context
* @param packageName
* @return
*/
public boolean isAvilible(Context context, String packageName) {
PackageManager packageManager = context.getPackageManager();
List<PackageInfo> pinfo = packageManager.getInstalledPackages(0);
for (int i = 0; i < pinfo.size(); i++) {
if (((PackageInfo) pinfo.get(i)).packageName
.equalsIgnoreCase(packageName))
return true;
}
return false;
}
/**
* 指定分享到qq
* @param context
* @param bitmap
*/
public void sharedQQ(Activity context,Bitmap bitmap){
Uri uri = Uri.parse(MediaStore.Images.Media.insertImage(
context.getContentResolver(), BitmapFactory.decodeResource(context.getResources(), R.mipmap.company_mainback), null, null));
Intent imageIntent = new Intent(Intent.ACTION_SEND);
imageIntent.setPackage("com.tencent.mobileqq");
imageIntent.setType("image/*");
imageIntent.putExtra(Intent.EXTRA_STREAM, uri);
imageIntent.putExtra(Intent.EXTRA_TEXT,"您的好友邀請您進入天好圈");
imageIntent.putExtra(Intent.EXTRA_TITLE,"天好圈");
context.startActivity(imageIntent);
}
}

Ⅱ android studio實現android 分享qq怎樣實現的

首先新建了一個項目用來演示集成ShareSDK

下載好了ShareSDK之後,解壓sharesd

我們按照下面的步驟使用快速集成ShareSDK的工具QuickIntegrater.jar。
Windows下
當然要運行sharesdk快速集成工具,你需要有jdk環境,詳細做android開放人員早就具備了這個環境條件,在此就不對jdk環境啰嗦了。
此時您可以雙擊QuickIntegrater啟動程序

安卓手機qq分享屏幕怎麼分享聲音

1、首先,需要在手機上將qq版本升級至8.4.1.166。

Ⅳ Android的qq分享,不知道怎麼分享純文本

private void doShareToQQ(final Bundle params) {
final Activity activity = this.activity;
new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
mQQShare.shareToQQ(activity, params, new IUiListener() {
@Override
public void onCancel() {

// if(shareType != QQShare.SHARE_TO_QQ_TYPE_IMAGE){
//// Util.toastMessage(activity, "onCancel: ");
// }
}
@Override
public void onComplete(Object response) {
// TODO Auto-generated method stub

// Util.toastMessage(activity, "onComplete: " + response.toString());
}
@Override
public void onError(UiError e) {
// TODO Auto-generated method stub

// Util.toastMessage(activity, "onError: " + e.errorMessage, "e");
}
});
}
}).start();
}

Ⅳ 安卓手機怎麼把屏幕上的軟體轉發給qq好友

選中截取的圖片,點擊它或長按它,在彈出菜單里尋分享」或「發送」,再選發送方式,一般有簡訊/微信/QQ/藍牙/郵件,等等,你選擇一個,再在其中查找並選擇好友,點擊發送按鈕即可。9333

Ⅵ 安卓手機qq分享屏幕怎麼用

1.首先qq更新到最新版本,登錄進入

Ⅶ 安卓qq共享屏幕沒聲音

使用手機qq進行分享屏幕的時候,會發現沒有聲音的情況。那麼,手機qq分享屏幕沒有聲音怎麼辦。

工具/原料

  • 手機qq

  • 方法/步驟

  • 手機上打開qq點擊聯系人選項。

Ⅷ android分享qq後怎麼返回應用

1、一般點擊手機上的「返回」鍵即可;
2、常按Home鍵打開近期應用,選擇你剛才用的應用即可;
3、若是沒有「返回」鍵,可以藉助第三方工具,安裝虛擬按鍵,有返回功能
希望能解決你的問題!

安卓系統怎麼把QQ文件傳給微信好友

目前不能將QQ里文件直接發給微信朋友,可以通過其他簡便方法,方法如下:
1、找到Tencent文件里你准備發的文件;
2、點擊該文件選擇分享;
3、點擊微信發送給好友;
4、找到你的微信朋友點擊發送即可。

Ⅹ android開發 請問用qq分享文件怎麼分享sdk例子上都是些 分享圖片音樂什麼的 不知道文件應該怎麼分享

java">Intentshare=newIntent(Intent.ACTION_SEND);
ComponentNamecomponent=newComponentName("com.tencent.mobileqq","com.tencent.mobileqq.activity.JumpActivity");
share.setComponent(component);
Filefile=newFile(Environment.getExternalStorageDirectory()+"/001.jpg");
System.out.println("file"+file.exists());
share.putExtra(Intent.EXTRA_STREAM,Uri.fromFile(file));
share.setType("*/*");
startActivity(Intent.createChooser(share,"發送"));

熱點內容
萌將風雲腳本 發布:2025-05-11 18:07:14 瀏覽:744
密碼鎖aid代表什麼 發布:2025-05-11 18:00:01 瀏覽:756
編程的組成 發布:2025-05-11 17:58:34 瀏覽:807
火山易語言apk反編譯 發布:2025-05-11 17:52:01 瀏覽:813
鋼琴密碼鎖本的密碼該在哪裡看 發布:2025-05-11 17:49:44 瀏覽:468
in運演算法則 發布:2025-05-11 17:41:32 瀏覽:406
微信怎麼分身兩個賬號安卓 發布:2025-05-11 17:32:14 瀏覽:915
新人采訪問題 發布:2025-05-11 17:14:29 瀏覽:899
雲伺服器有私服嗎 發布:2025-05-11 17:13:33 瀏覽:30
安卓手機怎麼轉移ipad 發布:2025-05-11 17:01:35 瀏覽:735