From 82f82a6b7d727ff3dcc8b4e5a4d7fc9a214a8596 Mon Sep 17 00:00:00 2001 From: zackhow Date: Sun, 19 Aug 2018 17:38:29 -0400 Subject: Android: Add usage statistics to android. Added an option in General config to enable/disable usage statistics. Added a popup on first open if the user would like to engage in reporting. Clicking cancel or out of the box opts out. Only clicking 'Ok' will enable reporting. Also added a new android specific values to report. --- Source/Core/Common/AndroidAnalytics.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Source/Core/Common/AndroidAnalytics.cpp (limited to 'Source/Core/Common/AndroidAnalytics.cpp') diff --git a/Source/Core/Common/AndroidAnalytics.cpp b/Source/Core/Common/AndroidAnalytics.cpp new file mode 100644 index 0000000000..43912e5b1b --- /dev/null +++ b/Source/Core/Common/AndroidAnalytics.cpp @@ -0,0 +1,27 @@ +// Copyright 2018 Dolphin Emulator Project +// Licensed under GPLv2+ +// Refer to the license.txt file included. + +#include +#include + +#include "Common/AndroidAnalytics.h" + +namespace Common +{ +std::function s_android_send_report; +void AndroidSetReportHandler(std::function func) +{ + s_android_send_report = std::move(func); +} +AndroidAnalyticsBackend::AndroidAnalyticsBackend(std::string passed_endpoint) + : m_endpoint{std::move(passed_endpoint)} +{ +} +AndroidAnalyticsBackend::~AndroidAnalyticsBackend() = default; + +void AndroidAnalyticsBackend::Send(std::string report) +{ + s_android_send_report(m_endpoint, report); +} +} // namespace Common -- cgit v1.2.3