Skip to content

Commit 1ab14cc

Browse files
committed
update sample to test new android plugin code
1 parent b692673 commit 1ab14cc

File tree

5 files changed

+51
-49
lines changed

5 files changed

+51
-49
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Thumbs.db
3434
*.rc
3535
/.qmake.cache
3636
/.qmake.stash
37+
build-*
3738

3839
# qtcreator generated files
3940
*.pro.user*

.qmake.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ DEFINES += QT_DEPRECATED_WARNINGS QT_ASCII_CAST_WARNINGS
66

77
MODULE_VERSION_MAJOR = 1
88
MODULE_VERSION_MINOR = 1
9-
MODULE_VERSION_PATCH = 0
9+
MODULE_VERSION_PATCH = 2
1010
MODULE_VERSION_IMPORT = $${MODULE_VERSION_MAJOR}.$${MODULE_VERSION_MINOR}
1111
MODULE_VERSION = $${MODULE_VERSION_MAJOR}.$${MODULE_VERSION_MINOR}.$${MODULE_VERSION_PATCH}

examples/service/AndroidServiceTest/android/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<manifest package="de.skycoder42.qtservice.test" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
2+
<manifest package="de.skycoder42.qtservice.test" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0.0" android:versionCode="1" android:installLocation="auto">
33
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --">
44
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="unspecified" android:launchMode="singleTop">
55
<intent-filter>
@@ -90,12 +90,13 @@
9090

9191
</application>
9292

93-
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26"/>
93+
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28"/>
9494
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
9595

9696
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
9797
Remove the comment if you do not require these default permissions. -->
9898
<!-- %%INSERT_PERMISSIONS -->
99+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
99100

100101
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
101102
Remove the comment if you do not require these default features. -->
Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
buildscript {
2-
repositories {
3-
jcenter()
4-
}
5-
6-
dependencies {
7-
classpath 'com.android.tools.build:gradle:2.2.3'
8-
}
2+
repositories {
3+
google()
4+
jcenter()
5+
}
6+
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:3.2.0'
9+
}
910
}
1011

11-
allprojects {
12-
repositories {
13-
jcenter()
14-
}
12+
repositories {
13+
google()
14+
jcenter()
1515
}
1616

1717
apply plugin: 'com.android.application'
1818

1919
dependencies {
20-
compile fileTree(dir: 'libs', include: ['*.jar'])
20+
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
2121
}
2222

2323
android {
24-
/*******************************************************
25-
* The following variables:
26-
* - androidBuildToolsVersion,
27-
* - androidCompileSdkVersion
28-
* - qt5AndroidDir - holds the path to qt android files
29-
* needed to build any Qt application
30-
* on Android.
31-
*
32-
* are defined in gradle.properties file. This file is
33-
* updated by QtCreator and androiddeployqt tools.
34-
* Changing them manually might break the compilation!
35-
*******************************************************/
36-
37-
compileSdkVersion androidCompileSdkVersion.toInteger()
38-
39-
buildToolsVersion androidBuildToolsVersion
40-
41-
sourceSets {
42-
main {
43-
manifest.srcFile 'AndroidManifest.xml'
44-
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
45-
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
46-
res.srcDirs = [qt5AndroidDir + '/res', 'res']
47-
resources.srcDirs = ['src']
48-
renderscript.srcDirs = ['src']
49-
assets.srcDirs = ['assets']
50-
jniLibs.srcDirs = ['libs']
51-
}
52-
}
53-
54-
lintOptions {
55-
abortOnError false
56-
}
24+
/*******************************************************
25+
* The following variables:
26+
* - androidBuildToolsVersion,
27+
* - androidCompileSdkVersion
28+
* - qt5AndroidDir - holds the path to qt android files
29+
* needed to build any Qt application
30+
* on Android.
31+
*
32+
* are defined in gradle.properties file. This file is
33+
* updated by QtCreator and androiddeployqt tools.
34+
* Changing them manually might break the compilation!
35+
*******************************************************/
36+
37+
compileSdkVersion androidCompileSdkVersion.toInteger()
38+
39+
buildToolsVersion androidBuildToolsVersion
40+
41+
sourceSets {
42+
main {
43+
manifest.srcFile 'AndroidManifest.xml'
44+
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
45+
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
46+
res.srcDirs = [qt5AndroidDir + '/res', 'res']
47+
resources.srcDirs = ['src']
48+
renderscript.srcDirs = ['src']
49+
assets.srcDirs = ['assets']
50+
jniLibs.srcDirs = ['libs']
51+
}
52+
}
53+
54+
lintOptions {
55+
abortOnError false
56+
}
5757
}

examples/service/AndroidServiceTest/main.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Window {
3636
Label {
3737
Layout.columnSpan: 2
3838
Layout.fillWidth: true
39-
text: "Service valid: " + control.serviceExists
39+
text: "Service valid: " + control.serviceExists()
4040
}
4141

4242
Button {

0 commit comments

Comments
 (0)