Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:adaptyteam/AdaptySDK-Unity into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	ProjectSettings/GvhProjectSettings.xml
  • Loading branch information
x401om committed Jan 17, 2023
2 parents dc5be1a + a560d92 commit b93a420
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 15 deletions.
8 changes: 8 additions & 0 deletions Assets/Adapty.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Adapty/Plugins.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions Assets/AdaptySDK/Editor/AdaptySDKDependencies.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<dependencies>
<androidPackages>
<androidPackage spec="com.adapty.internal:unity-wrapper:2.2.2">
<repositories>
<repository>Assets/GeneratedLocalRepo</repository>
</repositories>
</androidPackage>
<androidPackage spec="com.adapty.internal:crossplatform:2.2.1">
<repositories>
<repository>Assets/GeneratedLocalRepo</repository>
</repositories>
</androidPackage>
<androidPackage spec="com.github.adaptyteam:AdaptySDK-Android:2.2.2">
<repositories>
<repository>https://jitpack.io</repository>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
<artifactId>unity-wrapper</artifactId>
<version>2.2.2</version>
<packaging>aar</packaging>
<dependencies/>
</project>
Binary file not shown.
2 changes: 0 additions & 2 deletions ProjectSettings/AndroidResolverDependencies.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<dependencies>
<packages>
<package>com.adapty.internal:crossplatform:2.2.1</package>
<package>com.adapty.internal:unity-wrapper:2.2.2</package>
<package>com.github.adaptyteam:AdaptySDK-Android:2.2.2</package>
</packages>
<files>
Expand Down
4 changes: 4 additions & 0 deletions ProjectSettings/GvhProjectSettings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<projectSettings>
<projectSetting name="Google.IOSResolver.VerboseLoggingEnabled" value="False" />
<projectSetting name="Google.PackageManagerResolver.VerboseLoggingEnabled" value="False" />
<projectSetting name="Google.VersionHandler.VerboseLoggingEnabled" value="False" />
<projectSetting name="GooglePlayServices.PromptBeforeAutoResolution" value="False" />
<projectSetting name="GooglePlayServices.UseJetifier" value="True" />
</projectSettings>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import static com.adapty.unity.Constants.ADAPTY_ERROR_CODE_DECODING_FAILED;
import static com.adapty.unity.Constants.ADAPTY_ERROR_CODE_KEY;
import static com.adapty.unity.Constants.ADAPTY_ERROR_DECODING_FAILED_MESSAGE;
import static com.adapty.unity.Constants.ADAPTY_ERROR_DETAIL_KEY;
import static com.adapty.unity.Constants.ADAPTY_ERROR_KEY;
import static com.adapty.unity.Constants.ADAPTY_ERROR_MESSAGE_KEY;
import static com.adapty.unity.Constants.ADAPTY_ONBOARDING_NAME_KEY;
Expand Down Expand Up @@ -264,15 +266,19 @@ private static void sendMessageWithResult(String message, AdaptyAndroidCallback
}

private static void sendParameterError(String paramKey, String methodName, AdaptyAndroidCallback callback) {
String errorMessage = "Error while parsing parameter: " +paramKey + ", method: " + methodName;
Map<String, Object> message = new HashMap<>();
Map<String, Object> errorMap = new HashMap<>();
errorMap.put(ADAPTY_ERROR_MESSAGE_KEY, errorMessage);
errorMap.put(ADAPTY_ERROR_MESSAGE_KEY, ADAPTY_ERROR_DECODING_FAILED_MESSAGE);
errorMap.put(ADAPTY_ERROR_CODE_KEY, ADAPTY_ERROR_CODE_DECODING_FAILED);
errorMap.put(ADAPTY_ERROR_DETAIL_KEY, createErrorDetailsString(paramKey, methodName));
message.put(ADAPTY_ERROR_KEY, errorMap);
sendMessageWithResult(helper.toJson(message), callback);
}

private static String createErrorDetailsString(String paramKey, String methodName) {
return "AdaptyPluginError.decodingFailed(Error while parsing parameter: " + paramKey + ", method: " + methodName + ")";
}

private static void sendEmptyResultOrError(AdaptyError error, AdaptyAndroidCallback callback) {
Map<String, Object> message = new HashMap<>();
if (error != null) {
Expand All @@ -295,12 +301,14 @@ private static void sendDataToMessageHandler(String key, String data) {
class Constants {

public static final String ADAPTY_SUCCESS_KEY = "success";
public static final String ADAPTY_PROFILE_UPDATE_KEY = "purchaser_info_update";
public static final String ADAPTY_PROFILE_UPDATE_KEY = "did_load_latest_profile";
public static final String ADAPTY_ONBOARDING_NAME_KEY = "onboarding_name";
public static final String ADAPTY_ONBOARDING_SCREEN_NAME_KEY = "onboarding_screen_name";
public static final String ADAPTY_ONBOARDING_SCREEN_ORDER_KEY = "onboarding_screen_order";
public static final String ADAPTY_ERROR_KEY = "error";
public static final String ADAPTY_ERROR_CODE_KEY = "adapty_code";
public static final String ADAPTY_ERROR_MESSAGE_KEY = "message";
public static final String ADAPTY_ERROR_DETAIL_KEY = "detail";
public static final String ADAPTY_ERROR_DECODING_FAILED_MESSAGE = "Decoding failed";
public static final int ADAPTY_ERROR_CODE_DECODING_FAILED = 2006;
}

0 comments on commit b93a420

Please sign in to comment.