Add method to get the list of offers

This commit is contained in:
albexk
2024-10-03 19:47:39 +03:00
committed by NickVs2015
parent 8c9f91328b
commit 8dda8e2834
14 changed files with 336 additions and 16 deletions
@@ -335,6 +335,13 @@ bool AndroidController::isPlay()
}
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;
@@ -56,6 +56,7 @@ public:
bool requestAuthentication();
void sendTouch(float x, float y);
bool isPlay();
QJsonObject getSubscriptionPlans();
static bool initLogging();
static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message);