summaryrefslogtreecommitdiffstats
path: root/src/android/templates/AndroidManifest.xml
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kdab.com>2016-02-17 14:37:50 +0200
committerBogDan Vatra <bogdan@kdab.com>2016-02-17 14:29:58 +0000
commitefcf1dec4992bf7aab5bf1f0f4c0ee8c54030465 (patch)
tree5c46f66065750007a5dafdf7ca394af6f33c2b82 /src/android/templates/AndroidManifest.xml
parent4a7ccf74ff85a49e8c701a4d1c40f316b6fec4c5 (diff)
Say hello to Android Services
This changeset enables running a QCoreApplication from within an Android Service. The Android Application running can now have a QtActivity or a QtService, but having both in the same process is not supported. This patch was based on Cory Slep's patch [ChangeLog][Android] Qt can now be used to easily create Android Services. Task-number: QTBUG-37221 Change-Id: I0fd693daaa85b991940ffe9cc41c483022677199 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/android/templates/AndroidManifest.xml')
-rw-r--r--src/android/templates/AndroidManifest.xml55
1 files changed, 52 insertions, 3 deletions
diff --git a/src/android/templates/AndroidManifest.xml b/src/android/templates/AndroidManifest.xml
index 2a6d0b6fa3..02fd0ce23b 100644
--- a/src/android/templates/AndroidManifest.xml
+++ b/src/android/templates/AndroidManifest.xml
@@ -10,6 +10,11 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
+
+ <!-- Application arguments -->
+ <!-- meta-data android:name="android.app.arguments" android:value="arg1 arg2 arg3"/ -->
+ <!-- Application arguments -->
+
<meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
<meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
<meta-data android:name="android.app.repository" android:value="default"/>
@@ -32,9 +37,7 @@
<!-- Messages maps -->
<!-- Splash screen -->
- <!--
- <meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/>
- -->
+ <!-- meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/ -->
<!-- Splash screen -->
<!-- Background running -->
@@ -49,7 +52,53 @@
<meta-data android:name="android.app.auto_screen_scale_factor" android:value="false"/>
<!-- auto screen scale factor -->
</activity>
+
+ <!--service android:process=":qt" android:name="org.qtproject.qt5.android.bindings.QtService"-->
+ <!-- android:process=":qt" is needed to force the service to run on a separate process than the Activity -->
+
+ <!-- Application arguments -->
+ <!-- meta-data android:name="android.app.arguments" android:value="-service"/ -->
+ <!-- Application arguments -->
+ <!-- If you're using the same application (.so file) for activity and also for service, then you
+ need to use *android.app.arguments* to pass some arguments to your service in order to know which
+ one is which
+ -->
+
+ <!-- Ministro -->
+ <!-- meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
+ <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
+ <meta-data android:name="android.app.repository" android:value="default"/>
+ <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
+ <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/ -->
+ <!-- Ministro -->
+
+ <!-- Deploy Qt libs as part of package -->
+ <!-- meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
+ <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
+ <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/ -->
+ <!-- Deploy Qt libs as part of package -->
+
+ <!-- Run with local libs -->
+ <!-- meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
+ <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
+ <meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
+ <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
+ <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/ -->
+ <!-- Run with local libs -->
+
+ <!-- Messages maps -->
+ <!-- meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
+ <meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
+ <meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/ -->
+ <!-- Messages maps -->
+
+
+ <!-- Background running -->
+ <!-- meta-data android:name="android.app.background_running" android:value="true"/ -->
+ <!-- Background running -->
+ <!--/service -->
</application>
+
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>