mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 19:12:28 -04:00
Retroshare android service now run and start at boot on android, the qml app is still disfunctional
This commit is contained in:
parent
68a00138d2
commit
279551fe8d
36 changed files with 1076 additions and 79 deletions
47
retroshare-qml-app/src/main.cpp
Normal file
47
retroshare-qml-app/src/main.cpp
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* RetroShare Android QML App
|
||||
* Copyright (C) 2016 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QDebug>
|
||||
|
||||
#include <QtAndroidExtras>
|
||||
#include <QFileInfo>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "retroshare/rsinit.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
|
||||
|
||||
QString sockPath = QString::fromStdString(RsAccounts::ConfigDirectory());
|
||||
sockPath.append("/libresapi.sock");
|
||||
|
||||
QFileInfo fileInfo(sockPath);
|
||||
|
||||
qDebug() << "Is service.cpp running as a service?" << QtAndroid::androidService().isValid();
|
||||
qDebug() << "Is service.cpp running as an activity?" << QtAndroid::androidActivity().isValid();
|
||||
qDebug() << "QML APP:" << sockPath << fileInfo.exists() << fileInfo.lastModified().toString();
|
||||
|
||||
return app.exec();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue