mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-07 22:02:32 -04:00
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:
parent
29a3d105c4
commit
533dbef0c7
15 changed files with 239 additions and 26 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue