mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 06:48:33 +00:00
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.
This commit is contained in:
parent
8e5c3d5b4e
commit
82f82a6b7d
21 changed files with 382 additions and 20 deletions
27
Source/Core/Common/AndroidAnalytics.cpp
Normal file
27
Source/Core/Common/AndroidAnalytics.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2018 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
#include "Common/AndroidAnalytics.h"
|
||||
|
||||
namespace Common
|
||||
{
|
||||
std::function<void(std::string, std::string)> s_android_send_report;
|
||||
void AndroidSetReportHandler(std::function<void(std::string, std::string)> 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
|
Loading…
Add table
Add a link
Reference in a new issue