android微信sdk
1. android 微信sdk登錄後怎麼把數據返回給其它activity
<activity
android:name=".teacher.ui.Activity"
android:label="@string/app_name"
android:exported="true"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="wx690b9cf56a4ec056"/> //寫入你的appid
</intent-filter>
</activity>
2. android/IOS SDK怎麼判斷用戶是否安裝了微信/QQ
您需要集成微信的SDK進行調用微信內部api來判斷是否安裝了微信客戶端。我剛好做了個類似的項目,希望能幫到您,謝謝。有什麼問題歡迎您進行追問。
/**
* 分享到朋友圈
*
* @param flag 0:分享到微信好友,1:分享到微信朋友圈
* @param url 想要分享的url
* @param title 分享內容的標題
*/
private void share2weixin(int flag, String url, String title) {
// Bitmap bmp = BitmapFactory.decodeResource(getResources(),
// R.drawable.weixin_share);
if (!api.isWXAppInstalled()) {
Toast.makeText(NoticeDetailActivity.this, "您還未安裝微信客戶端",
Toast.LENGTH_SHORT).show();
return;
}
/**
* 微信分享 (這里僅提供一個分享網頁的示例,其它請參看官網示例代碼)
* @param flag(0:分享到微信好友,1:分享到微信朋友圈)
*/
WXWebpageObject webpage = new WXWebpageObject();
webpage.webpageUrl = url;
WXMediaMessage msg = new WXMediaMessage(webpage);
msg.title = title;
msg.description = getResources().getString(
R.string.app_share_weixin_txt);
Bitmap thumb = BitmapFactory.decodeResource(getResources(),
R.drawable.share_logo_test);
msg.setThumbImage(thumb);
SendMessageToWX.Req req = new SendMessageToWX.Req();
req.transaction = String.valueOf(System.currentTimeMillis());
req.message = msg;
req.scene = flag == 0 ? SendMessageToWX.Req.WXSceneSession : SendMessageToWX.Req.WXSceneTimeline;
api.sendReq(req);
layout_share.setVisibility(View.GONE);
}
3. 如何在Cocos2d-x中集成安卓版微信SDK
在Cocos2d-x中集成安卓版微信SDK方法如下: (1)命令行創建Cocos2dxWechat項目 復制代碼$ cocos new -p com.fusijie.cocos2dxwechat -l cpp -d . Cocos2dxWechat (2)交叉編譯生成so文件 復制代碼$ cd Cocos2dxWechat/proj.android/$ ./build_native.py (3)導入Eclipse生成APK 導入libcocos2dx項目和Cocos2dxWechat項目到Eclipse中。在真機中成功運行Cocos2dxWechat.apk即可
4. android 自帶的分享跟微信sdk分享有什麼區別
自帶分享是手機里所有有分享功能的都會列出來,微信sdk分享只能分享微信有關的
5. android sdk 怎麼分享信息到微信
方法如下:
下載官方的sdk demo,
解壓,並將工程導入到eclipse。解壓出來的時候,發現根目錄下有一個debug.keystore文件。
在上面說到項目的根目錄下有一個debug.keystore文件,因為編譯、簽名apk的時候,用的是自帶的那個debug.keystore,每台電腦都是不一樣的簽名文件,而且微信那個APP_ID已經簽名文件debug.keystore綁定了的。解決方法就是將微信的那個debug.keystore拷貝到電腦默認的那個debug.keystore位置,將其覆蓋。。
再次運行,分享就成功了。
6. 為什麼微信Android SDK用戶體驗如此之差
每次調用微信的介面後回調均會強制到一個新的Activity,然後finish調這個activity回到之前的界面(嘗試過一些其他的做法避免這種問題,但是有缺陷)。這樣做非常非常惡心,最顯然的一點,這個新的Activity里無法與之前的Activity的界面組件交互。
另外,在debug模式下無法調出微信app,甚至任何提示也沒有。每次調試都需要簽名打包,這一點很無奈。
7. 怎麼理解android微信支付分享sdk只能用指定的類名和類路徑
看您選擇的支付介面提供商是誰,如果直接找微信的話,只能走一個微信介面,如果找第三方支付的話,就是直接給您輸出您想要的所有支付方式的sdk,而且可以做秒到賬,
8. 微信sdk和微信區別
微信SDK只是微信裡面的一個部分。
現在有很多應用需要調用微信的功能,如公眾號、小程序、app以及h5通常會用到微信的支付、掃碼或者是獲得用戶信息等操作。這時就需要用到微信的第三方API微信SDK官方文檔可以看這里。
9. android應用集成微信Sdk分享,分享圖片到朋友圈失敗,如下圖所示,這個如何解決。
說明微信禁止了這個軟體的分享功能,只能復制粘貼鏈接。
10. 用 微信的 android SDK 怎麼分享信息 到微信
微信官方SDK的分享方法。
//圖片
Bitmap bt=BitmapFactory.decodeResource(getApplicationContext().getResources(), R.drawable.erweima); final Uri uri = Uri.parse(MediaStore.Images.Media.insertImage(getContentResolver(), bt, null,null));
//分享到朋友
private void shareToFriend(Uri uri) {
Intent intent = new Intent();
ComponentName comp = new ComponentName("com.tencent.mm",
"com.tencent.mm.ui.tools.ShareImgUI");
intent.setComponent(comp);
intent.setAction("android.intent.action.SEND");
intent.setType("image/*");
//intent.setFlags(0x3000001);
intent.putExtra(Intent.EXTRA_STREAM,uri);
startActivity(intent);
}
調用分享文本的android 系統方法。
//分享文字
public void shareText(View view) {
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_TEXT, "This is my Share text.");
shareIntent.setType("text/plain");
//設置分享列表的標題,並且每次都顯示分享列表
startActivity(Intent.createChooser(shareIntent, "分享到"));
}
//分享單張圖片
public void shareSingleImage(View view) {
String imagePath = Environment.getExternalStorageDirectory() + File.separator + "test.jpg";
//由文件得到uri
Uri imageUri = Uri.fromFile(new File(imagePath));
Log.d("share", "uri:" + imageUri); //輸出:file:///storage/emulated/0/test.jpg
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
shareIntent.setType("image/*");
startActivity(Intent.createChooser(shareIntent, "分享到"));
}
//分享多張圖片
public void shareMultipleImage(View view) {
ArrayList uriList = new ArrayList<>();
String path = Environment.getExternalStorageDirectory() + File.separator;
uriList.add(Uri.fromFile(new File(path+"australia_1.jpg")));
uriList.add(Uri.fromFile(new File(path+"australia_2.jpg")));
uriList.add(Uri.fromFile(new File(path+"australia_3.jpg")));
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND_MULTIPLE);
shareIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uriList);
shareIntent.setType("image/*");
startActivity(Intent.createChooser(shareIntent, "分享到"));
}