diff --git a/Assets/AndroidUpdate.cs b/Assets/AndroidUpdate.cs index 94c3c9bb..87f337a5 100644 --- a/Assets/AndroidUpdate.cs +++ b/Assets/AndroidUpdate.cs @@ -124,7 +124,7 @@ public class AndroidUpdate : PFUIPanel var activity = jc.GetStatic("currentActivity"); //Debug.Log("打开apk"+ "file://" + path); activity.Call("OpenApk", path); - Application.Quit(); + //Application.Quit(); #endif } } diff --git a/Assets/Plugins/Android/AndroidManifest.xml b/Assets/Plugins/Android/AndroidManifest.xml index b44cf951..f4ec1f05 100644 --- a/Assets/Plugins/Android/AndroidManifest.xml +++ b/Assets/Plugins/Android/AndroidManifest.xml @@ -20,10 +20,9 @@ - - + diff --git a/Assets/Plugins/Android/ImageSelector-release.aar b/Assets/Plugins/Android/ImageSelector-release.aar deleted file mode 100644 index 2c133d0d..00000000 Binary files a/Assets/Plugins/Android/ImageSelector-release.aar and /dev/null differ diff --git a/Assets/Plugins/Android/PowerFunAndroidPlugin-release.aar b/Assets/Plugins/Android/PowerFunAndroidPlugin-release.aar new file mode 100644 index 00000000..272fb071 Binary files /dev/null and b/Assets/Plugins/Android/PowerFunAndroidPlugin-release.aar differ diff --git a/Assets/Plugins/Android/ImageSelector-release.aar.meta b/Assets/Plugins/Android/PowerFunAndroidPlugin-release.aar.meta similarity index 93% rename from Assets/Plugins/Android/ImageSelector-release.aar.meta rename to Assets/Plugins/Android/PowerFunAndroidPlugin-release.aar.meta index 7c6cd9ba..f72a610b 100644 --- a/Assets/Plugins/Android/ImageSelector-release.aar.meta +++ b/Assets/Plugins/Android/PowerFunAndroidPlugin-release.aar.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9722f205596f2fd499991ea299119cc8 +guid: 45c099ff5c5f8e5488a5aafe1b3e4859 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Plugins/Android/baseProjectTemplate.gradle b/Assets/Plugins/Android/baseProjectTemplate.gradle index 942b13b8..88443a96 100644 --- a/Assets/Plugins/Android/baseProjectTemplate.gradle +++ b/Assets/Plugins/Android/baseProjectTemplate.gradle @@ -20,6 +20,19 @@ allprojects { repositories {**ARTIFACTORYREPOSITORY** google() jcenter() + maven { + url 'https://api.mapbox.com/downloads/v2/releases/maven' + authentication { + basic(BasicAuthentication) + } + credentials { + // Do not change the username below. + // This should always be `mapbox` (not your username). + username = 'mapbox' + // Use the secret token you stored in gradle.properties as the password + password = "sk.eyJ1IjoidGFsZXNmYW4iLCJhIjoiY2t3ZDg4bmV4NDFubjJucm9nMDZsNnFyZyJ9._ukjbjSdzXFsF-4rZ1sPeA" + } + } flatDir { dirs "${project(':unityLibrary').projectDir}/libs" } diff --git a/Assets/Plugins/Android/mainTemplate.gradle b/Assets/Plugins/Android/mainTemplate.gradle index 3f2ba978..4a873532 100644 --- a/Assets/Plugins/Android/mainTemplate.gradle +++ b/Assets/Plugins/Android/mainTemplate.gradle @@ -4,20 +4,13 @@ apply plugin: 'com.android.library' **APPLY_PLUGINS** dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation(name: 'animated-vector-drawable-25.1.0', ext:'aar') - implementation(name: 'appcompat-v7-25.1.0', ext:'aar') - implementation(name: 'com.mapbox.android.unity-debug', ext:'aar') - implementation(name: 'libcore-release', ext:'aar') - implementation(name: 'libtelemetry-full-release', ext:'aar') - implementation(name: 'support-compat-25.1.0', ext:'aar') - implementation(name: 'support-core-ui-25.1.0', ext:'aar') - implementation(name: 'support-core-utils-25.1.0', ext:'aar') - implementation(name: 'support-media-compat-25.1.0', ext:'aar') - implementation(name: 'support-v4-25.1.0', ext:'aar') - implementation(name: 'support-vector-drawable-25.1.0', ext:'aar') implementation(name: 'UnityCallWechatShare-release', ext:'aar') - implementation files ('libs/ImageSelector-release.aar') + implementation files ("libs/unity-classes.jar") + implementation files ("libs/unityandroidbluetoothlelib.jar") + implementation files ('libs/PowerFunAndroidPlugin-release.aar') + implementation ('com.mapbox.maps:android:10.2.0-beta.1'){ + exclude group: 'group_name', module: 'module_name' + } } android { diff --git a/Assets/Scripts/Devices/Ant/FitDevice.cs b/Assets/Scripts/Devices/Ant/FitDevice.cs index 84f94b5e..e4777f77 100644 --- a/Assets/Scripts/Devices/Ant/FitDevice.cs +++ b/Assets/Scripts/Devices/Ant/FitDevice.cs @@ -126,6 +126,7 @@ namespace Assets.Scripts.Devices.Ant if (response.responseID == (byte)ANT_Managed_Library.ANT_ReferenceLibrary.ANTMessageID.BROADCAST_DATA_0x4E) { var pageNumber = response.messageContents[1]; + switch (pageNumber) { case 16: //Page 16 - General Page @@ -223,6 +224,7 @@ namespace Assets.Scripts.Devices.Ant private void HandleTrainerDataPage(byte[] dataPayload) { + Debug.Log("ant+数据" + string.Join(",", dataPayload)); //if (response.messageContents.Length < 11) break; //double value = 0; //for (int i = 0; i < response.messageContents.Length; i++) diff --git a/Assets/Scripts/Mobile/LoginControllerMobile.cs b/Assets/Scripts/Mobile/LoginControllerMobile.cs index 70477fe7..5908b759 100644 --- a/Assets/Scripts/Mobile/LoginControllerMobile.cs +++ b/Assets/Scripts/Mobile/LoginControllerMobile.cs @@ -29,6 +29,7 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer-third/otherContainer/Wechat").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (b) => goWxLogin()); + } diff --git a/Assets/Scripts/UIManager.cs b/Assets/Scripts/UIManager.cs index 94893e34..49d72cf2 100644 --- a/Assets/Scripts/UIManager.cs +++ b/Assets/Scripts/UIManager.cs @@ -837,23 +837,26 @@ public class UIManager : MonoBehaviour static GameObject earthPanel = null; public static void ShowEarthPanel(double lat = 0, double lon = 0) { - if (UIManager.Instance.MainPanel != null) - { - UIManager.Instance.MainPanel.gameObject.SetActive(false); - } - if (earthPanel == null) - { -#if (UNITY_ANDROID || UNITY_IOS) - var obj = Resources.Load("UI/Prefab/Panel/Mobile/EarthPanel"); -#else - var obj = Resources.Load("UI/Prefab/Panel/EarthPanel"); + //if (UIManager.Instance.MainPanel != null) + //{ + // UIManager.Instance.MainPanel.gameObject.SetActive(false); + //} +#if UNITY_ANDROID + Utils.CallAndroidMethod("OpenGlobe"); #endif - //var root = UIManager.Instance.MainPanel.transform.parent.parent; - earthPanel = (GameObject)Instantiate(obj, UIManager.Instance.Root.transform); - } - stack.Push(null); - App.pageName = "earth"; - earthPanel.GetComponent().Show(lat, lon); + // if (earthPanel == null) + // { + //#if (UNITY_ANDROID || UNITY_IOS) + // var obj = Resources.Load("UI/Prefab/Panel/Mobile/EarthPanel"); + //#else + // var obj = Resources.Load("UI/Prefab/Panel/EarthPanel"); + //#endif + // //var root = UIManager.Instance.MainPanel.transform.parent.parent; + // earthPanel = (GameObject)Instantiate(obj, UIManager.Instance.Root.transform); + // } + // stack.Push(null); + // App.pageName = "earth"; + // earthPanel.GetComponent().Show(lat, lon); } static Texture2D cursor; diff --git a/Assets/Scripts/Utils/Utils.cs b/Assets/Scripts/Utils/Utils.cs index 2ffb8dae..84b95091 100644 --- a/Assets/Scripts/Utils/Utils.cs +++ b/Assets/Scripts/Utils/Utils.cs @@ -225,15 +225,20 @@ namespace Assets.Scripts var a = currentVersion.Split('.'); var b = realVersion.Split('.'); if (a.Length != 3 || b.Length != 3) return false; + //2.1.0 2.0.8 for (int i = 0; i < 3; i++) { var f1 = int.TryParse(a[i], out int ai); var f2 = int.TryParse(b[i], out int bi); if (!f1 || !f2) return false; - if (ai < bi) + if (ai < bi) { return true; } + else if (ai > bi) + { + return false; + } } return false; } diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 4706883c..9b996cb4 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -38,6 +38,7 @@ GraphicsSettings: - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 258e8eb2..8fb251b3 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -133,7 +133,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 2.0.8 + bundleVersion: 2.1.0 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -180,7 +180,7 @@ PlayerSettings: Android: com.ZhiXingPai.PowerFunUnity buildNumber: iPhone: 2.0.7.0 - AndroidBundleVersionCode: 12 + AndroidBundleVersionCode: 14 AndroidMinSdkVersion: 24 AndroidTargetSdkVersion: 30 AndroidPreferredInstallLocation: 1 @@ -256,7 +256,7 @@ PlayerSettings: clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea templatePackageId: com.unity.template.3d@4.2.8 templateDefaultScene: Assets/Scenes/SampleScene.unity - AndroidTargetArchitectures: 3 + AndroidTargetArchitectures: 1 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} AndroidKeystoreName: '{inproject}: Assets/Plugins/Android/powerfun.keystore' @@ -868,7 +868,7 @@ PlayerSettings: platformArchitecture: iPhone: 1 scriptingBackend: - Android: 1 + Android: 0 Standalone: 0 il2cppCompilerConfiguration: Standalone: 0