Android: make support email API consistent with iOS

We have two different API endpoints. supportEmail() which adds the
default subject, recipient, and message body, and the generic
shareViaEmail() which takes all of these as arguments.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-08-30 17:06:37 +00:00
parent 87387b7e7e
commit 2ae7f3cf6c
2 changed files with 15 additions and 10 deletions

View file

@ -497,10 +497,10 @@ bool QMLManager::createSupportEmail()
if (activity.isValid()) {
QAndroidJniObject applogfilepath = QAndroidJniObject::fromString(appLogFileName);
QAndroidJniObject libdcfilepath = QAndroidJniObject::fromString(logfile_name);
bool success = activity.callMethod<jboolean>("shareFiles",
bool success = activity.callMethod<jboolean>("supportEmail",
"(Ljava/lang/String;Ljava/lang/String;)Z", // two string arguments, return bool
applogfilepath.object<jstring>(), libdcfilepath.object<jstring>());
qDebug() << __FUNCTION__ << "shareFiles" << (success ? "succeeded" : "failed");
qDebug() << __FUNCTION__ << "supportEmail" << (success ? "succeeded" : "failed");
if (success)
return true;
}