This commit is contained in:
LubuWest 2017-11-08 21:15:07 +01:00
commit fb560b54b1
115 changed files with 5537 additions and 0 deletions

View file

@ -0,0 +1,47 @@
#include <QtCore>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickView>
#include <QQmlContext>
#include "automator.h"
#include "AndroidNative/systemdispatcher.h"
#ifdef Q_OS_ANDROID
#include <QtAndroidExtras/QAndroidJniObject>
#include <QtAndroidExtras/QAndroidJniEnvironment>
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<void>("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();
}