summaryrefslogtreecommitdiffstats
path: root/core/android.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-09 07:11:24 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-11 11:14:22 -0700
commitb85098d401a8c3676beb4beac39a39c53f73baeb (patch)
tree7f57770d28319cc9bdb7352118c2db96b21f285f /core/android.cpp
parent5a9c8f3a5eb5b0a1f88684444c6afec1dc8dc668 (diff)
downloadsubsurface-b85098d401a8c3676beb4beac39a39c53f73baeb.tar.gz
Android: add callback to Java code to check pending Intents
If we get launched by an intent, we need to delay processing that Intent until after the app is initialized. This is the helper function we'll use for that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/android.cpp')
-rw-r--r--core/android.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/android.cpp b/core/android.cpp
index f64182b08..15f95612a 100644
--- a/core/android.cpp
+++ b/core/android.cpp
@@ -239,3 +239,15 @@ bool subsurface_user_is_root()
return false;
}
}
+
+/* called from QML manager */
+void checkPendingIntents()
+{
+ QAndroidJniObject activity = QtAndroid::androidActivity();
+ if(activity.isValid()) {
+ activity.callMethod<void>("checkPendingIntents");
+ qDebug() << "checkPendingIntents ";
+ return;
+ }
+ qDebug() << "checkPendingIntents: Activity not valid";
+}