Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for trackError method in Android module #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
/captures
/ios/build
/ios/*.zip

/android/lib
/android/libs
/android/java-sources.txt
Binary file added android/.gradle/6.0/fileChanges/last-build.bin
Binary file not shown.
Binary file added android/.gradle/6.0/fileHashes/fileHashes.lock
Binary file not shown.
Empty file.
Binary file not shown.
2 changes: 2 additions & 0 deletions android/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Sat Feb 29 09:05:30 EST 2020
gradle.version=6.0
Empty file.
17 changes: 17 additions & 0 deletions android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android</name>
<comment>Project android created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
13 changes: 13 additions & 0 deletions android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.0))
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
5 changes: 3 additions & 2 deletions android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#
version: 2.0.0
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
#architectures: arm64-v8a armeabi-v7a x86 x86_64
architectures: arm64-v8a armeabi-v7a x86
description: Visual Studio App Center SDK for Axway Titanium
author: Sergey Volkov <s.volkov@netris.ru>
license: Apache 2.0
Expand All @@ -15,4 +16,4 @@ name: ti.appcenter
moduleid: ru.netris.mobile.appcenter
guid: b9eab43a-1867-45ef-b6f6-46db26f0c6ef
platform: android
minsdk: 9.0.0
minsdk: 8.3.1.GA
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;

import ru.netris.mobile.appcenter.TiAppcenterModule;
import ru.netris.mobile.appcenter.utils.TiAppCenterUtils;
Expand Down Expand Up @@ -67,6 +69,26 @@ public String getApiName()
return "TiAppCenterCrashes";
}

@Kroll.method
public void trackError(String exception, KrollDict[] properties)
{
try {
Map<String, String> propertiesHash = new HashMap<String, String>();
if (properties != null) {
for (KrollDict prop : properties) {
String key = TiConvert.toString(prop, "key");
String value = TiConvert.toString(prop, "value");
propertiesHash.put(key, value);
}
}

Crashes.trackError(new Exception(exception), propertiesHash, null);
} catch (Exception e) {
TiAppCenterUtils.logError("Failed to track error: " + exception);
TiAppCenterUtils.logError(android.util.Log.getStackTraceString(e));
}
}

@Kroll.method
public void lastSessionCrashReport(final KrollFunction callback)
{
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ name: ti.appcenter
moduleid: ru.netris.mobile.appcenter
guid: 0443bb65-2ff4-47a3-b9b0-e09f3b41b542
platform: iphone
minsdk: 7.4.1.GA
minsdk: 8.3.1.GA
7 changes: 3 additions & 4 deletions ios/titanium.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
TITANIUM_SDK_VERSION = 7.4.1.GA
TITANIUM_SDK_VERSION = 9.0.0.v20200224113949

//
// THESE SHOULD BE OK GENERALLY AS-IS
//
TITANIUM_SDK = $(HOME)/Library/Application Support/Titanium/mobilesdk/osx/7.4.1.GA
TITANIUM_SDK = $(HOME)/Library/Application Support/Titanium/mobilesdk/osx/9.0.0.v20200224113949
TITANIUM_BASE_SDK = "$(TITANIUM_SDK)/iphone/include"
TITANIUM_BASE_SDK2 = "$(TITANIUM_SDK)/iphone/include/TiCore"
TITANIUM_BASE_SDK3 = "$(TITANIUM_SDK)/iphone/include/JavaScriptCore"
HEADER_SEARCH_PATHS= $(TITANIUM_BASE_SDK) $(TITANIUM_BASE_SDK2) $(TITANIUM_BASE_SDK3)


FRAMEWORK_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/Frameworks"