Back to project page ShareSDK-for-Android.
The source code is released under:
MIT License
If you think the Android project ShareSDK-for-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Offical Website:http://www.mob.com/* ww w .j a va2s.co m*/ * Support QQ: 4006852216 * Offical Wechat Account:ShareSDK (We will inform you our updated news at the first time by Wechat, if we release a new version. If you get any problem, you can also contact us with Wechat, we will reply you within 24 hours.) * * Copyright (c) 2013 mob.com. All rights reserved. */ package cn.sharesdk.socialization.sample.wxapi; import android.content.Intent; import android.widget.Toast; import cn.sharesdk.wechat.utils.WXAppExtendObject; import cn.sharesdk.wechat.utils.WXMediaMessage; import cn.sharesdk.wechat.utils.WechatHandlerActivity; /** Callback activity demo of Wechat */ public class WXEntryActivity extends WechatHandlerActivity { /** * Handling message which sent from wechat * <p> * This message will be sent from wechat by clicking the app icon * at the bottom of the chatting page */ public void onGetMessageFromWXReq(WXMediaMessage msg) { Intent iLaunchMyself = getPackageManager().getLaunchIntentForPackage(getPackageName()); startActivity(iLaunchMyself); } /** * Handling message which sent from wechat * <p> * This message will be sent from wechat by chlicking this app-type * message in the chatting list */ public void onShowMessageFromWXReq(WXMediaMessage msg) { if (msg != null && msg.mediaObject != null && (msg.mediaObject instanceof WXAppExtendObject)) { WXAppExtendObject obj = (WXAppExtendObject) msg.mediaObject; Toast.makeText(this, obj.extInfo, Toast.LENGTH_SHORT).show(); } } }