Back to project page ShareSDKShareDifMsgDemo-Android.
The source code is released under:
MIT License
If you think the Android project ShareSDKShareDifMsgDemo-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.
/* * ????:http://www.mob.com/* w w w . j ava 2 s .c om*/ * ?????QQ: 4006852216 * ????:ShareSDK ??????????????????????????????????????????????????????????????????????????????24?????????? * * Copyright (c) 2013? mob.com. All rights reserved. */ package cn.sharesdk.demo.tpl.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; /** ???????activity?? */ public class WXEntryActivity extends WechatHandlerActivity { /** * ?????????????????????app message * <p> * ???????????????????????????????????????? * ??????????????????????Demo?????????????????? * ???????????????????????? */ public void onGetMessageFromWXReq(WXMediaMessage msg) { Intent iLaunchMyself = getPackageManager().getLaunchIntentForPackage(getPackageName()); startActivity(iLaunchMyself); } /** * ??????????????????????? * <p> * ??????????????????????????????demo?wechatpage?????? * ???????????????????????????????????????? * ????????????????????????????????demo???? * ??? * <p> * ?Demo????????????????????????????????????????Toast */ 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(); } } }