Open vovka-s opened 2 years ago
Добрый день!Ваше письмо получено и зарегистрировано под уникальным номером № 18823391. Ответ обязательно будет предоставлен, пожалуйста, ожидайте.Просим Вас не отправлять повторное письмо по данному вопросу - оно будет считаться новой заявкой и может быть обработано позднее.Помощь сервиса: https://yandex.ru/support/direct/?from=email--С уважением,Отдел клиентского сервисател.: 8 800 234-24-80 (звонок из регионов России бесплатный)тел.: +7 495 739-37-77 19.08.2022, 19:43, "vovka-s" @.***>: Привет! Столкнулся с крешами приложухи, возникающими из-за вызовова reportEvent до инициализации метрики Добавил проверок на активность - креши прекратились. Прошу проверить, всё ли верно, и залить в реп diff --git a/node_modules/yandex-appmetrica-plugin-cordova/platforms/android/com/yandex/metrica/plugin/cordova/AppMetricaPlugin.java b/node_modules/yandex-appmetrica-plugin-cordova/platforms/android/com/yandex/metrica/plugin/cordova/AppMetricaPlugin.java index 1512def..ff1300a 100644 --- a/node_modules/yandex-appmetrica-plugin-cordova/platforms/android/com/yandex/metrica/plugin/cordova/AppMetricaPlugin.java +++ b/node_modules/yandex-appmetrica-plugin-cordova/platforms/android/com/yandex/metrica/plugin/cordova/AppMetricaPlugin.java @@ -209,10 +209,12 @@ public class AppMetricaPlugin extends CordovaPlugin { eventParametersJSONString = eventParametersObj.toString(); } catch (JSONException ignored) {}
@@ -225,7 +227,9 @@ public class AppMetricaPlugin extends CordovaPlugin { errorThrowable = new Throwable(errorReason); } catch (JSONException ignored) {}
YandexMetrica.reportError(errorName, errorThrowable);
if (mAppMetricaActivated) {
YandexMetrica.reportError(errorName, errorThrowable);
} }
private void setLocation(final JSONArray args, @@ -233,13 +237,18 @@ public class AppMetricaPlugin extends CordovaPlugin { final JSONObject locationObj = args.getJSONObject(0);
final Location location = toLocation(locationObj);
YandexMetrica.setLocation(location);
if (mAppMetricaActivated) {
YandexMetrica.setLocation(location);
} }
private void setLocationTracking(final JSONArray args, final CallbackContext callbackContext) throws JSONException { final boolean enabled = args.getBoolean(0);
YandexMetrica.setLocationTracking(enabled);
if (mAppMetricaActivated) {
YandexMetrica.setLocationTracking(enabled);
} } }
This issue body was partially generated by patch-package.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
Привет! Столкнулся с крешами приложухи, возникающими из-за вызовова
reportEvent
до инициализации метрики Добавил проверок на активность - креши прекратились. Прошу проверить, всё ли верно, и залить в репThis issue body was partially generated by patch-package.