#include #include #include #include #include #include "automator.h" #include "AndroidNative/systemdispatcher.h" #ifdef Q_OS_ANDROID #include #include using namespace AndroidNative; JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) { Q_UNUSED(vm); qDebug("NativeInterface::JNI_OnLoad()"); // It must call this function within JNI_OnLoad to enable System Dispatcher SystemDispatcher::registerNatives(); /* Optional: Register your own service */ // Call quickandroid.example.ExampleService.start() QAndroidJniObject::callStaticMethod("quickandroid/example/ExampleService", "start", "()V"); return JNI_VERSION_1_6; } #endif int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.addImportPath("qrc:///"); engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); /* Testing Code. Not needed for regular project */ Automator* automator = new Automator(); automator->start(); return app.exec(); }