From b85098d401a8c3676beb4beac39a39c53f73baeb Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 9 Aug 2018 07:11:24 -0700 Subject: [PATCH] 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 --- core/android.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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("checkPendingIntents"); + qDebug() << "checkPendingIntents "; + return; + } + qDebug() << "checkPendingIntents: Activity not valid"; +}