overte-JulianGro/interface/src/AndroidHelper.h
Sam Gondelman b53772f9ca
Merge pull request #13431 from Cristo86/android_stop_downloads_bg
Android - Prevent pending downloads to happen when going back to home
2018-07-12 15:22:56 -07:00

53 lines
1.4 KiB
C++

//
// AndroidHelper.h
// interface/src
//
// Created by Gabriel Calero & Cristian Duarte on 3/30/18.
// Copyright 2018 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_Android_Helper_h
#define hifi_Android_Helper_h
#include <QObject>
class AndroidHelper : public QObject {
Q_OBJECT
public:
static AndroidHelper& instance() {
static AndroidHelper instance;
return instance;
}
void requestActivity(const QString &activityName, const bool backToScene, QList<QString> args = QList<QString>());
void notifyLoadComplete();
void notifyEnterForeground();
void notifyBeforeEnterBackground();
void notifyEnterBackground();
void performHapticFeedback(int duration);
void processURL(const QString &url);
AndroidHelper(AndroidHelper const&) = delete;
void operator=(AndroidHelper const&) = delete;
public slots:
void showLoginDialog();
signals:
void androidActivityRequested(const QString &activityName, const bool backToScene, QList<QString> args = QList<QString>());
void qtAppLoadComplete();
void enterForeground();
void beforeEnterBackground();
void enterBackground();
void hapticFeedbackRequested(int duration);
private:
AndroidHelper();
~AndroidHelper();
};
#endif