1、首先微信开放平台、腾讯开放平台申请权限并获取APPID:及需要的相关信息,百度有好多
我使用的是sharesdk --下载链接:点击此处下载即可
一、获取sharesdk的key,可参考快速集成开发指南
二、配置清单文件,在中添加以下权限
- <span style="font-family:'KaiTi_GB2312';font-size:14px;"><uses-permission android:name="android.permission.GET_TASKS" />
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.READ_PHONE_STATE" />
- <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
- <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
- <!-- 蓝牙分享所需的权限 -->
- <uses-permission android:name="android.permission.BLUETOOTH" />
- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /></span>
三、添加ShareSDK必要的activity
- <activity
- android:name="com.mob.tools.MobUIShell"
- android:theme="@android:style/Theme.Translucent.NoTitleBar"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:screenOrientation="portrait"
- android:windowSoftInputMode="stateHidden|adjustResize" >
- <!-- QQ和QQ空间分享 QQ登录的回调必须要配置的 -->
- <intent-filter>
- <data android:scheme="tencent100371282" />
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.BROWSABLE" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- <!-- 新浪微博客户端分享回调必须配置 -->
- <intent-filter>
- <action android:name="com.sina.weibo.sdk.action.ACTION_SDK_REQ_ACTIVITY" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
然后配置微信回调Activity
- <!--微信分享回调 -->
- <activity
- android:name=".wxapi.WXEntryActivity"
- android:theme="@android:style/Theme.Translucent.NoTitleBar"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:exported="true"
- android:screenOrientation="portrait" />
- <!--易信分享回调 -->
- <activity
- android:name=".yxapi.YXEntryActivity"
- android:theme="@android:style/Theme.Translucent.NoTitleBar"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:exported="true"
- android:screenOrientation="portrait" />
- <!-- 支付宝分享回调 -->
- <activity
- android:name=".apshare.ShareEntryActivity"
- android:theme="@android:style/Theme.Translucent.NoTitleBar"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:exported="true"/>
微信签名生成工具 :(微信官方平台可下载)点击此处下载。
后续待补。。。。