mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-16 13:02:27 -04:00
android notification service stub, improve login
Added retroshare-android-notify-service a stub will handle notifications to android system, at the moment it only attempt autologin if default password is used retroshare-android-service quit QCoreApplication gracefully Android Studio update has changed some android build files Create BusyOverlay.qml componet so it is reusable accross the qml app Contacts.qml create a pseudonimous GXS identity as needed without prompting the user RsLoginPassView.qml nicer look, on mobile phone password usage is not common so do not use password by default QML app main view handle correctly +waiting_startup+ runstate QML app main view use BusyOverlay as initial item
This commit is contained in:
parent
70e91f7164
commit
bcbd5230eb
24 changed files with 562 additions and 94 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* RetroShare Android Service
|
||||
* Copyright (C) 2016 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
* Copyright (C) 2016-2017 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
|
||||
|
@ -20,7 +20,6 @@
|
|||
#include <QDebug>
|
||||
|
||||
#ifdef __ANDROID__
|
||||
# include <QtAndroidExtras>
|
||||
# include "util/androiddebug.h"
|
||||
#endif
|
||||
|
||||
|
@ -41,23 +40,23 @@ int main(int argc, char *argv[])
|
|||
QCoreApplication a(argc, argv);
|
||||
ApiServer api;
|
||||
RsControlModule ctrl_mod(argc, argv, api.getStateTokenServer(), &api, true);
|
||||
api.addResourceHandler("control", dynamic_cast<resource_api::ResourceRouter*>(&ctrl_mod), &resource_api::RsControlModule::handleRequest);
|
||||
api.addResourceHandler(
|
||||
"control",
|
||||
dynamic_cast<resource_api::ResourceRouter*>(&ctrl_mod),
|
||||
&resource_api::RsControlModule::handleRequest);
|
||||
|
||||
QString sockPath = QString::fromStdString(RsAccounts::ConfigDirectory());
|
||||
sockPath.append("/libresapi.sock");
|
||||
qDebug() << "Listening on:" << sockPath;
|
||||
ApiServerLocal apiServerLocal(&api, sockPath); (void) apiServerLocal;
|
||||
|
||||
#ifdef __ANDROID__
|
||||
qDebug() << "Is service.cpp running as a service?" << QtAndroid::androidService().isValid();
|
||||
qDebug() << "Is service.cpp running as an activity?" << QtAndroid::androidActivity().isValid();
|
||||
#endif
|
||||
|
||||
while (!ctrl_mod.processShouldExit())
|
||||
{
|
||||
a.processEvents();
|
||||
usleep(20000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
QCoreApplication::quit();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue