├── README.md
├── ShareSDK-flutter-1.3.16.apk
└── sharesdk_plugin
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── android
├── .gitignore
├── .project
├── build.gradle
├── gradle.properties
├── libs
│ ├── MobCoreULT-2022.0617.1428.aar
│ ├── MobGUIULT-2022.0617.1428.jar
│ ├── MobSupportV1-2022.0617.1428.jar
│ ├── OneKeyShare-3.10.17.aar
│ └── ShareSDK-3.10.17.aar
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── mob
│ └── flutter
│ └── sharesdk
│ ├── SharesdkPlugin.java
│ └── impl
│ ├── Const.java
│ ├── FlutterLoopSharePrepare.java
│ ├── Log.java
│ ├── ObjectUtils.java
│ ├── StrUtils.java
│ ├── ThreadManager.java
│ └── Utils.java
├── example
├── .flutter-plugins-dependencies
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── .gitignore
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── MobSDK.gradle
│ ├── app
│ │ ├── build.gradle
│ │ ├── demokey.keystore
│ │ ├── proguard-rules.pro
│ │ ├── release
│ │ │ └── output.json
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── mob
│ │ │ │ │ └── sharesdk_plugin_example
│ │ │ │ │ ├── App.java
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.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
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── demokey.keystore
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── proguard-project.txt
│ └── settings.gradle
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ ├── Flutter.podspec
│ │ ├── Release.xcconfig
│ │ └── flutter_export_environment.sh
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── Runner-Bridging-Header.h
│ │ ├── Runner.entitlements
│ │ ├── cat.mp4
│ │ └── tx@2x.png
├── lib
│ ├── home.dart
│ └── main.dart
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── SharesdkPlugin.h
│ └── SharesdkPlugin.m
└── sharesdk_plugin.podspec
├── lib
├── sharesdk_defines.dart
├── sharesdk_interface.dart
├── sharesdk_map.dart
├── sharesdk_plugin.dart
└── sharesdk_register.dart
├── pubspec.yaml
└── test
└── sharesdk_plugin_test.dart
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # ShareSDK-For-Flutter
4 |
5 | ### 注意:
6 | #### 请使用最新插件sharesdk_plugin([https://pub.dartlang.org/packages/sharesdk_plugin](https://pub.dartlang.org/packages/sharesdk_plugin))
7 | >
8 |
--------------------------------------------------------------------------------
/ShareSDK-flutter-1.3.16.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/ShareSDK-flutter-1.3.16.apk
--------------------------------------------------------------------------------
/sharesdk_plugin/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 | pubspec.lock
7 |
8 | build/
9 |
10 | # Gradle directory
11 | .gradle/
12 |
13 | # Java class files
14 | *.class
15 |
16 | # IntelliJ
17 | *.iml
18 | .idea/workspace.xml
19 | .idea/tasks.xml
20 | .idea/gradle.xml
21 | .idea/assetWizardSettings.xml
22 | .idea/dictionaries
23 | .idea/libraries
24 | .idea/caches
25 | .idea
26 |
27 | # generated files
28 | bin/
29 | gen/
30 | out/
31 |
--------------------------------------------------------------------------------
/sharesdk_plugin/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 20e59316b8b8474554b38493b8ca888794b0234a
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/sharesdk_plugin/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * 1.Describe initial release.
4 |
5 | ## 1.0.1
6 |
7 | * 1.Add all ShareSDK API support.
8 |
9 | ## 1.1.0
10 |
11 | * 1.iOS:Support all API & release for swift & bug fix.
12 | * 2.Android:Remove useless interface & bug fix.
13 |
14 | ## 1.1.1
15 |
16 | * 1.Update androidPackage to com.yoozoo.sharesdk
17 |
18 | ## 1.1.1
19 |
20 | * 1.Update android support
21 |
22 | ## 1.1.2
23 |
24 | * 1.Android bug fix.
25 |
26 | ## 1.1.3
27 |
28 | * 1.Android bug fix.
29 |
30 | ## 1.1.4
31 |
32 | * 1.Android add wechat file share
33 |
34 | ## 1.1.5
35 | * 1.Android adapt to flutter sdk 1.9+
36 |
37 | ## 1.1.6
38 | * 1.Android Add to Douyin sharing function
39 | * 2.Android Add to share video url for general interface
40 |
41 | ## 1.1.7
42 | * 1.iOS Add " Sign in with Apple"
43 |
44 | ## 1.2.0
45 | * 1.Android Add to policy Privacy policy
46 | * 2.IOS Add to Privacy policy
47 |
48 | ## 1.2.1
49 | * 1.Android fix bug that release in Flutter_v1.12.13+hotfix.8 is ok
50 | * 2.iOS fix bug
51 |
52 | ## 1.2.4
53 |
54 | * 1.iOS add snapchat
55 |
56 | ## 1.2.5
57 |
58 | * 1.iOS add KuaiShou/WatermelonVideo
59 | * 2.iOS fix bug
60 |
61 | ## 1.2.6
62 | * 1.iOS fix bug
63 |
64 | ## 1.2.7
65 | * 1.iOS fix bug
66 |
67 | ## 1.2.8
68 | * 1.iOS fix bug
69 |
70 | ## 1.2.9
71 | * 1.iOS fix bug
72 | * 2.iOS add TikTok
73 | * 3.iOS add ShareWithActivity
74 |
75 | ## 1.3.0
76 | * 1.iOS fix bug
77 |
78 | ## 1.3.1
79 | * 1.iOS fix bug
80 |
81 | ## 1.3.2
82 | * 1.android fix bug
83 | * 2.android add douyin
84 |
85 | ## 1.3.3
86 | * 1.upgrade Android embedding from v1 to v2
87 |
88 | ## 1.3.4
89 | * 1.Code formatting optimization
90 |
91 | ## 1.3.5
92 | * 1.standardization
93 |
94 | ## 1.3.6
95 | * 1.优化性能
96 |
97 | ## 1.3.7
98 | * 1.android fix bug
99 |
100 | ## 1.3.8
101 | * 1.android fix bug
102 | * 2.ios fix bug
103 |
104 | ## 1.3.9
105 | * 1.android fix bug
106 |
107 | ## 1.3.10
108 | * 1.android fix bug
109 |
110 | ## 1.3.11
111 | * 1.android fix bug
112 |
113 | ## 1.3.12
114 | * 1.Qzone add config DISABLE_NEW_TASK
115 |
116 | ## 1.3.14
117 | * 1. Update Kakao SDK
118 |
119 | ## 1.3.15
120 | * 1. support douyin IM
121 |
122 | ## 1.3.16
123 | * 1. support nameSpace
--------------------------------------------------------------------------------
/sharesdk_plugin/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright © 2015-2030, MobTech.
--------------------------------------------------------------------------------
/sharesdk_plugin/README.md:
--------------------------------------------------------------------------------
1 |
2 | # ShareSDK For Flutter
3 | ### 这是一个基于ShareSDK功能的扩展的Flutter插件。使用此插件能够帮助您在使用Flutter开发应用时,快速地实现社会化功能,例如第三方授权登录,获取用户信息以及社交平台的分享等功能。
4 |
5 | **原生SDK支持的最低版本:**
6 |
7 | - [Android](https://github.com/MobClub/ShareSDK-for-Android) - V3.4.0
8 | - [iOS](https://github.com/MobClub/ShareSDK-for-iOS) - V4.3.2
9 |
10 | **简介:** http://www.mob.com/product/sharesdk
11 |
12 | **插件主页:** https://pub.dartlang.org/packages/sharesdk_plugin
13 |
14 | **官网文档:** http://wiki.mob.com/快速集成/
15 |
16 | **Demo例子:** https://github.com/MobClub/ShareSDK-For-Flutter/sharesdk_plugin
17 |
18 | ## 开始集成
19 |
20 | 参考[官方插件集成文档](https://pub.dartlang.org/packages/sharesdk#-installing-tab-)
21 |
22 | 自定义需要导入的分享平台:
23 | ### iOS
24 | 你需要重新编辑 *sharesdk.podspec* 文件设置 dependency,具体支持的平台可以参阅`pod search mob_sharesdk` 或者参考[官网文档](https://www.mob.com/wiki/detailed?wiki=4&id=14)
25 |
26 | ```
27 | #
28 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
29 | #
30 | Pod::Spec.new do |s|
31 | s.name = 'sharesdk'
32 | s.version = '0.0.1'
33 | s.summary = 'flutter plugin for sharesdk.'
34 | s.description = 'ShareSDK is the most comprehensive Social SDK in the world,which share easily with 40+ platforms.'
35 | s.homepage = 'http://www.mob.com'
36 | s.license = { :file => '../LICENSE' }
37 | s.author = { 'Mob' => 'mobproducts@163.com' }
38 | s.source = { :path => '.' }
39 | s.source_files = 'Classes/**/*'
40 | s.public_header_files = 'Classes/**/*.h'
41 | s.dependency 'Flutter'
42 | s.dependency 'mob_sharesdk'
43 | # s.dependency 'mob_sharesdk/ShareSDKUI'
44 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/QQ'
45 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/SinaWeibo'
46 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/WeChat'
47 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/Facebook'
48 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/Twitter'
49 |
50 | s.ios.deployment_target = '8.0'
51 | end
52 | ```
53 |
54 | 然后你需要根据[官方文档](https://www.mob.com/wiki/detailed?wiki=484&id=14)在Xcode工程的info.plist里面配置Appkey 和 AppSecret, 以及各平台的白名单和urlScheme。
55 |
56 | ### Android
57 | 你需要重新编辑build.gradle, mobsdk.gradle文件来选择你需要使用的平台,具体支持的平台可以参阅[官网技术文档](https://www.mob.com/wiki/detailed?wiki=485&id=14)
58 |
59 | #### build.gradle
60 |
61 | ```
62 | buildscript {
63 | repositories {
64 | google()
65 | jcenter()
66 | maven {
67 | url "http://mvn.mob.com/android"
68 | }
69 | }
70 |
71 | dependencies {
72 | classpath 'com.android.tools.build:gradle:3.1.2'
73 | classpath 'com.mob.sdk:MobSDK:+'
74 | }
75 | }
76 | ```
77 |
78 | #### mobsdk.gradle
79 |
80 | ```
81 | MobSDK {
82 | appKey "moba6b6c6d6"
83 | appSecret "b89d2427a3bc7ad1aea1e1e8c1d36bf3"
84 |
85 | ShareSDK {
86 |
87 | // platform configuration information
88 | devInfo {
89 | QQ {
90 | id 7
91 | sortId 7
92 | appId "100371282"
93 | appKey "aed9b0303e3ed1e27bae87c33761161d"
94 | shareByAppClient true
95 | bypassApproval false
96 | enable true
97 | }
98 |
99 | SinaWeibo {
100 | id 1
101 | sortId 1
102 | appKey "568898243"
103 | appSecret "38a4f8204cc784f81f9f0daaf31e02e3"
104 | callbackUri "http://www.sharesdk.cn"
105 | shareByAppClient true
106 | enable true
107 | }
108 |
109 | Wechat {
110 | id 4
111 | sortId 4
112 | appId "wx4868b35061f87885"
113 | appSecret "64020361b8ec4c99936c0e3999a9f249"
114 | userName "gh_afb25ac019c9"
115 | path "pages/index/index.html?id=1"
116 | withShareTicket true
117 | miniprogramType 0
118 | bypassApproval false
119 | enable true
120 | }
121 |
122 | Facebook {
123 | id 8
124 | sortId 8
125 | appKey "1412473428822331"
126 | appSecret "a42f4f3f867dc947b9ed6020c2e93558"
127 | callbackUri "https://mob.com"
128 | shareByAppClient true
129 | enable true
130 | }
131 |
132 | Twitter {
133 | id 9
134 | sortId 9
135 | appKey "viOnkeLpHBKs6KXV7MPpeGyzE"
136 | appSecret "NJEglQUy2rqZ9Io9FcAU9p17omFqbORknUpRrCDOK46aAbIiey"
137 | callbackUri "http://mob.com"
138 | shareByAppClient true
139 | enable true
140 | }
141 | }
142 | }
143 | }
144 | ```
145 |
146 | ## 接口方法说明
147 | 接口详情:[API接口调用](https://www.mob.com/wiki/detailed?wiki=31&id=14)
148 |
149 | ## 技术支持
150 | 如有问题请联系技术支持:
151 |
152 | ```
153 | 服务电话: 400-685-2216
154 | QQ: 4006852216
155 | 节假日值班电话:
156 | iOS:185-1664-1951
157 | Android: 185-1664-1950
158 | 电子邮箱: support@mob.com
159 | 市场合作: 021-54623100
160 | ```
--------------------------------------------------------------------------------
/sharesdk_plugin/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/sharesdk_plugin/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android_
4 | Project android_ created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/sharesdk_plugin/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'com.mob.flutter.sharesdk'
2 | version '1.0-SNAPSHOT'
3 | apply plugin: 'com.android.library'
4 |
5 | buildscript {
6 | repositories {
7 | google()
8 | jcenter()
9 | }
10 |
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:3.6.0'
13 | }
14 | configurations.all {
15 | resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
16 | }
17 | }
18 |
19 | rootProject.allprojects {
20 | repositories {
21 | google()
22 | jcenter()
23 | }
24 | }
25 |
26 |
27 |
28 | //android {
29 | // compileSdkVersion 30
30 | //
31 | // defaultConfig {
32 | // minSdkVersion 16
33 | // }
34 | // lintOptions {
35 | // disable 'InvalidPackage'
36 | // }
37 | //}
38 |
39 | dependencies {
40 | compileOnly fileTree(include: ['*.jar','*.aar'], dir: 'libs',excludes: [])
41 | // implementation 'com.android.support.constraint:constraint-layout:1.1.3'
42 | }
43 |
44 | def localProperties = new Properties()
45 | def localPropertiesFile = rootProject.file('local.properties')
46 | if (localPropertiesFile.exists()) {
47 | localPropertiesFile.withReader('UTF-8') { reader ->
48 | localProperties.load(reader)
49 | }
50 | }
51 |
52 | def flutterRoot = localProperties.getProperty('flutter.sdk')
53 | if (flutterRoot == null) {
54 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
55 | }
56 |
57 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
58 | if (flutterVersionCode == null) {
59 | flutterVersionCode = '1'
60 | }
61 |
62 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
63 | if (flutterVersionName == null) {
64 | flutterVersionName = '1.0'
65 | }
66 |
67 | android {
68 | compileSdkVersion 31
69 | buildToolsVersion '30.0.0'
70 | if (project.android.hasProperty("namespace")) {
71 | namespace 'com.mob.flutter.sharesdk'
72 | }
73 |
74 | lintOptions {
75 | disable 'InvalidPackage'
76 | }
77 |
78 | defaultConfig {
79 | minSdkVersion 16
80 | targetSdkVersion 31
81 | versionCode flutterVersionCode.toInteger()
82 | versionName flutterVersionName
83 | }
84 |
85 | buildTypes {
86 | release {
87 | // Signing with the debug keys for now, so `flutter run --release` works.
88 | signingConfig signingConfigs.debug
89 | }
90 | }
91 | }
92 |
93 |
94 |
--------------------------------------------------------------------------------
/sharesdk_plugin/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/sharesdk_plugin/android/libs/MobCoreULT-2022.0617.1428.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/MobCoreULT-2022.0617.1428.aar
--------------------------------------------------------------------------------
/sharesdk_plugin/android/libs/MobGUIULT-2022.0617.1428.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/MobGUIULT-2022.0617.1428.jar
--------------------------------------------------------------------------------
/sharesdk_plugin/android/libs/MobSupportV1-2022.0617.1428.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/MobSupportV1-2022.0617.1428.jar
--------------------------------------------------------------------------------
/sharesdk_plugin/android/libs/OneKeyShare-3.10.17.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/OneKeyShare-3.10.17.aar
--------------------------------------------------------------------------------
/sharesdk_plugin/android/libs/ShareSDK-3.10.17.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/ShareSDK-3.10.17.aar
--------------------------------------------------------------------------------
/sharesdk_plugin/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'sharesdk'
2 | include ':sharesdk'
3 |
4 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
5 |
6 | def plugins = new Properties()
7 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
8 | if (pluginsFile.exists()) {
9 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
10 | }
11 |
12 | plugins.each { name, path ->
13 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
14 | include ":$name"
15 | project(":$name").projectDir = pluginDirectory
16 | }
--------------------------------------------------------------------------------
/sharesdk_plugin/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/Const.java:
--------------------------------------------------------------------------------
1 | package com.mob.flutter.sharesdk.impl;
2 |
3 | public final class Const {
4 | public static final class Key {
5 | public static final String IMAGES = "images";
6 | public static final String IMAGE_URL_ANDROID = "imageUrl_android";
7 | public static final String IMAGE_PATH_ANDROID = "imagePath_android";
8 | public static final String TITLE = "title";
9 | public static final String TITLE_URL_ANDROID = "titleUrl_android";
10 | public static final String TEXT = "text";
11 | public static final String URL = "url";
12 | public static final String VIDEO = "video";
13 | public static final String AUDIO_FLASH_URL = "audio_flash_url";
14 | public static final String FILE_DATA = "file_data";
15 | public static final String WXMP_USER_NAME = "wxmp_user_name";
16 | public static final String WXMP_TYPE = "wxmp_type";
17 | public static final String WXMP_WITH_TICKET = "wxmp_with_ticket";
18 | public static final String WXMP_PATH = "wxmp_path";
19 | public static final String VIDEO_URL_ANDROID = "videoUrl_android";
20 | public static final String TYPE = "type";
21 | public static final String SINA_CARD_SUMMARY = "sina_cardSummary";
22 | public static final String IMAGE_URL = "image_url";
23 | public static final String SINA_DISPLAY_NAME = "sina_displayname";
24 | public static final String IMAGE_X = "image_x";
25 | public static final String IMAGE_Y = "image_y";
26 | public static final String SITE = "site";
27 | public static final String SITE_URL = "siteUrl";
28 | public static final String FILE_PATH = "filePath";
29 | public static final String IMAGE_DATA = "imageData";
30 | public static final String VIDEO_ARRAY = "videoArray";
31 | public static final String HASHTAGS = "HASHTAGS"; //话题
32 | public static final String HASHTAG = "facebook_hashtag";
33 | public static final String QUOTE = "facebook_quote";
34 | public static final String DOUYIN_MIX_FILE = "douyin_mix_file";
35 | public static final String DOUYIN_SHARE_ACTION = "kSSDKDouYinShareAction";
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/FlutterLoopSharePrepare.java:
--------------------------------------------------------------------------------
1 | package com.mob.flutter.sharesdk.impl;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 |
6 | import com.mob.tools.utils.Hashon;
7 |
8 | import java.util.HashMap;
9 |
10 | import cn.sharesdk.framework.ShareSDK;
11 | import cn.sharesdk.framework.loopshare.LoopShareResultListener;
12 |
13 | import static com.mob.flutter.sharesdk.SharesdkPlugin.IS_ALIVE;
14 |
15 | public class FlutterLoopSharePrepare {
16 |
17 | public static final String LOOPSHARE_NEWS = "loopsharenews";
18 |
19 | public void prepare(final Context context, final Class> targetActivity) {
20 | /**
21 | * loopshare init and set Listener
22 | * **/
23 | ShareSDK.prepareLoopShare(new LoopShareResultListener() {
24 | @Override
25 | public void onResult(Object var1) {
26 | String test = new Hashon().fromHashMap((HashMap) var1);
27 | Log.e("WWW", "LoopShareResultListener onResult " + test);
28 |
29 | Log.e("WWW", "SP的数据=====》 " + ShareSDK.getCustomDataFromLoopShare());
30 |
31 | Intent intent = new Intent();
32 | intent.setClass(context, targetActivity);
33 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
34 | context.startActivity(intent);
35 | IS_ALIVE = 456;
36 | }
37 |
38 | @Override
39 | public void onError(Throwable t) {
40 | Log.e("WWW", "LoopShareResultListener onError " + t);
41 | }
42 | });
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/Log.java:
--------------------------------------------------------------------------------
1 | package com.mob.flutter.sharesdk.impl;
2 |
3 | import android.text.TextUtils;
4 |
5 | import com.mob.tools.MobLog;
6 |
7 | public class Log {
8 | public static final String TAG = "SharesdkPlugin";
9 |
10 | public static void e(String tag, String msg) {
11 | if (TextUtils.isEmpty(tag)) {
12 | tag = TAG;
13 | }
14 | MobLog.getInstance().e("TAG:" + tag + "MSG:" + msg);
15 | }
16 |
17 | public static void d(String tag, String msg) {
18 | if (TextUtils.isEmpty(tag)) {
19 | tag = TAG;
20 | }
21 | MobLog.getInstance().d("TAG:" + tag + "MSG:" + msg);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/ObjectUtils.java:
--------------------------------------------------------------------------------
1 | package com.mob.flutter.sharesdk.impl;
2 |
3 | import java.util.Collection;
4 | import java.util.Map;
5 |
6 | public class ObjectUtils {
7 | public static final boolean isEmpty(Collection collection) {
8 | return null == collection || collection.isEmpty();
9 | }
10 |
11 | public static final boolean isEmpty(Map map) {
12 | return null == map || map.isEmpty();
13 | }
14 |
15 | public static final boolean isEmpty(Object[] objects) {
16 | return null == objects || objects.length == 0;
17 | }
18 |
19 | public static final boolean isNull(Object o) {
20 | return null == o;
21 | }
22 |
23 | public static final boolean notNull(Object o) {
24 | return null != o;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/StrUtils.java:
--------------------------------------------------------------------------------
1 | package com.mob.flutter.sharesdk.impl;
2 |
3 | import java.util.ArrayList;
4 | import java.util.HashMap;
5 | import java.util.Map;
6 |
7 | public class StrUtils {
8 |
9 | public static String format(String sepStr, HashMap map) {
10 | StringBuffer sb = new StringBuffer();
11 | sb.append("{\n");
12 | String mySepStr = sepStr + "\t";
13 | int i = 0;
14 | for (Map.Entry entry : map.entrySet()) {
15 | if (i > 0) {
16 | sb.append(",\n");
17 | }
18 | sb.append(mySepStr).append('\"').append(entry.getKey()).append("\":");
19 | Object value = entry.getValue();
20 | if (value instanceof HashMap, ?>) {
21 | sb.append(format(mySepStr, (HashMap)value));
22 | } else if (value instanceof ArrayList>) {
23 | sb.append(format(mySepStr, (ArrayList