Closed mariuszmaximus closed 6 months ago
Work in progress: https://github.com/mariuszmaximus/QtZeroConf/tree/Qt6
Changes:
Todo: [1]
nsdManager = QJniObject("qtzeroconf/QZeroConfNsdManager", "(JLandroid/content/Context;)V", reinterpret_cast<quint64>(this), QtAndroid::androidActivity().object());
if (nsdManager.isValid()) {
jclass objectClass = env->GetObjectClass(nsdManager.object<jobject>());
env->RegisterNatives(objectClass, methods, sizeof(methods) / sizeof(methods[0]));
env->DeleteLocalRef(objectClass);
}
QtAndroid::androidActivity().object()
I don't know what it is in Qt6
Are you planning to submit a merge request any time soon?
Did you finish your todo list?
Seems like it's fixed here in androidnsd.cpp
on line 56. Isn't that compiling @mariuszmaximus ?
ok. I have not tried compiling it yet. Will do tonight. Is it ok if I re-order the commits and squash some together?
Ah, I think QNativeInterface::QAndroidApplication::context()
should be replaced with QNativeInterface::QAndroidApplication::context().object()
. I'm testing with 6.7.0 btw.
Qt6 Android support is now on master
I try build QtZeroConf on Qt 6.6 for my Android phone
First problem
QT += androidextras
androidextras not exists in Qt6 https://www.qt.io/blog/qt-extras-modules-in-qt-6I have problem with this functions:
QtAndroid::androidActivity().object()
QtAndroid::runOnAndroidThread(