├── app
├── .gitignore
├── src
│ ├── images
│ │ ├── 1.jpg
│ │ ├── 2.jpg
│ │ ├── 3.jpg
│ │ ├── 4.png
│ │ ├── 5.png
│ │ └── 6.png
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ └── layout
│ │ │ │ ├── app_shareadapter.xml
│ │ │ │ ├── app_user.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── app_sharemenu.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── github
│ │ │ │ └── leo
│ │ │ │ └── umengshare
│ │ │ │ ├── App.java
│ │ │ │ ├── model
│ │ │ │ └── Defaultcontent.java
│ │ │ │ ├── adapter
│ │ │ │ └── ShareAdapter.java
│ │ │ │ ├── UserinfoActivity.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── ShareMenuActivity.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── leo
│ │ │ └── umengshare
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── github
│ │ └── leo
│ │ └── umengshare
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── ushare
├── .gitignore
├── debug.keystore
├── libs
│ ├── libammsdk.jar
│ ├── mta-sdk-1.6.2.jar
│ ├── umeng_social_api.jar
│ ├── umeng_social_net.jar
│ ├── SocialSDK_QQZone_3.jar
│ ├── SocialSDK_WeiXin_2.jar
│ ├── open_sdk_r5756_lite.jar
│ └── umeng_social_view.jar
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── aa.jpg
│ │ │ │ ├── datu.jpg
│ │ │ │ ├── logo.png
│ │ │ │ ├── qcode.jpg
│ │ │ │ ├── umeng.jpg
│ │ │ │ ├── dadadatu.jpg
│ │ │ │ ├── shouquan.png
│ │ │ │ ├── info_icon_1.png
│ │ │ │ ├── umeng_app_icon.png
│ │ │ │ ├── com_facebook_close.png
│ │ │ │ ├── umeng_socialize_fav.png
│ │ │ │ ├── umeng_socialize_qq.png
│ │ │ │ ├── umeng_socialize_sms.png
│ │ │ │ ├── umeng_socialize_tx.png
│ │ │ │ ├── umeng_share_solid_icon.png
│ │ │ │ ├── umeng_socialize_alipay.png
│ │ │ │ ├── umeng_socialize_douban.png
│ │ │ │ ├── umeng_socialize_flickr.png
│ │ │ │ ├── umeng_socialize_gmail.png
│ │ │ │ ├── umeng_socialize_google.png
│ │ │ │ ├── umeng_socialize_kakao.png
│ │ │ │ ├── umeng_socialize_line.png
│ │ │ │ ├── umeng_socialize_more.png
│ │ │ │ ├── umeng_socialize_pocket.png
│ │ │ │ ├── umeng_socialize_qzone.png
│ │ │ │ ├── umeng_socialize_renren.png
│ │ │ │ ├── umeng_socialize_sina.png
│ │ │ │ ├── umeng_socialize_tumblr.png
│ │ │ │ ├── umeng_socialize_wechat.png
│ │ │ │ ├── umeng_socialize_yixin.png
│ │ │ │ ├── umeng_socialize_ynote.png
│ │ │ │ ├── umeng_socialize_evernote.png
│ │ │ │ ├── umeng_socialize_facebook.png
│ │ │ │ ├── umeng_socialize_laiwang.png
│ │ │ │ ├── umeng_socialize_linkedin.png
│ │ │ │ ├── umeng_socialize_twitter.png
│ │ │ │ ├── umeng_socialize_whatsapp.png
│ │ │ │ ├── umeng_socialize_wxcircle.png
│ │ │ │ ├── umeng_socialize_x_button.png
│ │ │ │ ├── umeng_socialize_foursquare.png
│ │ │ │ ├── umeng_socialize_instagram.png
│ │ │ │ ├── umeng_socialize_pinterest.png
│ │ │ │ ├── umeng_socialize_share_music.png
│ │ │ │ ├── umeng_socialize_share_pic.png
│ │ │ │ ├── umeng_socialize_share_video.png
│ │ │ │ ├── umeng_socialize_yixin_circle.png
│ │ │ │ ├── umeng_socialize_laiwang_dynamic.png
│ │ │ │ ├── umeng_socialize_title_back_bt_normal.png
│ │ │ │ ├── umeng_socialize_title_right_bt_normal.png
│ │ │ │ ├── umeng_socialize_title_back_bt_selected.png
│ │ │ │ ├── umeng_socialize_title_right_bt_selected.png
│ │ │ │ ├── umeng_socialize_shareboard_item_background.xml
│ │ │ │ ├── umeng_socialize_title_back_bt.xml
│ │ │ │ ├── umeng_socialize_title_right_bt.xml
│ │ │ │ └── umeng_socialize_window_shadow_pad.xml
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── styles.xml
│ │ │ │ ├── umeng_socialize_colors.xml
│ │ │ │ ├── umeng_socialize_style.xml
│ │ │ │ └── umeng_socialize_strings.xml
│ │ │ ├── anim
│ │ │ │ ├── umeng_socialize_shareboard_animation_out.xml
│ │ │ │ ├── umeng_socialize_slide_out_from_bottom.xml
│ │ │ │ ├── umeng_socialize_slide_in_from_bottom.xml
│ │ │ │ ├── umeng_socialize_fade_in.xml
│ │ │ │ ├── umeng_socialize_fade_out.xml
│ │ │ │ └── umeng_socialize_shareboard_animation_in.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ ├── layout
│ │ │ │ ├── umeng_socialize_shareboard_item.xml
│ │ │ │ ├── umeng_socialize_oauth_dialog.xml
│ │ │ │ ├── umeng_socialize_titile_bar.xml
│ │ │ │ └── umeng_socialize_post_share.xml
│ │ │ └── layout-sw550dp-large
│ │ │ │ ├── umeng_socialize_oauth_dialog.xml
│ │ │ │ └── umeng_socialize_post_share.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── gosuncn
│ │ │ │ └── core
│ │ │ │ └── share
│ │ │ │ ├── wxapi
│ │ │ │ └── WXEntryActivity.java
│ │ │ │ ├── ThirdPartyHelper.java
│ │ │ │ └── ShareHelper.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── hch
│ │ │ └── share
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── github
│ │ └── hch
│ │ └── share
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── images
├── 1.png
├── 2.png
├── 3.png
├── 4.png
├── 5.png
└── 6.png
├── settings.gradle
├── .idea
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── vcs.xml
├── runConfigurations.xml
├── compiler.xml
├── modules.xml
├── gradle.xml
└── misc.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── gradlew.bat
├── gradlew
└── README.md
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/ushare/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/images/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/images/1.png
--------------------------------------------------------------------------------
/images/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/images/2.png
--------------------------------------------------------------------------------
/images/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/images/3.png
--------------------------------------------------------------------------------
/images/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/images/4.png
--------------------------------------------------------------------------------
/images/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/images/5.png
--------------------------------------------------------------------------------
/images/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/images/6.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':share', ':mylibrary1', ':share', ':ushare', ':mylibrary'
2 |
--------------------------------------------------------------------------------
/app/src/images/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/images/1.jpg
--------------------------------------------------------------------------------
/app/src/images/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/images/2.jpg
--------------------------------------------------------------------------------
/app/src/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/images/3.jpg
--------------------------------------------------------------------------------
/app/src/images/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/images/4.png
--------------------------------------------------------------------------------
/app/src/images/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/images/5.png
--------------------------------------------------------------------------------
/app/src/images/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/images/6.png
--------------------------------------------------------------------------------
/ushare/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/debug.keystore
--------------------------------------------------------------------------------
/ushare/libs/libammsdk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/libs/libammsdk.jar
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ushare/libs/mta-sdk-1.6.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/libs/mta-sdk-1.6.2.jar
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | UmengShare
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ushare/libs/umeng_social_api.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/libs/umeng_social_api.jar
--------------------------------------------------------------------------------
/ushare/libs/umeng_social_net.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/libs/umeng_social_net.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/ushare/libs/SocialSDK_QQZone_3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/libs/SocialSDK_QQZone_3.jar
--------------------------------------------------------------------------------
/ushare/libs/SocialSDK_WeiXin_2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/libs/SocialSDK_WeiXin_2.jar
--------------------------------------------------------------------------------
/ushare/libs/open_sdk_r5756_lite.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/libs/open_sdk_r5756_lite.jar
--------------------------------------------------------------------------------
/ushare/libs/umeng_social_view.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/libs/umeng_social_view.jar
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/aa.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/aa.jpg
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/datu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/datu.jpg
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/logo.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/qcode.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/qcode.jpg
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng.jpg
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/dadadatu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/dadadatu.jpg
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/shouquan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/shouquan.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/info_icon_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/info_icon_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_app_icon.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/com_facebook_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/com_facebook_close.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_fav.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_fav.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_qq.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_sms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_sms.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_tx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_tx.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_share_solid_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_share_solid_icon.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_alipay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_alipay.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_douban.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_douban.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_flickr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_flickr.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_gmail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_gmail.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_google.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_kakao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_kakao.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_line.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_more.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_pocket.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_pocket.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_qzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_qzone.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_renren.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_renren.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_sina.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_sina.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_tumblr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_tumblr.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_wechat.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_yixin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_yixin.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_ynote.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_ynote.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_evernote.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_evernote.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_facebook.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_laiwang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_laiwang.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_linkedin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_linkedin.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_twitter.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_whatsapp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_whatsapp.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_wxcircle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_wxcircle.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_x_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_x_button.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_foursquare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_foursquare.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_instagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_instagram.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_pinterest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_pinterest.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_share_music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_share_music.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_share_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_share_pic.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_share_video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_share_video.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_yixin_circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_yixin_circle.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_laiwang_dynamic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_laiwang_dynamic.png
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_title_back_bt_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_title_back_bt_normal.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_title_right_bt_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_title_right_bt_normal.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_title_back_bt_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_title_back_bt_selected.png
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_title_right_bt_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengdouzhe/UmengShareHelper/HEAD/ushare/src/main/res/drawable/umeng_socialize_title_right_bt_selected.png
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ushare/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ShareDemo
3 | 打开分享面板
4 | 打开自定义分享面板
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/ushare/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/ushare/src/main/java/com/gosuncn/core/share/wxapi/WXEntryActivity.java:
--------------------------------------------------------------------------------
1 | package com.gosuncn.core.share.wxapi;
2 |
3 |
4 | import com.umeng.socialize.weixin.view.WXCallbackActivity;
5 |
6 | public class WXEntryActivity extends WXCallbackActivity {
7 |
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/ushare/src/main/res/anim/umeng_socialize_shareboard_animation_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ushare/src/main/res/anim/umeng_socialize_slide_out_from_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ushare/src/main/res/anim/umeng_socialize_slide_in_from_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/ushare/src/main/res/anim/umeng_socialize_fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/ushare/src/main/res/anim/umeng_socialize_fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 | #ffffff
7 | #469ef8
8 | #000000
9 |
10 |
--------------------------------------------------------------------------------
/ushare/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/ushare/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #ffffff
8 | #469ef8
9 | #000000
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ushare/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ushare/src/test/java/com/github/hch/share/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.github.hch.share;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/test/java/com/github/leo/umengshare/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.github.leo.umengshare;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_shareboard_item_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_title_back_bt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_title_right_bt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ushare/src/main/res/anim/umeng_socialize_shareboard_animation_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
10 |
11 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/leo/umengshare/App.java:
--------------------------------------------------------------------------------
1 | package com.github.leo.umengshare;
2 |
3 | import android.app.Application;
4 |
5 | import com.umeng.socialize.PlatformConfig;
6 | import com.umeng.socialize.UMShareAPI;
7 |
8 |
9 | public class App extends Application {
10 |
11 | @Override
12 | public void onCreate() {
13 | super.onCreate();
14 | UMShareAPI.get(this);
15 | }
16 |
17 | {
18 | PlatformConfig.setWeixin("wxdc1e388c3822c80b", "3baf1193c85774b3fd9d18447d76cab0");
19 | PlatformConfig.setQQZone("100424468", "c7394704798a158208a74ab60104f0ba");
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_shareadapter.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
11 |
17 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in G:\AndroidStudio\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/ushare/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in G:\AndroidStudio\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ushare/src/main/java/com/gosuncn/core/share/ThirdPartyHelper.java:
--------------------------------------------------------------------------------
1 | package com.gosuncn.core.share;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 |
6 | import com.umeng.socialize.UMAuthListener;
7 | import com.umeng.socialize.UMShareAPI;
8 | import com.umeng.socialize.bean.SHARE_MEDIA;
9 |
10 | /**
11 | * Created by leo on 2016/11/22
12 | * description: 封装了友盟的第三方平台登录方法
13 | */
14 | public class ThirdPartyHelper {
15 |
16 | /**
17 | * 第三方平台登录
18 | * @param platform 平台 例如QQ,微信等等
19 | * @return
20 | */
21 | public static void authLogin(Context context, UMShareAPI mShareAPI,SHARE_MEDIA platform,UMAuthListener umAuthListener){
22 | mShareAPI.getPlatformInfo((Activity) context, platform, umAuthListener);
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/leo/umengshare/model/Defaultcontent.java:
--------------------------------------------------------------------------------
1 | package com.github.leo.umengshare.model;
2 |
3 | import android.os.Environment;
4 |
5 | /**
6 | * Created by leo on 2016/11/21
7 | * description: 默认分享数据
8 | */
9 | public class Defaultcontent {
10 | public static String url = "http://t.cn/RVsZt1Z";
11 | public static String text = "测试内容";
12 | public static String title = "测试标题";
13 | public static String imageurl = "http://dev.umeng.com/images/tab2_1.png";
14 | public static String videourl = "http://video.sina.com.cn/p/sports/cba/v/2013-10-22/144463050817.html";
15 | public static String musicurl = "http://music.huoxing.com/upload/20130330/1364651263157_1085.mp3";
16 | public static final String SDCARD_ROOT = Environment.getExternalStorageDirectory().getAbsolutePath();
17 | }
18 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ushare/src/androidTest/java/com/github/hch/share/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.github.hch.share;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.github.hch.share", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/github/leo/umengshare/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.github.leo.umengshare;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.github.leo.umengshare", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ushare/src/main/res/values/umeng_socialize_colors.xml:
--------------------------------------------------------------------------------
1 |
2 | #F4F4F4
3 | #2c3035
4 | #333333
5 | #FFFFFF
6 | #E6E6E6
7 | #999999
8 | #464f61
9 | #959696
10 | #666666
11 | #EEEEEE
12 | #595959
13 | #C4C4C4
14 | #F8F8F8
15 |
--------------------------------------------------------------------------------
/ushare/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 |
4 | android {
5 | compileSdkVersion 25
6 | buildToolsVersion "25.0.0"
7 | defaultConfig {
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:25.0.1'
28 | testCompile 'junit:junit:4.12'
29 | }
30 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.0"
6 | defaultConfig {
7 | applicationId "com.github.leo.umengshare"
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:25.0.1'
28 | testCompile 'junit:junit:4.12'
29 | compile project (':ushare')
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_user.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
19 |
20 |
28 |
29 |
--------------------------------------------------------------------------------
/ushare/src/main/res/layout/umeng_socialize_shareboard_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_sharemenu.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
25 |
26 |
34 |
35 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/leo/umengshare/adapter/ShareAdapter.java:
--------------------------------------------------------------------------------
1 | package com.github.leo.umengshare.adapter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.BaseAdapter;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import com.github.leo.umengshare.R;
12 | import com.umeng.socialize.common.ResContainer;
13 | import com.umeng.socialize.shareboard.SnsPlatform;
14 |
15 | import java.util.ArrayList;
16 |
17 | /**
18 | * Created by wangfei on 16/7/12.
19 | */
20 | public class ShareAdapter extends BaseAdapter {
21 | private ArrayList list;
22 | private Context context;
23 | public ShareAdapter(Context context, ArrayList list){
24 | this.list = list;
25 | this.context = context;
26 | }
27 | @Override
28 | public int getCount() {
29 | return list.size();
30 | }
31 |
32 | @Override
33 | public Object getItem(int position) {
34 | return list.get(position);
35 | }
36 |
37 | @Override
38 | public long getItemId(int position) {
39 | return position;
40 | }
41 |
42 | @Override
43 | public View getView(int position, View convertView, ViewGroup parent) {
44 | if (convertView ==null){
45 | convertView = LayoutInflater.from(context).inflate(R.layout.app_shareadapter, null);
46 | }
47 | ImageView img = (ImageView) convertView.findViewById(R.id.adapter_image);
48 | img.setImageResource(ResContainer.getResourceId(context,"drawable",list.get(position).mIcon));
49 | TextView tv = (TextView)convertView.findViewById(R.id.name);
50 | tv.setText(ResContainer.getResourceId(context,"string",list.get(position).mShowWord));
51 |
52 | return convertView;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/ushare/src/main/res/drawable/umeng_socialize_window_shadow_pad.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
6 |
7 |
8 |
9 |
10 |
11 | -
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | -
31 |
33 |
34 |
35 |
36 |
37 |
38 | -
44 |
46 |
47 |
48 |
49 |
50 |
51 | -
57 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/ushare/src/main/res/layout/umeng_socialize_oauth_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
17 |
18 |
26 |
27 |
37 |
38 |
39 |
45 |
46 |
52 |
53 |
58 |
59 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/leo/umengshare/UserinfoActivity.java:
--------------------------------------------------------------------------------
1 | package com.github.leo.umengshare;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.Toast;
8 |
9 | import com.gosuncn.core.share.ThirdPartyHelper;
10 | import com.umeng.socialize.UMAuthListener;
11 | import com.umeng.socialize.UMShareAPI;
12 | import com.umeng.socialize.bean.SHARE_MEDIA;
13 | import com.umeng.socialize.utils.Log;
14 |
15 | import java.util.Map;
16 |
17 | /**
18 | * Created by leo on 2016/11/22
19 | * description: 获得用户信息
20 | */
21 | public class UserinfoActivity extends Activity {
22 | private UMShareAPI mShareAPI = null;
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.app_user);
28 | mShareAPI = UMShareAPI.get(this);
29 | }
30 |
31 | public void onClick(View view) {
32 | SHARE_MEDIA platform = null;
33 | switch (view.getId()){
34 | case R.id.qqinfo:
35 | ThirdPartyHelper.authLogin(this,mShareAPI,platform.QQ,umAuthListener);
36 | break;
37 | case R.id.wxinfo:
38 | ThirdPartyHelper.authLogin(this,mShareAPI,platform.WEIXIN,umAuthListener);
39 | break;
40 | }
41 |
42 | }
43 |
44 | private UMAuthListener umAuthListener = new UMAuthListener() {
45 | @Override
46 | public void onComplete(SHARE_MEDIA platform, int action, Map data) {
47 | for (String key : data.keySet()) {
48 | Log.e("xxxxxx key = "+key+" value= "+data.get(key));
49 | }
50 | if (data!=null){
51 |
52 | Toast.makeText(getApplicationContext(), data.toString(), Toast.LENGTH_SHORT).show();
53 | }
54 | }
55 |
56 | @Override
57 | public void onError(SHARE_MEDIA platform, int action, Throwable t) {
58 | Toast.makeText( getApplicationContext(), "get fail"+t.getMessage(), Toast.LENGTH_SHORT).show();
59 | }
60 |
61 | @Override
62 | public void onCancel(SHARE_MEDIA platform, int action) {
63 | Toast.makeText( getApplicationContext(), "get cancel", Toast.LENGTH_SHORT).show();
64 | }
65 | };
66 |
67 | @Override
68 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
69 | super.onActivityResult(requestCode, resultCode, data);
70 | mShareAPI.onActivityResult(requestCode, resultCode, data);
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/ushare/src/main/res/layout-sw550dp-large/umeng_socialize_oauth_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
19 |
20 |
28 |
29 |
38 |
39 |
40 |
46 |
47 |
54 |
55 |
60 |
61 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/leo/umengshare/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.github.leo.umengshare;
2 |
3 |
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.view.View;
8 | import android.widget.Button;
9 | import android.widget.Toast;
10 |
11 | import com.umeng.socialize.UMShareAPI;
12 | import com.umeng.socialize.UMShareListener;
13 | import com.umeng.socialize.bean.SHARE_MEDIA;
14 |
15 | /**
16 | * Created by leo on 2016/11/21
17 | * description: 主界面
18 | */
19 | public class MainActivity extends AppCompatActivity {
20 |
21 | private Button button;
22 | private Button btnGetUserInfo;
23 | @Override
24 | protected void onCreate(Bundle savedInstanceState) {
25 | super.onCreate(savedInstanceState);
26 | setContentView(R.layout.activity_main);
27 | button = (Button)findViewById(R.id.btnTest);
28 | button.setOnClickListener(new View.OnClickListener() {
29 | @Override
30 | public void onClick(View view) {
31 | Intent intent = new Intent(MainActivity.this,ShareMenuActivity.class);
32 | startActivity(intent);
33 | }
34 | });
35 | btnGetUserInfo = (Button)findViewById(R.id.btnGetUserInfo);
36 | btnGetUserInfo.setOnClickListener(new View.OnClickListener() {
37 | @Override
38 | public void onClick(View view) {
39 | Intent intent = new Intent(MainActivity.this,UserinfoActivity.class);
40 | startActivity(intent);
41 | }
42 | });
43 | }
44 |
45 | @Override
46 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
47 | super.onActivityResult(requestCode, resultCode, data);
48 | UMShareAPI.get(this).onActivityResult(requestCode, resultCode, data);
49 |
50 | }
51 |
52 |
53 | private UMShareListener umShareListener = new UMShareListener() {
54 | @Override
55 | public void onResult(SHARE_MEDIA platform) {
56 | //Log.d("plat","platform"+platform);
57 |
58 | Toast.makeText(MainActivity.this, platform + " 分享成功啦", Toast.LENGTH_SHORT).show();
59 |
60 | }
61 |
62 | @Override
63 | public void onError(SHARE_MEDIA platform, Throwable t) {
64 | Toast.makeText(MainActivity.this,platform + " 分享失败啦", Toast.LENGTH_SHORT).show();
65 | if(t!=null){
66 | //Log.d("throw","throw:"+t.getMessage());
67 | }
68 | }
69 |
70 | @Override
71 | public void onCancel(SHARE_MEDIA platform) {
72 | Toast.makeText(MainActivity.this,platform + " 分享取消了", Toast.LENGTH_SHORT).show();
73 | }
74 | };
75 | }
76 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | C:\Users\leo\AppData\Roaming\Subversion
48 |
49 |
50 |
51 |
52 |
53 | 1.8
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/ushare/src/main/java/com/gosuncn/core/share/ShareHelper.java:
--------------------------------------------------------------------------------
1 | package com.gosuncn.core.share;
2 |
3 | import android.app.Activity;
4 |
5 | import com.umeng.socialize.ShareAction;
6 | import com.umeng.socialize.UMShareListener;
7 | import com.umeng.socialize.bean.SHARE_MEDIA;
8 | import com.umeng.socialize.media.UMImage;
9 | import com.umeng.socialize.media.UMVideo;
10 | import com.umeng.socialize.media.UMusic;
11 |
12 |
13 |
14 | /**
15 | * Created by leo on 2016/11/22
16 | * description: 封装了友盟的分享方法
17 | */
18 | public class ShareHelper {
19 |
20 | /**
21 | * 分享内容
22 | * @param activity activity
23 | * @param umShareListener 回调接口
24 | * @param title 标题
25 | * @param text 内容
26 | * @param targetUrl 目标地址
27 | */
28 | public static void shareText(Activity activity, UMShareListener umShareListener,
29 | String title,String text,String targetUrl){
30 | new ShareAction(activity).setDisplayList(SHARE_MEDIA.QQ, SHARE_MEDIA.QZONE, SHARE_MEDIA.WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE)
31 | .withTitle(title)
32 | .withText(text)
33 | .withTargetUrl(targetUrl)
34 | .setCallback(umShareListener)
35 | .open();
36 | }
37 |
38 | /**
39 | * 分享图片
40 | * @param activity activity
41 | * @param umShareListener 回调接口
42 | * @param imgUrl 图片地址
43 | * @param targetUrl 目标地址
44 | */
45 | public static void shareImgage(Activity activity, UMShareListener umShareListener,UMImage umImage,String targetUrl){
46 | new ShareAction(activity).setDisplayList(SHARE_MEDIA.QQ, SHARE_MEDIA.QZONE, SHARE_MEDIA.WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE)
47 | .withMedia(umImage)
48 | .withTargetUrl(targetUrl)
49 | .setCallback(umShareListener)
50 | .open();
51 | }
52 |
53 | /**
54 | * 分享视频
55 | * @param activity activity
56 | * @param umShareListener 回调接口
57 | * @param videoUrl 视频地址
58 | * @param targetUrl 目标地址
59 | */
60 | public static void shareVideo(Activity activity, UMShareListener umShareListener,
61 | UMVideo umVideo,String targetUrl){
62 | new ShareAction(activity).setDisplayList(SHARE_MEDIA.QQ, SHARE_MEDIA.QZONE, SHARE_MEDIA.WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE)
63 | .withMedia(umVideo)
64 | .withTargetUrl(targetUrl)
65 | .setCallback(umShareListener)
66 | .open();
67 | }
68 |
69 | /**
70 | * 分享音乐
71 | * @param activity activity
72 | * @param umShareListener 回调接口
73 | *
74 | * @param targetUrl 目标地址
75 | */
76 | public static void shareMusic(Activity activity, UMShareListener umShareListener,
77 | UMusic uMusic,String targetUrl){
78 | new ShareAction(activity).setDisplayList(SHARE_MEDIA.QQ, SHARE_MEDIA.QZONE, SHARE_MEDIA.WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE)
79 | .withMedia(uMusic)
80 | .withTargetUrl(targetUrl)
81 | .setCallback(umShareListener)
82 | .open();
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/ushare/src/main/res/layout/umeng_socialize_titile_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
18 |
19 |
29 |
30 |
37 |
38 |
46 |
47 |
56 |
57 |
58 |
63 |
64 |
72 |
73 |
80 |
81 |
84 |
--------------------------------------------------------------------------------
/ushare/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
79 |
80 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
43 |
44 |
45 |
48 |
49 |
50 |
51 |
57 |
58 |
59 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
77 |
78 |
79 |
80 |
85 |
86 |
87 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/ushare/src/main/res/values/umeng_socialize_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
18 |
19 |
25 |
26 |
36 |
37 |
40 |
41 |
51 |
52 |
56 |
57 |
61 |
62 |
66 |
67 |
71 |
72 |
73 |
74 |
79 |
80 |
87 |
88 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/app/src/main/java/com/github/leo/umengshare/ShareMenuActivity.java:
--------------------------------------------------------------------------------
1 | package com.github.leo.umengshare;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.Toast;
9 |
10 | import com.github.leo.umengshare.model.Defaultcontent;
11 | import com.gosuncn.core.share.ShareHelper;
12 | import com.umeng.socialize.UMShareAPI;
13 | import com.umeng.socialize.UMShareListener;
14 | import com.umeng.socialize.bean.SHARE_MEDIA;
15 | import com.umeng.socialize.media.UMImage;
16 | import com.umeng.socialize.media.UMVideo;
17 | import com.umeng.socialize.media.UMusic;
18 | import com.umeng.socialize.utils.Log;
19 |
20 | import static com.github.leo.umengshare.model.Defaultcontent.musicurl;
21 | import static com.github.leo.umengshare.model.Defaultcontent.videourl;
22 |
23 |
24 | /**
25 | * Created by leo on 2016/11/21
26 | * description: 分享菜单
27 | */
28 | public class ShareMenuActivity extends Activity {
29 |
30 | private Button shareContext;
31 | private Button shareMusic;
32 | private Button shareVideo;
33 | private Button shareImage;
34 |
35 | private final String TARGET_URL = "http://www.baidu.com";
36 |
37 | @Override
38 | protected void onCreate(Bundle savedInstanceState) {
39 | super.onCreate(savedInstanceState);
40 | setContentView(R.layout.app_sharemenu);
41 | shareContext =(Button)findViewById(R.id.share_context);
42 | shareMusic =(Button)findViewById(R.id.share_music);
43 | shareVideo =(Button)findViewById(R.id.share_video);
44 | shareImage =(Button)findViewById(R.id.share_image);
45 | shareContext.setOnClickListener(new View.OnClickListener() {
46 | @Override
47 | public void onClick(View view) {
48 | ShareHelper.shareText(ShareMenuActivity.this,umShareListener,
49 | Defaultcontent.title,Defaultcontent.text,TARGET_URL);
50 | }
51 | });
52 | shareMusic.setOnClickListener(new View.OnClickListener() {
53 | @Override
54 | public void onClick(View view) {
55 |
56 | UMusic music = new UMusic(musicurl);
57 | music.setTitle("This is music title");//音乐的标题
58 | music.setThumb(new UMImage(ShareMenuActivity.this,"http://www.umeng.com/images/pic/social/chart_1.png"));//音乐的缩略图
59 | music.setDescription("my description");//音乐的描述
60 | ShareHelper.shareMusic(ShareMenuActivity.this,umShareListener,
61 | music,TARGET_URL);
62 | }
63 | });
64 | shareVideo.setOnClickListener(new View.OnClickListener() {
65 | @Override
66 | public void onClick(View view) {
67 | UMVideo video = new UMVideo(videourl);
68 | video.setTitle("This is music title");//视频的标题
69 | video.setThumb(new UMImage(ShareMenuActivity.this,"http://www.umeng.com/images/pic/social/chart_1.png"));//视频的缩略图
70 | video.setDescription("my description");//视频的描述
71 |
72 | ShareHelper.shareVideo(ShareMenuActivity.this,umShareListener,video,TARGET_URL);
73 | }
74 | });
75 | shareImage.setOnClickListener(new View.OnClickListener() {
76 | @Override
77 | public void onClick(View view) {
78 |
79 | ShareHelper.shareImgage(ShareMenuActivity.this,umShareListener,new UMImage(ShareMenuActivity.this,"http://www.umeng.com/images/pic/social/chart_1.png"),TARGET_URL);
80 | }
81 | });
82 | }
83 |
84 |
85 |
86 | private UMShareListener umShareListener = new UMShareListener() {
87 | @Override
88 | public void onResult(SHARE_MEDIA platform) {
89 | Log.d("plat","platform"+platform);
90 | if(platform.name().equals("WEIXIN_FAVORITE")){
91 | Toast.makeText(ShareMenuActivity.this,platform + " 收藏成功啦", Toast.LENGTH_SHORT).show();
92 | }else{
93 | Toast.makeText(ShareMenuActivity.this, platform + " 分享成功啦", Toast.LENGTH_SHORT).show();
94 | }
95 | }
96 |
97 | @Override
98 | public void onError(SHARE_MEDIA platform, Throwable t) {
99 | Toast.makeText(ShareMenuActivity.this,platform + " 分享失败啦", Toast.LENGTH_SHORT).show();
100 | if(t!=null){
101 | Log.d("throw","throw:"+t.getMessage());
102 | }
103 | }
104 |
105 | @Override
106 | public void onCancel(SHARE_MEDIA platform) {
107 | Toast.makeText(ShareMenuActivity.this,platform + " 分享取消了", Toast.LENGTH_SHORT).show();
108 | }
109 | };
110 |
111 |
112 | @Override
113 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
114 | super.onActivityResult(requestCode, resultCode, data);
115 | /** attention to this below ,must add this**/
116 | UMShareAPI.get(this).onActivityResult(requestCode, resultCode, data);
117 | Log.d("result","onActivityResult");
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/ushare/src/main/res/layout/umeng_socialize_post_share.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
20 |
21 |
22 |
28 |
29 |
43 |
44 |
45 |
55 |
56 |
67 |
68 |
73 |
74 |
75 |
87 |
88 |
97 |
98 |
104 |
105 |
113 |
114 |
120 |
121 |
122 |
123 |
138 |
139 |
150 |
151 |
--------------------------------------------------------------------------------
/ushare/src/main/res/layout-sw550dp-large/umeng_socialize_post_share.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
20 |
21 |
22 |
28 |
29 |
43 |
44 |
45 |
55 |
56 |
67 |
68 |
73 |
74 |
75 |
86 |
87 |
96 |
97 |
103 |
104 |
112 |
113 |
119 |
120 |
121 |
122 |
137 |
138 |
149 |
150 |
--------------------------------------------------------------------------------
/ushare/src/main/res/values/umeng_socialize_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 向下拉动可以刷新
5 | 松开可以刷新
6 | 加载中…
7 | 点击刷新
8 | 请连接网络后再尝试!
9 | 评论
10 | 评论详情
11 | 返回
12 | 最近\@的好友
13 | 关注的好友
14 | 发布
15 | 对不起,因为违反了用户协议您已被禁言.
16 | 登录失败…
17 | 秒前
18 | 分钟前
19 | 小时前
20 | 游客登录
21 | 登录帐号
22 |
23 | 12dip
24 | 350dip
25 | 580dip
26 |
27 | 友盟社会化组件(SDK)让移动应用快速整合社交分享功能,我们简化了社交平台的接入,为开发者提供坚实的基础服务。(一)支持各大主流社交平台,
28 | (二)支持图片、文字、gif动图、音频、视频;@好友,关注官方微博等功能。
29 | (三)提供详尽的后台用户社交行为分析。www.umeng.com/social
30 | QQ空间
31 | 登录
32 | 选择已有帐号登录
33 | 授权
34 | 未授权
35 | 个人中心
36 | 登录失败了,请重试
37 | 说点什么吧…
38 | 好友列表
39 | 游客
40 | 无法连接到腾讯微博客户端
41 | 授权登录失败
42 | 版本不匹配,SSO只对微博客户端V3.8.1及以上的版本提供支持
43 | 未安装腾讯微博客户端
44 | 请稍候...
45 | 跳转微信中,请稍候...
46 | 跳转朋友圈中,请稍候...
47 | 跳转易信中,请稍候...
48 | 跳转易信朋友圈中,请稍候...
49 | 跳转QQ中,请稍候...
50 | 跳转QZone中,请稍候...
51 | 跳转
52 | ,请稍候...
53 | 载入中,请稍候...
54 |
55 | 腾讯微博
56 | 微信收藏
57 | 微博
58 | QQ
59 | QQ空间
60 | 人人网
61 | 豆瓣网
62 | 微信
63 | 微信朋友圈
64 | 微信收藏
65 | 请配置用户平台
66 | 社交分享
67 | 分享中…
68 | 说点啥…
69 | 取消
70 | 发送
71 |
72 | 分享
73 |
74 | 邮件
75 | 短信
76 | 新浪
77 | 易信
78 | 易信朋友圈
79 |
80 | 来往动态
81 | 印象笔记
82 | 有道云笔记
83 | facebook
84 | twitter
85 | instagram
86 | pinterest
87 | pocket
88 | Linkedin
89 | Foursquare
90 | WhatsApp
91 | LINE
92 | Flickr
93 | Tumblr
94 | 支付宝
95 | Kakao Talk
96 | GooglePlus
97 | 更多
98 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # UmengShareHelper
2 | # Introduction
3 | 这是一个封装了友盟分享和第三方登录的帮助类,像现在好多app都有分享,第三方平台登录的,目前据本人看的话,比较多的是QQ,微信分享,登录。但是要集成这个的话,有好多方法。不过都需要在官网上下载sdk,看文档,一步一步地去做,但是这个的话比较麻烦。如果是新手的话,这个就需要花费时间去看官网上文档,慢慢地去集成,就算是老司机的话,集成起来也不是很方便,为什么这样说呢?因为都要复制jar以及资源文件,配置权限,修改build.gradle文件等等,这个的话会超级麻烦。但是有了这个就不用复制jar以及资源等等,有了这个的话,就需要几步初始化然后就可以调用了。
4 |
5 | # Getting Started
6 | 由于需要时间审核,所以脚本引入需要等通过才可以。
7 | ##Usage
8 | ###备注:由于微信分享需要正式版本生成签名,然后根据签名去微信平台申请得到appkey才行。但是代码是没问题的,作者拿了友盟提供的微信appKey,然后在友盟提供的demo中试过了。
9 | ###1.初始化Activity,将微信和QQ需要用到的Activity注册进来。
10 | ```Java
11 |
12 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
38 |
39 |
40 |
41 |
46 | ```
47 | ###2.申请友盟APPkey,然后放到AndroidManifest.xml中。
48 | ```Java
49 |
52 |
53 | ```
54 | value需要填写去友盟申请到的key
55 |
56 | ###3.初始化微信和qq(ps:需要去微信平台和腾讯申请才行)
57 | ```Java
58 | public class App extends Application {
59 |
60 | @Override
61 | public void onCreate() {
62 | super.onCreate();
63 | UMShareAPI.get(this);
64 | }
65 |
66 | {
67 |
68 | PlatformConfig.setWeixin("wxdc1e388c3822c80b", "3baf1193c85774b3fd9d18447d76cab0");
69 |
70 | PlatformConfig.setQQZone("100424468", "c7394704798a158208a74ab60104f0ba");
71 |
72 | }
73 | }
74 | ```
75 | ###4.调用方法:
76 | (1)分享
77 | 在需要用到的Activity加上以下方法:
78 | ```Java
79 | private UMShareListener umShareListener = new UMShareListener() {
80 | @Override
81 | public void onResult(SHARE_MEDIA platform) {
82 | Log.d("plat","platform"+platform);
83 | if(platform.name().equals("WEIXIN_FAVORITE")){
84 | Toast.makeText(ShareMenuActivity.this,platform + " 收藏成功啦", Toast.LENGTH_SHORT).show();
85 | }else{
86 | Toast.makeText(ShareMenuActivity.this, platform + " 分享成功啦", Toast.LENGTH_SHORT).show();
87 | }
88 | }
89 |
90 | @Override
91 | public void onError(SHARE_MEDIA platform, Throwable t) {
92 | Toast.makeText(ShareMenuActivity.this,platform + " 分享失败啦", Toast.LENGTH_SHORT).show();
93 | if(t!=null){
94 | Log.d("throw","throw:"+t.getMessage());
95 | }
96 | }
97 |
98 | @Override
99 | public void onCancel(SHARE_MEDIA platform) {
100 | Toast.makeText(ShareMenuActivity.this,platform + " 分享取消了", Toast.LENGTH_SHORT).show();
101 | }
102 | };
103 |
104 |
105 | @Override
106 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
107 | super.onActivityResult(requestCode, resultCode, data);
108 | /** attention to this below ,must add this**/
109 | UMShareAPI.get(this).onActivityResult(requestCode, resultCode, data);
110 | Log.d("result","onActivityResult");
111 | }
112 | ```
113 | ●分享内容:
114 | ```Java
115 | /**
116 | * 分享内容
117 | * @param activity activity
118 | * @param umShareListener 回调接口
119 | * @param title 标题
120 | * @param text 内容
121 | * @param targetUrl 目标地址
122 | */
123 | ShareHelper.shareText(Activity activity,umShareListener,title,text,targetUrl);
124 | ```
125 | ●分享图片:
126 | ```Java
127 | /**
128 | * 分享图片
129 | * @param activity activity
130 | * @param umShareListener 回调接口
131 | * @param umImage 图片对象
132 | * @param targetUrl 目标地址
133 | */
134 |
135 | UMImage umImage = new UMImage(ShareMenuActivity.this,"http://www.umeng.com/images/pic/social/chart_1.png");
136 | ShareHelper.shareImgage(Activity activity,umShareListener,umImage,targetUrl);
137 | ```
138 | ●分享视频:
139 | ```Java
140 | /**
141 | * 分享视频
142 | * @param activity activity
143 | * @param umShareListener 回调接口
144 | * @param video 视频对象
145 | * @param targetUrl 目标地址
146 | */
147 | UMVideo video = new UMVideo(videourl);//视频地址
148 | video.setTitle("This is music title");//视频的标题
149 | video.setThumb(new UMImage(ShareMenuActivity.this,"http://www.umeng.com/images/pic/social/chart_1.png"));//视频的缩略图
150 | video.setDescription("my description");//视频的描述
151 |
152 | ShareHelper.shareVideo(Activity activity,umShareListener,video,targetUrl);
153 | ```
154 | ●分享音乐:
155 | ```Java
156 | /**
157 | * 分享音乐
158 | * @param activity activity
159 | * @param umShareListener 回调接口
160 | * @param music 音乐对象
161 | * @param targetUrl 目标地址
162 | */
163 |
164 | UMusic music = new UMusic(musicurl);
165 | music.setTitle("This is music title");//音乐的标题
166 | music.setThumb(new UMImage(ShareMenuActivity.this,"http://www.umeng.com/images/pic/social/chart_1.png"));//音乐的缩略图
167 | music.setDescription("my description");//音乐的描述
168 | ShareHelper.shareMusic(Activity activity,umShareListener,music,targetUrl);
169 | ```
170 | (2)第三方登录
171 | 在需要用到的Activity加上以下方法
172 | ```Java
173 | private UMAuthListener umAuthListener = new UMAuthListener() {
174 | @Override
175 | public void onComplete(SHARE_MEDIA platform, int action, Map data) {
176 | for (String key : data.keySet()) {
177 | Log.e("xxxxxx key = "+key+" value= "+data.get(key));
178 | }
179 | if (data!=null){
180 |
181 | Toast.makeText(getApplicationContext(), data.toString(), Toast.LENGTH_SHORT).show();
182 | }
183 | }
184 |
185 | @Override
186 | public void onError(SHARE_MEDIA platform, int action, Throwable t) {
187 | Toast.makeText( getApplicationContext(), "get fail"+t.getMessage(), Toast.LENGTH_SHORT).show();
188 | }
189 |
190 | @Override
191 | public void onCancel(SHARE_MEDIA platform, int action) {
192 | Toast.makeText( getApplicationContext(), "get cancel", Toast.LENGTH_SHORT).show();
193 | }
194 | };
195 |
196 | @Override
197 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
198 | super.onActivityResult(requestCode, resultCode, data);
199 | mShareAPI.onActivityResult(requestCode, resultCode, data);
200 | }
201 | ```
202 | ```Java
203 | /**
204 | * 第三方平台登录
205 | * @param activity
206 | * @param UMShareAPI
207 | * @param umAuthListener
208 | * @return
209 | */
210 | ThirdPartyHelper.authLogin(this,UMShareAPI.get(this),platform.QQ,umAuthListener);
211 | ThirdPartyHelper.authLogin(this,UMShareAPI.get(this),platform.WEIXIN,umAuthListener);
212 |
213 | ```
214 | #Screenshots
215 | 
216 | 
217 | 
218 | 
219 | 
220 | 
221 |
222 | #Bugs Report and Help
223 | If you find any bug when using project, please report [here](https://github.com/fengdouzhe/UmengShareHelper/issues/new). Thanks for helping us building a better one.
224 |
225 | #Abount Author
226 | 作者是一个非常喜爱编程的人,本人QQ是:1040114490。欢迎大家来加我交流。
227 |
228 | #License
229 | ```Java
230 | Copyright (C) fengdouzhe, The Framework Open Source Project
231 |
232 | Licensed under the Apache License, Version 2.0 (the "License");
233 | you may not use this file except in compliance with the License.
234 | You may obtain a copy of the License at
235 |
236 | http://www.apache.org/licenses/LICENSE-2.0
237 |
238 | Unless required by applicable law or agreed to in writing, software
239 | distributed under the License is distributed on an "AS IS" BASIS,
240 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
241 | See the License for the specific language governing permissions and
242 | limitations under the License.
243 | ```
244 |
--------------------------------------------------------------------------------