From bb9500fcccf772929ab22fe6aeb1573391a1885f Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Tue, 17 Jan 2023 19:21:34 +0100 Subject: [PATCH] add an android module with working jni calls to Init(), Dispose(), and GetLibraryVersion() --- SenseGlove.uplugin | 10 + .../Private/SGAndroid/SGConnectJNI.cpp | 115 ++++++++++ .../Private/SenseGloveAndroid.cpp | 41 ++++ .../Private/SenseGloveAndroid.h | 38 ++++ .../Private/SenseGloveAndroidModule.cpp | 62 ++++++ .../Private/SenseGloveAndroidModule.h | 51 +++++ .../Public/SGAndroid/SGConnectJNI.h | 53 +++++ .../SenseGloveAndroid.Build.cs | 75 +++++++ .../SenseGloveAndroid_UPL.xml | 209 ++++++++++++++++++ .../Private/SGConnect/SGConnect.cpp | 16 ++ .../Public/SGConnect/SGConnect.h | 2 +- .../SenseGloveConnect.Build.cs | 10 + .../Private/SGConnectImpl/SGConnectImpl.cpp | 8 +- Source/ThirdParty/android/sgconnect.jar | 3 + 14 files changed, 689 insertions(+), 4 deletions(-) create mode 100644 Source/SenseGloveAndroid/Private/SGAndroid/SGConnectJNI.cpp create mode 100644 Source/SenseGloveAndroid/Private/SenseGloveAndroid.cpp create mode 100644 Source/SenseGloveAndroid/Private/SenseGloveAndroid.h create mode 100644 Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp create mode 100644 Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.h create mode 100644 Source/SenseGloveAndroid/Public/SGAndroid/SGConnectJNI.h create mode 100644 Source/SenseGloveAndroid/SenseGloveAndroid.Build.cs create mode 100644 Source/SenseGloveAndroid/SenseGloveAndroid_UPL.xml create mode 100644 Source/ThirdParty/android/sgconnect.jar diff --git a/SenseGlove.uplugin b/SenseGlove.uplugin index e6a55444..220ee76b 100644 --- a/SenseGlove.uplugin +++ b/SenseGlove.uplugin @@ -30,6 +30,16 @@ "Win64" ] }, + { + "Name": "SenseGloveAndroid", + "Type": "Runtime", + "LoadingPhase": "PreDefault", + "WhitelistPlatforms": [ + "Android", + "Linux", + "Win64" + ] + }, { "Name": "SenseGloveBuildHacks", "Type": "Runtime", diff --git a/Source/SenseGloveAndroid/Private/SGAndroid/SGConnectJNI.cpp b/Source/SenseGloveAndroid/Private/SGAndroid/SGConnectJNI.cpp new file mode 100644 index 00000000..520c311c --- /dev/null +++ b/Source/SenseGloveAndroid/Private/SGAndroid/SGConnectJNI.cpp @@ -0,0 +1,115 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2022 SenseGlove + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * @section DESCRIPTION + * + * + */ + + +#include "SGAndroid/SGConnectJNI.h" + +#if PLATFORM_ANDROID +#include "Android/AndroidApplication.h" +#include "Android/AndroidJava.h" +#endif /* PLATFORM_ANDROID */ + + static constexpr char SGCONNECT_JAVA_CLASS_NAME[] = "com.senseglove.sgconnect.SGConnect"; + +int32 FSGConnectJNI::Init() +{ + int32 Result = 0; + +#if PLATFORM_ANDROID + JNIEnv* Env = FAndroidApplication::GetJavaEnv(); + if (Env) + { + jclass Class = FAndroidApplication::FindJavaClass(SGCONNECT_JAVA_CLASS_NAME); + if (!Env->IsSameObject(Class, nullptr)) + { + jmethodID Method = Env->GetStaticMethodID(Class, "Init", "()I"); + if (Method) + { + Result = Env->CallStaticIntMethod(Class, Method); + } + } + } +#endif /* PLATFORM_ANDROID */ + + return Result; +} + +int32 FSGConnectJNI::Dispose() +{ + int32 Result = 0; + +#if PLATFORM_ANDROID + JNIEnv* Env = FAndroidApplication::GetJavaEnv(); + if (Env) + { + jclass Class = FAndroidApplication::FindJavaClass(SGCONNECT_JAVA_CLASS_NAME); + if (!Env->IsSameObject(Class, nullptr)) + { + jmethodID Method = Env->GetStaticMethodID(Class, "Dispose", "()I"); + if (Method) + { + Result = Env->CallStaticIntMethod(Class, Method); + } + } + } +#endif /* PLATFORM_ANDROID */ + + return Result; +} + +FString FSGConnectJNI::GetLibraryVersion() +{ + FString Result; + +#if PLATFORM_ANDROID + JNIEnv* Env = FAndroidApplication::GetJavaEnv(); + if (Env) + { + jclass Class = FAndroidApplication::FindJavaClass(SGCONNECT_JAVA_CLASS_NAME); + if (!Env->IsSameObject(Class, nullptr)) + { + jmethodID Method = Env->GetStaticMethodID(Class, "GetLibraryVersion", "()Ljava/lang/String;"); + if (Method) + { + jstring ResultJString = (jstring)Env->CallStaticObjectMethod(Class, Method); + const char* ResultChars = Env->GetStringUTFChars(ResultJString, nullptr); + Result = FString(UTF8_TO_TCHAR(ResultChars)); + Env->ReleaseStringUTFChars(ResultJString, ResultChars); + } + } + } +#endif /* PLATFORM_ANDROID */ + + return Result; +} \ No newline at end of file diff --git a/Source/SenseGloveAndroid/Private/SenseGloveAndroid.cpp b/Source/SenseGloveAndroid/Private/SenseGloveAndroid.cpp new file mode 100644 index 00000000..b9036e80 --- /dev/null +++ b/Source/SenseGloveAndroid/Private/SenseGloveAndroid.cpp @@ -0,0 +1,41 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2022 SenseGlove + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * @section DESCRIPTION + * + * + */ + + +#include "SenseGloveAndroid.h" + +#include "Modules/ModuleManager.h" +#include "SenseGloveAndroidModule.h" + +IMPLEMENT_MODULE(FSenseGloveAndroidModule, SenseGloveAndroid) \ No newline at end of file diff --git a/Source/SenseGloveAndroid/Private/SenseGloveAndroid.h b/Source/SenseGloveAndroid/Private/SenseGloveAndroid.h new file mode 100644 index 00000000..93863a37 --- /dev/null +++ b/Source/SenseGloveAndroid/Private/SenseGloveAndroid.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2022 SenseGlove + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * @section DESCRIPTION + * + * + */ + + +#pragma once + +#include "CoreMinimal.h" diff --git a/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp b/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp new file mode 100644 index 00000000..519f1d7c --- /dev/null +++ b/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp @@ -0,0 +1,62 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2022 SenseGlove + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * @section DESCRIPTION + * + * + */ + + +#include "SenseGloveAndroidModule.h" + +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveAndroidModule" + +void FSenseGloveAndroidModule::StartupModule() +{ + SGLOG("Starting up SenseGloveAndroid module..."); +} + +void FSenseGloveAndroidModule::PreUnloadCallback() +{ + SGLOG("Unloading SenseGloveAndroid module..."); +} + +void FSenseGloveAndroidModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveAndroid module has succeeded!"); +} + +void FSenseGloveAndroidModule::ShutdownModule() +{ + SGLOG("Shutting down SenseGloveAndroid module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.h b/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.h new file mode 100644 index 00000000..07219dc1 --- /dev/null +++ b/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2022 SenseGlove + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * @section DESCRIPTION + * + * + */ + + +#pragma once + +#include "Modules/ModuleInterface.h" + +#define LOCTEXT_NAMESPACE "SenseGloveAndroid" + +class FSenseGloveAndroidModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Source/SenseGloveAndroid/Public/SGAndroid/SGConnectJNI.h b/Source/SenseGloveAndroid/Public/SGAndroid/SGConnectJNI.h new file mode 100644 index 00000000..2b5880dd --- /dev/null +++ b/Source/SenseGloveAndroid/Public/SGAndroid/SGConnectJNI.h @@ -0,0 +1,53 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2022 SenseGlove + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * @section DESCRIPTION + * + * + */ + + +#pragma once + +#include "UObject/ObjectMacros.h" + +#include "SGConnectJNI.generated.h" + +USTRUCT() +struct SENSEGLOVEANDROID_API FSGConnectJNI +{ + GENERATED_BODY() + +public: + static int32 Init(); + + static int32 Dispose(); + + static FString GetLibraryVersion(); +}; \ No newline at end of file diff --git a/Source/SenseGloveAndroid/SenseGloveAndroid.Build.cs b/Source/SenseGloveAndroid/SenseGloveAndroid.Build.cs new file mode 100644 index 00000000..70e2d11c --- /dev/null +++ b/Source/SenseGloveAndroid/SenseGloveAndroid.Build.cs @@ -0,0 +1,75 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2022 SenseGlove + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * @section DESCRIPTION + * + * + */ + + +using System; +using System.IO; +using UnrealBuildTool; + +public class SenseGloveAndroid : ModuleRules +{ + public SenseGloveAndroid(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PublicDependencyModuleNames.AddRange( + new string[] + { + "Core", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "CoreUObject", + "Engine", + "SenseGloveLog", + } + ); + + if (Target.Platform == UnrealTargetPlatform.Android) + { + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Launch", + "Settings", + } + ); + + AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(ModuleDirectory, "SenseGloveAndroid_UPL.xml")); + } + } +} \ No newline at end of file diff --git a/Source/SenseGloveAndroid/SenseGloveAndroid_UPL.xml b/Source/SenseGloveAndroid/SenseGloveAndroid_UPL.xml new file mode 100644 index 00000000..88308ad9 --- /dev/null +++ b/Source/SenseGloveAndroid/SenseGloveAndroid_UPL.xml @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + kapt.incremental.apt=true + + + + + + + + -dontwarn com.senseglove.** + -keep class com.senseglove.** { *; } + -keep interface com.senseglove.** { *; } + -keep public class com.senseglove.sgconnect.** { public protected *; } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ext { + android { + buildTypes { + release { + minifyEnabled false + } + } + } + } + + repositories { + mavenCentral() + jcenter() + } + + dependencies { + implementation files('libs/sgconnect.jar') + } + + + + + + + allprojects { + def mappings = [ + ] + beforeEvaluate { + } + } + + + + + + + + + + + + + + + + + + import com.senseglove.*; + + + \ No newline at end of file diff --git a/Source/SenseGloveConnect/Private/SGConnect/SGConnect.cpp b/Source/SenseGloveConnect/Private/SGConnect/SGConnect.cpp index f09b0761..27628450 100644 --- a/Source/SenseGloveConnect/Private/SGConnect/SGConnect.cpp +++ b/Source/SenseGloveConnect/Private/SGConnect/SGConnect.cpp @@ -35,22 +35,38 @@ #include "SGConnect/SGConnect.h" +#if PLATFORM_ANDROID +#include "SGAndroid/SGConnectJNI.h" +#endif /* PLATFORM_ANDROID */ + #include "SGConnectImpl/SGExportedFunctions.h" #include "SGInterop/SGIC_FString.h" int32 FSGConnect::Init() { +#if ! PLATFORM_ANDROID return SGConnect_Init(); +#else + return FSGConnectJNI::Init(); +#endif /* ! PLATFORM_ANDROID */ } int32 FSGConnect::Dispose() { +#if ! PLATFORM_ANDROID return SGConnect_Dispose(); +#else + return FSGConnectJNI::Dispose(); +#endif /* ! PLATFORM_ANDROID */ } FString FSGConnect::GetLibraryVersion() { +#if ! PLATFORM_ANDROID FSGIC_FString Container; SGConnect_GetLibraryVersion(&Container); return Container.String; +#else + return FSGConnectJNI::GetLibraryVersion(); +#endif /* ! PLATFORM_ANDROID */ } \ No newline at end of file diff --git a/Source/SenseGloveConnect/Public/SGConnect/SGConnect.h b/Source/SenseGloveConnect/Public/SGConnect/SGConnect.h index 1b4e9a9c..122fdc9d 100644 --- a/Source/SenseGloveConnect/Public/SGConnect/SGConnect.h +++ b/Source/SenseGloveConnect/Public/SGConnect/SGConnect.h @@ -52,7 +52,7 @@ public: * -3 : An Unexpected error occured. Please try again. * -2 : Device Scanning is already running within a different program. * -1 : Device Scanning already being initialized (function called twice in short succession). - * 0 : Device Scanning is already running in within this program. + * 0 : Device Scanning is already running within this program. * 1 : Successfully started up DeviceScanning from the current program. */ static int32 Init(); diff --git a/Source/SenseGloveConnect/SenseGloveConnect.Build.cs b/Source/SenseGloveConnect/SenseGloveConnect.Build.cs index 35b4632a..63b7ea9a 100644 --- a/Source/SenseGloveConnect/SenseGloveConnect.Build.cs +++ b/Source/SenseGloveConnect/SenseGloveConnect.Build.cs @@ -59,5 +59,15 @@ public class SenseGloveConnect : ModuleRules "SenseGloveTypes", } ); + + if (Target.Platform == UnrealTargetPlatform.Android) + { + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveAndroid", + } + ); + } } } diff --git a/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGConnectImpl.cpp b/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGConnectImpl.cpp index 98461151..1b339273 100644 --- a/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGConnectImpl.cpp +++ b/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGConnectImpl.cpp @@ -34,7 +34,9 @@ #include "SGConnectImpl/SGConnectImpl.h" + #include + #include "SGBuildHacks/SGInclude_Connect_SGConnect.h" int32 FSGConnectImpl::Init() @@ -49,7 +51,7 @@ int32 FSGConnectImpl::Dispose() FString FSGConnectImpl::GetLibraryVersion() { - std::string version; - SGConnect::GetLibraryVersion(&version); - return UTF8_TO_TCHAR(version.c_str()); + std::string Version; + SGConnect::GetLibraryVersion(&Version); + return UTF8_TO_TCHAR(Version.c_str()); } \ No newline at end of file diff --git a/Source/ThirdParty/android/sgconnect.jar b/Source/ThirdParty/android/sgconnect.jar new file mode 100644 index 00000000..02a63c52 --- /dev/null +++ b/Source/ThirdParty/android/sgconnect.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e3737fd85ff456aa80810e1a5e830bf38138bf9465240c6cfb87e0e5f578408 +size 40348