|
34 | 34 | public class OneSignalAndroid : OneSignalPlatform {
|
35 | 35 | private static AndroidJavaObject mOneSignal = null;
|
36 | 36 |
|
37 |
| - public OneSignalAndroid(string gameObjectName, string googleProjectNumber, string appId, OneSignal.OSInFocusDisplayOption displayOption, OneSignal.LOG_LEVEL logLevel, OneSignal.LOG_LEVEL visualLevel) { |
38 |
| - mOneSignal = new AndroidJavaObject("com.onesignal.OneSignalUnityProxy", gameObjectName, googleProjectNumber, appId, (int)logLevel, (int)visualLevel); |
| 37 | + public OneSignalAndroid(string gameObjectName, string googleProjectNumber, string appId, OneSignal.OSInFocusDisplayOption displayOption, OneSignal.LOG_LEVEL logLevel, OneSignal.LOG_LEVEL visualLevel, bool requiresUserConsent) { |
| 38 | + mOneSignal = new AndroidJavaObject("com.onesignal.OneSignalUnityProxy", gameObjectName, googleProjectNumber, appId, (int)logLevel, (int)visualLevel, requiresUserConsent); |
39 | 39 | SetInFocusDisplaying(displayOption);
|
40 | 40 | }
|
41 | 41 |
|
@@ -127,6 +127,18 @@ public void removeEmailSubscriptionObserver() {
|
127 | 127 | mOneSignal.Call("removeEmailSubscriptionObserver");
|
128 | 128 | }
|
129 | 129 |
|
| 130 | + public void UserDidProvideConsent(bool consent) { |
| 131 | + mOneSignal.Call("provideUserConsent", consent); |
| 132 | + } |
| 133 | + |
| 134 | + public bool UserProvidedConsent() { |
| 135 | + return mOneSignal.Call<bool>("userProvidedPrivacyConsent"); |
| 136 | + } |
| 137 | + |
| 138 | + public void SetRequiresUserPrivacyConsent(bool required) { |
| 139 | + mOneSignal.Call("setRequiresUserPrivacyConsent", required); |
| 140 | + } |
| 141 | + |
130 | 142 | public OSPermissionSubscriptionState getPermissionSubscriptionState() {
|
131 | 143 | return OneSignalPlatformHelper.parsePermissionSubscriptionState(this, mOneSignal.Call<string>("getPermissionSubscriptionState"));
|
132 | 144 | }
|
|
0 commit comments