honghengqiang 1 年之前
父節點
當前提交
688024458d

+ 2 - 2
app/build.gradle

@@ -15,8 +15,8 @@ android {
         applicationId "com.swago.app"
         minSdkVersion 21
         targetSdkVersion 31
-        versionCode 1170
-        versionName "1.1.7.0"
+        versionCode 1171
+        versionName "1.1.7.1"
         multiDexEnabled true
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 

文件差異過大導致無法顯示
+ 538 - 604
app/mapping.txt


+ 3 - 1
app/src/main/java/com/swago/app/SwagoApp.kt

@@ -6,6 +6,7 @@ import android.net.http.HttpResponseCache
 import androidx.fragment.app.FragmentActivity
 import androidx.multidex.MultiDex
 import com.alibaba.android.arouter.launcher.ARouter
+import com.facebook.FacebookSdk
 import com.google.firebase.analytics.ktx.analytics
 import com.google.firebase.crashlytics.ktx.crashlytics
 import com.google.firebase.ktx.Firebase
@@ -47,7 +48,8 @@ class SwagoApp : Application() {
         //svga缓存
         val cacheDir = File(this.cacheDir, "http")
         HttpResponseCache.install(cacheDir, 1024 * 1024 * 128)
-
+        FacebookSdk.setClientToken(AppContext.getContext().resources.getString(R.string.facebook_app_token))
+        FacebookSdk.sdkInitialize(this)
         val config = MultiStateConfig.Builder()
             .alphaDuration(300)
             .errorIcon(R.mipmap.state_error_empty)

+ 4 - 4
baseswago/build.gradle

@@ -5,12 +5,12 @@ plugins {
 }
 
 android {
-    compileSdkVersion 30
-    buildToolsVersion "30.0.3"
+    compileSdkVersion 31
+    buildToolsVersion "31.0.0"
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 30
+        targetSdkVersion 31
         versionCode 1
         versionName "1.0"
 
@@ -100,7 +100,7 @@ dependencies {
     api 'top.zibin:Luban:1.1.8'
     api 'com.github.HuanTanSheng:EasyPhotos:3.1.3'
     //facebook`
-    api 'com.facebook.android:facebook-android-sdk:[8,9)'
+    api 'com.facebook.android:facebook-android-sdk:14.1.0'
     //google
     api 'com.google.android.gms:play-services-auth:19.0.0'
     //im

+ 0 - 3
baseswago/src/main/java/com/swago/baseswago/util/SwagoShareUtils.kt

@@ -62,9 +62,6 @@ object SwagoShareUtils {
             val shareDialog = ShareDialog(it)
             if (ShareDialog.canShow(ShareLinkContent::class.java)){
                 val linkeContent = ShareLinkContent.Builder()
-                    .setContentTitle("Share to")
-                    .setContentDescription(
-                        "Share download url")
                     .setContentUrl(Uri.parse(url))
                     .build()
                 shareDialog.show(linkeContent)

+ 1 - 0
baseswago/src/main/res/values/strings.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <string name="facebook_app_id" translatable="false">4494801737250774</string>
+    <string name="facebook_app_token" translatable="false">d15f8aacea4572a9e92e632b49ba1af7</string>
     <string name="google_id" translatable="false">513792265744-3fevv3crpsstn0ggt247hcob119c9f6n.apps.googleusercontent.com</string>
     <string name="fb_login_protocol_scheme" translatable="false">fb4494801737250774</string>
     <string name="user_agreement">User agreement</string>

+ 2 - 2
home/build.gradle

@@ -5,11 +5,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 30
+    compileSdkVersion 31
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 30
+        targetSdkVersion 31
         versionCode 1
         versionName "1.0"
 

+ 2 - 2
lib_country_picker/build.gradle

@@ -4,11 +4,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 30
+    compileSdkVersion 31
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 30
+        targetSdkVersion 31
         versionCode 1
         versionName "1.0"
 

+ 2 - 2
login/build.gradle

@@ -5,11 +5,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 30
+    compileSdkVersion 31
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 30
+        targetSdkVersion 31
         versionCode 1
         versionName "1.0"
 

+ 20 - 16
login/src/main/java/com/swago/login/FBLogin.kt

@@ -15,32 +15,36 @@ import com.swago.baseswago.util.AppContext
  */
 object FBLogin {
     private val manager = CallbackManager.Factory.create()
-    fun init(iFacebook: IFacebook){
-        LoginManager.getInstance().registerCallback(manager,object:FacebookCallback<LoginResult>{
+    fun init(iFacebook: IFacebook) {
+        LoginManager.getInstance()
+            .registerCallback(manager, object : FacebookCallback<LoginResult> {
 
-            override fun onSuccess(result: LoginResult?) {
-                result?.apply {
-                    iFacebook.getToken(accessToken.token)
+                override fun onCancel() {
+                    Toast.makeText(AppContext.getContext(), "Login Cancel", Toast.LENGTH_SHORT)
+                        .show()
                 }
-            }
 
-            override fun onCancel() {
-                Toast.makeText(AppContext.getContext(), "Login Cancel", Toast.LENGTH_SHORT).show()
-            }
+                override fun onError(error: FacebookException) {
+                    Toast.makeText(
+                        AppContext.getContext(),
+                        error.message ?: "",
+                        Toast.LENGTH_SHORT
+                    ).show()
+                }
 
-            override fun onError(error: FacebookException?) {
-                Toast.makeText(AppContext.getContext(), error?.message?:"", Toast.LENGTH_SHORT).show()
-            }
+                override fun onSuccess(result: LoginResult) {
+                    iFacebook.getToken(result.accessToken.token)
+                }
 
-        })
+            })
     }
 
 
-    fun login(activity: LoginActivity){
+    fun login(activity: LoginActivity) {
         LoginManager.getInstance().logInWithReadPermissions(activity, listOf("public_profile"))
     }
 
-    fun onActivityResult(requestCoe:Int, resultCode:Int, data: Intent){
-        manager.onActivityResult(requestCoe,resultCode, data)
+    fun onActivityResult(requestCoe: Int, resultCode: Int, data: Intent) {
+        manager.onActivityResult(requestCoe, resultCode, data)
     }
 }

+ 2 - 2
room/build.gradle

@@ -5,11 +5,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 30
+    compileSdkVersion 31
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 30
+        targetSdkVersion 31
         versionCode 1
         versionName "1.0"
 

+ 7 - 2
room/src/main/java/com/swago/room/service/AgoraForegroundService.java

@@ -61,8 +61,7 @@ public class AgoraForegroundService extends Service {
     /* Used to build and start foreground service. */
     private void startForegroundService() {
         // Create notification default intent.
-        Intent intent = new Intent();
-        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
+        PendingIntent pendingIntent;
         NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
         // Create notification builder.
         NotificationCompat.Builder builder;
@@ -77,6 +76,12 @@ public class AgoraForegroundService extends Service {
             builder = new NotificationCompat.Builder(AgoraForegroundService.this);
         }
 
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+            pendingIntent = PendingIntent.getActivity(this, 0, new Intent(), PendingIntent.FLAG_IMMUTABLE);
+        }else {
+            pendingIntent = PendingIntent.getActivity(this, 0, new Intent(), PendingIntent.FLAG_UPDATE_CURRENT);
+        }
+
         builder.setContentTitle(NAME)
                 .setContentText("Swago is running")
                 .setWhen(System.currentTimeMillis())

+ 2 - 2
tuikit/build.gradle

@@ -1,10 +1,10 @@
 apply plugin: 'com.android.library'
 android {
-    compileSdkVersion 30
+    compileSdkVersion 31
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 30
+        targetSdkVersion 31
         versionCode 1
         versionName "5.5.892"
 

+ 2 - 2
user/build.gradle

@@ -5,11 +5,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 30
+    compileSdkVersion 31
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 30
+        targetSdkVersion 31
         versionCode 1
         versionName "1.0"
 

部分文件因文件數量過多而無法顯示