[andorid] Updated MyTracker to 1.5.2

This commit is contained in:
Александр Зацепин 2018-04-04 13:43:24 +03:00 committed by Roman Kuznetsov
parent 9322369bab
commit 47849072c8
3 changed files with 5 additions and 11 deletions

View file

@ -69,7 +69,7 @@ dependencies {
}
implementation 'com.google.code.gson:gson:2.6.1'
implementation 'com.pushwoosh:pushwoosh:4.12.2'
implementation 'com.my.tracker:mytracker-sdk:1.3.5'
implementation 'com.my.tracker:mytracker-sdk:1.5.2'
implementation ('com.my.target:mytarget-sdk:4.6.14') {
exclude group: 'com.android.support'
}

View file

@ -127,7 +127,7 @@ void Platform::Initialize(JNIEnv * env, jobject functorProcessObject, jstring ap
m_functorProcessObject = env->NewGlobalRef(functorProcessObject);
jclass const functorProcessClass = env->GetObjectClass(functorProcessObject);
m_sendPushWooshTagsMethod = env->GetMethodID(functorProcessClass, "sendPushWooshTags", "(Ljava/lang/String;[Ljava/lang/String;)V");
m_myTrackerTrackMethod = env->GetStaticMethodID(g_myTrackerClazz, "trackEvent", "(Ljava/lang/String;)V");
m_myTrackerTrackMethod = env->GetStaticMethodID(g_myTrackerClazz, "trackEvent", "(Ljava/lang/String;)Z");
m_secureStorage.Init();
@ -240,7 +240,7 @@ void Platform::SendMarketingEvent(std::string const & tag, std::map<std::string,
for (auto const & item : params)
eventData.append("_" + item.first + "_" + item.second);
env->CallStaticVoidMethod(g_myTrackerClazz, m_myTrackerTrackMethod,
env->CallStaticBooleanMethod(g_myTrackerClazz, m_myTrackerTrackMethod,
jni::TScopedLocalRef(env, jni::ToJavaString(env, eventData)).get());
}

View file

@ -3,8 +3,6 @@ package com.mapswithme.maps;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.NonNull;
@ -25,15 +23,11 @@ import com.mapswithme.maps.editor.Editor;
import com.mapswithme.maps.location.LocationHelper;
import com.mapswithme.maps.location.TrackRecorder;
import com.mapswithme.maps.routing.RoutingController;
import com.mapswithme.maps.settings.StoragePathManager;
import com.mapswithme.maps.sound.TtsPlayer;
import com.mapswithme.maps.traffic.TrafficManager;
import com.mapswithme.maps.ugc.UGC;
import com.mapswithme.util.Config;
import com.mapswithme.util.Constants;
import com.mapswithme.util.Counters;
import com.mapswithme.util.CrashlyticsUtils;
import com.mapswithme.util.PermissionsUtils;
import com.mapswithme.util.SharedPropertiesUtils;
import com.mapswithme.util.StorageUtils;
import com.mapswithme.util.ThemeSwitcher;
@ -48,7 +42,6 @@ import com.my.tracker.MyTrackerParams;
import com.pushwoosh.PushManager;
import io.fabric.sdk.android.Fabric;
import java.io.File;
import java.util.List;
public class MwmApplication extends Application
@ -374,7 +367,8 @@ public class MwmApplication extends Application
MyTracker.setDebugMode(BuildConfig.DEBUG);
MyTracker.createTracker(PrivateVariables.myTrackerKey(), this);
final MyTrackerParams myParams = MyTracker.getTrackerParams();
myParams.setDefaultVendorAppPackage();
if (myParams != null)
myParams.setDefaultVendorAppPackage();
MyTracker.initTracker();
}