Add method to get the list of offers

This commit is contained in:
albexk 2024-10-03 19:47:39 +03:00
parent 3bd6f704e9
commit bad9327ffa
14 changed files with 336 additions and 16 deletions

View file

@ -292,6 +292,13 @@ bool AndroidController::isPlay()
return callActivityMethod<jboolean>("isPlay", "()Z");
}
QJsonObject AndroidController::getSubscriptionPlans()
{
QJniObject subscriptionPlans = callActivityMethod<jstring>("getSubscriptionPlans", "()Ljava/lang/String;");
QJsonObject json = QJsonDocument::fromJson(subscriptionPlans.toString().toUtf8()).object();
return json;
}
// Moving log processing to the Android side
jclass AndroidController::log;
jmethodID AndroidController::logDebug;