这个你可能要玩一下微信才知道,我们自己添加的表情查询的时候是没这个链接,用APP分享的时候才有,这个布局应该是微信生成,没办法自己弄
解决方案 »
- HorizontalScrollView滑动到头的时候,边会出现蓝色然后再消失,如何去掉这个效果。
- android如何访问PC端的Sql Server
- 关于MediaPlayer的一个小问题
- android手机做服务器端,pc做客户端,通过USB基于socket连接,怎么从手机sdcard的相册目录把所有图片全部保存到pc客户端
- android开发中能直接调用系统里面自带的音乐和视频播放器吗?
- 想要实现开发一个小的安卓系统
- 关于libgdx引擎的camera,用过libgdx的大神们进来帮帮忙
- 安卓发短信的程序,但是没效果。
- 最近在做铅垂,请问用什么传感器好?精度高
- Android调用webService使用HttpTransportSE.call()方法出错,求解!
- 请问为什么这个menu有时有有时没有?
- 请教service问题
然后需要注册开发者key
然后在开发者页面应该能设置一些回调页面和自己的程序名什么的
才会有显示
应该是这样 没做过微信分享
但是之前做过微博什么的 是这样弄的
其实官方的照着做就行,我就给你写一遍吧,怎么导入sdk我就不写了public IWXAPI api;
...
api = WXAPIFactory.createWXAPI(this, "wx27154ac8a3dd5ba8",true);
api.registerApp("wx27154ac8a3dd5ba8");
api.handleIntent(getIntent(), this);
boolean sendReq = sendByWX(api, content, shareimg, true);//这个你自己写我是根据我的要求写的...private boolean sendByWX( final IWXAPI api,
String shareContent,
UMediaObject shareImage,
boolean toCircle) {
WXWebpageObject webpage = new WXWebpageObject();//我的是图文分享,你可以根据你的需要设置
//为什么需要填写url? 当前Demo使用的微信SDK不支持图文分享,使用图文分享必须转成URL分享,所以需要填写一个URL
webpage.webpageUrl = fenXiangUrl;
WXMediaMessage msg = new WXMediaMessage(webpage);
msg.title = content;
msg.description = content;
if (shareImage != null && shareImage.getMediaType() == MediaType.IMAGE) {
byte[] b = shareImage.toByte();
if (b != null) {
Bitmap bmp = BitmapFactory.decodeByteArray(b, 0, b.length);
Bitmap thumbBmp = Bitmap.createScaledBitmap(bmp, THUMB_SIZE, THUMB_SIZE, true);
bmp.recycle();
msg.thumbData = Util.bmpToByteArray(thumbBmp, true); // 设置缩略图
}
}
SendMessageToWX.Req req = new SendMessageToWX.Req();
req.transaction = buildTransaction("webpage");
req.message = msg;
req.scene = toCircle ? SendMessageToWX.Req.WXSceneTimeline
: SendMessageToWX.Req.WXSceneSession;
boolean sendReq = api.sendReq(req);
return sendReq;
}
private String buildTransaction(final String type) {
return (type == null) ? String.valueOf(System.currentTimeMillis())
: type + System.currentTimeMillis();
}这些我觉得都不是很重要,在文档里面都能看到,主要是签名那块要是操作不好会出现分享不出去的问题,http://open.weixin.qq.com/document/gettingstart/android/?lang=zh_CN
要获取返回值的话还得自己加东西,文档里面有很简单,希望帮到你