-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 4.0.0
- Loading branch information
Showing
119 changed files
with
1,906 additions
and
1,348 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<dependencies> | ||
<androidPackages> | ||
<androidPackage spec="io.qonversion.sandwich:sandwich:0.2.1" /> | ||
<androidPackage spec="io.qonversion.sandwich:sandwich:1.0.0" /> | ||
<androidPackage spec="com.fasterxml.jackson.core:jackson-databind:2.11.1" /> | ||
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.61" /> | ||
</androidPackages> | ||
<iosPods> | ||
<iosPod name="QonversionSandwich" version="0.2.1" /> | ||
<iosPod name="QonversionSandwich" version="1.0.0" /> | ||
</iosPods> | ||
</dependencies> |
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,55 @@ | ||
using UnityEngine; | ||
|
||
namespace QonversionUnity | ||
{ | ||
internal class AutomationsWrapperAndroid : IAutomationsWrapper | ||
{ | ||
public void Initialize(string gameObjectName) | ||
{ | ||
CallAutomations("initialize", gameObjectName); | ||
} | ||
|
||
public void SetNotificationsToken(string token) | ||
{ | ||
CallAutomations("setNotificationsToken", token); | ||
} | ||
|
||
public bool HandleNotification(string notification) | ||
{ | ||
return CallAutomations<bool>("handleNotification", notification); | ||
} | ||
|
||
public string GetNotificationCustomPayload(string notification) | ||
{ | ||
return CallAutomations<string>("getNotificationCustomPayload", notification); | ||
} | ||
|
||
public void SubscribeOnAutomationEvents() | ||
{ | ||
CallAutomations("subscribeOnAutomationEvents"); | ||
} | ||
|
||
public void ShowScreen(string screenId, string callbackName) | ||
{ | ||
CallAutomations("showScreen", screenId, callbackName); | ||
} | ||
|
||
private const string AutomationsWrapper = "com.qonversion.unitywrapper.AutomationsWrapper"; | ||
|
||
private static T CallAutomations<T>(string methodName, params object[] args) | ||
{ | ||
using (var automations = new AndroidJavaClass(AutomationsWrapper)) | ||
{ | ||
return automations.CallStatic<T>(methodName, args); | ||
} | ||
} | ||
|
||
private static void CallAutomations(string methodName, params object[] args) | ||
{ | ||
using (var automations = new AndroidJavaClass(AutomationsWrapper)) | ||
{ | ||
automations.CallStatic(methodName, args); | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.