-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from SourcePointUSA/DIA-2586-clear-all-data
[DIA-2586] Іmplementation of ClearAllData()
- Loading branch information
Showing
7 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,4 +94,9 @@ void _customConsentGDPRWithVendors() | |
{ | ||
//TO-DO | ||
} | ||
|
||
void _dispose() | ||
{ | ||
[swiftBridge dispose]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Assets/ConsentManagementProvider/Scripts/wrapper/Android/SpAndroidNativeUtils.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using UnityEngine; | ||
using ConsentManagementProviderLib.Json; | ||
|
||
namespace ConsentManagementProviderLib.Android | ||
{ | ||
internal class SpAndroidNativeUtils | ||
{ | ||
private static AndroidJavaClass unityPlayerClass; | ||
private static AndroidJavaObject currentActivity; | ||
|
||
static SpAndroidNativeUtils() | ||
{ | ||
unityPlayerClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | ||
currentActivity = unityPlayerClass.GetStatic<AndroidJavaObject>("currentActivity"); | ||
} | ||
|
||
public static void ClearAllData() | ||
{ | ||
AndroidJavaClass spUtilsClass = new AndroidJavaClass("com.sourcepoint.cmplibrary.util.SpUtils"); | ||
|
||
currentActivity.Call("runOnUiThread", new AndroidJavaRunnable(() => | ||
{ | ||
spUtilsClass.CallStatic("clearAllData", currentActivity); | ||
})); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/ConsentManagementProvider/Scripts/wrapper/Android/SpAndroidNativeUtils.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters