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

@ -19,6 +19,7 @@
import QtQuick 2.2
import QtQuick.Controls 2.0
import org.retroshare.qml_components.LibresapiLocalClient 1.0
import "URI.js" as URI
ApplicationWindow
{
@ -56,6 +57,11 @@ ApplicationWindow
}
function isTokenValid(token) { return Array.isArray(tokens[token]) }
function handleIntentUri(uriStr)
{
console.log("handleIntentUri", JSON.stringify(URI.parse(uriStr), null, 1))
}
header: ToolBar
{