Implement Android intent handling in qml app

AndroidManifest.xml register activity as an handler for retroshare links
RetroShareQmlActivity...NativeCalls.cpp bring the intent data from java
  to C++ and then to QML
QMl mainWindow uses URI.js to parse the received uri
Create a singleton for qml engine so it is reachable from NativeCalls
This commit is contained in:
Gioacchino Mazzurco 2017-04-11 13:11:57 +02:00
parent 29a3d105c4
commit 533dbef0c7
15 changed files with 239 additions and 26 deletions

View file

@ -0,0 +1,32 @@
#pragma once
/*
* libresapi local socket client
* Copyright (C) 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
* 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 <QQmlApplicationEngine>
struct SingletonQmlEngine
{
static QQmlApplicationEngine& instance()
{
static QQmlApplicationEngine engine;
return engine;
}
private:
SingletonQmlEngine();
};