forked from lubuwest/Friendiqa
v0.1
This commit is contained in:
parent
591d55f43a
commit
fb560b54b1
115 changed files with 5537 additions and 0 deletions
|
@ -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();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue