Commit 147ab012 authored by Karel Slaný's avatar Karel Slaný

Added a comment about a problem on Android.

parent 826d29e6
......@@ -48,7 +48,7 @@ QStringList IntentNotification::getIntentArguments(void)
if (!intent.isValid()) {
return QStringList();
}
QAndroidJniObject data(intent.callObjectMethod("getData",
QAndroidJniObject data(intent.callObjectMethod("getData",
"()Landroid/net/Uri;"));
if (!data.isValid()) {
return QStringList();
......@@ -59,6 +59,34 @@ QStringList IntentNotification::getIntentArguments(void)
return QStringList();
}
/*
* TODO -- There is a problem on Android. Opening intent is repeated if
* the application is resumed from background. Clearing the intent
* will block any later intent and the application must be restarted to
* receive any file opening intents.
*/
#if 0
jint intentFlags = intent.callMethod<jint>("getFlags", "()I");
jint flag = QAndroidJniObject::getStaticField<jint>("android/content/Intent",
"FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY");
#endif
#if 0
intent.callObjectMethod("setData",
"(Landroid/net/Uri;)Landroid/content/Intent;",
QAndroidJniObject().object<jobject>());
#endif
#if 0
QAndroidJniObject builder("android/net/Uri/Builder");
builder.callObjectMethod("scheme",
"(java/lang/String)Landroid/net/Uri/Builder;",
QAndroidJniObject::fromString("https").object<jstring>());
QAndroidJniObject uri(builder.callObjectMethod("build", "()Landroid/net/Uri;"));
activity.callObjectMethod("finish", "()V");
#endif
return QStringList(path.toString());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment