The third party social sharing of Friends Alliance

Source: Internet
Author: User

1    2         3         4<!--appkey Value--5<meta-data android:name="Umeng_appkey"Android:value="56e8befae0f55aeb1e0010a9"/>6<activity android:configchanges="Orientation|keyboard"Android:launchmode="Singletask"Android:name="com.umeng.socialize.view.ShareActivity"android:nohistory="true"Android:theme="@style/theme.umdialog"Android:windowsoftinputmode="statevisible|adjustresize"/>7<activity android:configchanges="keyboardhidden|orientation|screensize"Android:exported="true"Android:name=". Wxapi. Wxentryactivity"android:screenorientation="Portrait"Android:theme="@android: Style/theme.translucent.notitlebar"/>8 9 Ten<!--############ QQ space and QQ SSO authorized activity registration ############-- One<Activity AAndroid:name="com.tencent.tauth.AuthActivity" -Android:launchmode="Singletask" -android:nohistory="true"> the<intent-filter> -                  -<action android:name="Android.intent.action.VIEW"/> -<category android:name="Android.intent.category.DEFAULT"/> +<category android:name="Android.intent.category.BROWSABLE"/> -<data android:scheme="Tencent your QQ interconnection AppID"/> +</intent-filter> A</activity> at<activity android:name="com.tencent.connect.common.AssistActivity" -Android:theme="@android: Style/theme.translucent.notitlebar" -android:screenorientation="Portrait"> -</activity> -</application> -  in      -      to      +<!--QQ Permissions-- -<uses-permission android:name="Android.permission.ACCESS_NETWORK_STATE"/> the<uses-permission android:name="Android.permission.ACCESS_WIFI_STATE"/> *<uses-permission android:name="Android.permission.READ_PHONE_STATE"/> $<uses-permission android:name="Android.permission.WRITE_EXTERNAL_STORAGE"/>Panax Notoginseng<uses-permission android:name="Android.permission.INTERNET"/> -<uses-permission android:name="Android.permission.ACCESS_FINE_LOCATION"/> the<uses-permission android:name="Android.permission.ACCESS_COARSE_LOCATION"/> +</manifest>
Social Sub-sound
1 import com.umeng.socialize.controller.UMServiceFactory;2 import Com.umeng.socialize.controller.UMSocialService;3 import com.umeng.socialize.media.UMImage;4 import Com.umeng.socialize.sso.QZoneSsoHandler;5 import Com.umeng.socialize.sso.UMQQSsoHandler;6 7 import android.support.v7.app.ActionBarActivity;8 import Android.content.Context;9 import Android.os.Bundle;Ten import Android.view.Menu; One import Android.view.MenuItem; A import Android.view.View; - import Android.view.View.OnClickListener; - import Android.widget.Button; the  -  Public classMainactivity extends Actionbaractivity { -     PrivateButton bt; - Context Mcontext; + Umsocialservice Mcontrollershare; -String Imgurl ="http://img.firefoxchina.cn/2016/03/8/201603300937230.jpg"; + @Override A     protected voidonCreate (Bundle savedinstancestate) { at super.oncreate (savedinstancestate); - Setcontentview (r.layout.activity_main); -          -Mcontrollershare = Umservicefactory.getumsocialservice ("Com.umeng.share"); -          - init (); in     } -     Private voidinit () { to         //TODO auto-generated Method Stub +         //setting up shared content -          theBT =(Button) Findviewbyid (r.id.button1); *          $Mcontrollershare.setsharecontent ("!!!!!!!! ");Panax Notoginseng         //set share picture, Parameter 2 is the URL address of the picture - //mcontrollershare.getconfig (). Removeplatform (Share_media. RENREN, Share_media. Douban); theBt.setonclicklistener (NewOnclicklistener () { + @Override A              Public voidOnClick (View v) { theMcontrollershare.setsharemedia (Newumimage (Mcontext, Imgurl)); +                 //whether only logged-on users can open the Share selection page -Mcontrollershare.openshare (mainactivity. This,false); $             } $         }); -         //parameter 1 is the current activity, parameter 2 for the developer in the QQ Internet application app ID, Parameter 3 for the developer in the QQ Internet Application app KEY. -Umqqssohandler Qqssohandler =NewUmqqssohandler ( This,"100424468", the                         "C7394704798A158208A74AB60104F0BA"); - qqssohandler.addtosocialsdk ();Wuyi          the         //parameter 1 is the current activity, parameter 2 for the developer in the QQ Internet application app ID, Parameter 3 for the developer in the QQ Internet Application app KEY. -Qzonessohandler Qzonessohandler =NewQzonessohandler ( This,"100424468", Wu                         "C7394704798A158208A74AB60104F0BA"); - qzonessohandler.addtosocialsdk (); About  $ } -}
Share Success

The third party social sharing of Friends Alliance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.