summaryrefslogtreecommitdiffstats
path: root/src/android/java
Commit message (Collapse)AuthorAgeFilesLines
* Android: Really suspend apps that are put in the backgroundBogDan Vatra2014-07-312-0/+15
| | | | | | | | | | | | | | | | | | | The main event loop will be paused when an application is suspended, this is also the normal behavior of any Android application. When an application is suspended on Android all its Gl surfaces are destroyed and can't be used to render anymore. So, we need to pause the main event loop in order to pause all the timers which might trigger drawings. The event loop is resumed immediately after the application is foreground. AndroidManifest.xml contains more info about how to disable this behavior and what might happen if you do it. [ChangeLog][Android][Important Behavior Changes] The main event loop is now stopped when the app is suspended Task-number: QTBUG-36274 Change-Id: I4c0ba5df9d95f348bca67ea5c76865d6d20775e4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-051-0/+3
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * Android: Fix flashing on startup/shutdownEskil Abrahamsen Blomfeldt2014-06-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several issues on startup of the application which were caused by the fact that we would get the wrong available screen geometry on startup, set this as the initial surface size and then expose native windows with this size. This would cause first a flicker of white on the early expose and the window contents to jump around as the window was resized to the actual available space on screen. The fix for this is to postpone the first expose until we have actually got a proper screen size from the main layout. We use width,height = 0 as an indicator that the available geometry is not yet known, and we skip posting any expose events before this is set by the layout. In addition, since we removed the surface before we shut down the application, it was by a white rectangle before the shutdown transition happens, and this white rectangle will be animated instead of application contents. To rectify this, we make sure the last surface in the stack remains in the layout until it is either replaced by a different surface or until the application has shut down. This way, the shutdown animation will work on this surface instead. [ChangeLog][Android] Fixed regression where there would be flickering on startup and shutdown of the application. Task-number: QTBUG-38960 Change-Id: Ia1579ca8c522d8beeab066f78070ad49009d0238 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Android: Extract data for native style on startupBogDan Vatra2014-05-221-1/+16
|/ | | | | | | | | | | | | | | | | When Ministro is not in use, we need to extract style information on startup in order for the native Android style to work. The code to extract data from the device is contributed from the Ministro project. [ChangeLog][Android] Enable using native style also when Ministro deployment mechanism is not in use. Task-number: QTBUG-36019 Change-Id: I2afef5219b4e8fbb2f3e387cbc5e570da1f41011 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Change Ministro's source to 5.3BogDan Vatra2014-03-271-1/+1
| | | | | | Task-number: QTBUG-37879 Change-Id: If9a3f38a5dc267862a166ac4c8e6940739eab911 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: REG: Fix launching intentsEskil Abrahamsen Blomfeldt2014-03-271-1/+1
| | | | | | | | | | | | | | | When the launch mode is singleInstance, then intents will not be launched as activities inside the same task, but as separate tasks, and onActivityResult() is always called immediately without any data. This is documented in various stack overflows and google group messages if you search for it on the Internet, and the singleInstance launch mode is documented as "not recommended for normal use". This broke e.g. automatic downloads of Ministro. The singleTop launch mode seems more like what we're after, and fixes both the original issue as well as the current problem with intents. Change-Id: Iab24a654a4433f979064509b1ef721db9ef352af Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Set default activity launchMode to singleInstanceBogDan Vatra2014-03-251-1/+2
| | | | | | | | | | This attriute is needed otherwise if the user puts the application in background and uses the appication icon to bring it back in front, andriod will create a new activity. Task-number: QTBUG-37186 Change-Id: Icdc87239c1a07a3e555296692a4866eb6351348e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* REG: Fix compilation with old AndroidManifest.xmlEskil Abrahamsen Blomfeldt2014-03-211-0/+2
| | | | | | | | | | | | | | | | | | For apps created with Qt 5.2.1, the AndroidManifest.xml will contain a reference to android.app.splash_screen, which was removed from the application template when the splash screen functionality was fixed by 4d08d80be60af14c5daed7c6f8d37538aea6c429. To make sure existing apps still compile, we put back a dummy splash.xml so that the reference in existing manifests still work. If this splash screen was actually used for something, it will no longer show up, so we also need to document that people should update their AndroidManifest.xml to the new system, but we can't inform people via mysterious compilation failures :) Task-number: QTBUG-37493 Change-Id: I6289f9b5e2c315fa6db502cbde27bd18e15f1f8d Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Make android non-prefix shadow build usableSamuel Gaist2014-03-141-0/+14
| | | | | | | | | | Until now android developer build was not usable due to missing files. These files are only available after a make install. This patch aims to add that copy phase when building. Task-number: QTBUG-36901 Change-Id: If0a7e982899b8c18495c7cb6508184fa153b239d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Pass the APPLICATION_PARAMETERS variable if defined.BogDan Vatra2014-03-061-5/+9
| | | | | Change-Id: I2a3c049db43bbd0a2c373dae9e9ac1395c099b74 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Add commercial license to BSD-licensed filesEskil Abrahamsen Blomfeldt2014-03-044-0/+40
| | | | | | | | | These files should also be usable under the commercial license terms as an alternative to the BSD license. Change-Id: If211bb63789722f655843831073ed05ee69811ea Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Android: Make default permissions less confusingEskil Abrahamsen Blomfeldt2014-02-261-2/+7
| | | | | | | | | | Add comments to explain the magic placeholders for default permissions and features, and move the INTERNET and WRITE_EXTERNAL_STORAGE permissions from the manifest so that we use the same mechanism for all default permissions. Change-Id: Ia62dd4314c1c10eb201b5203772ffe88b1ce7a04 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Rework the splash screen for Android.BogDan Vatra2014-02-214-17/+7
| | | | | | | | | | | | | Allow the developers to define a splash screen which will be visible until the first window is created. [ChangeLog][Android] Allow the developers to define a splash screen which will be visible until the first window is created. Task-number: QTBUG-30652 Change-Id: I5da80be417ffffb03e66009f45745d4b387d2912 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix Use android theme when definedThorsten Zachmann2014-01-111-8/+16
| | | | | | | | | | | It is possible to define the theme to use for android in the AndroidManifest.xml. If it is defined in the activity qt itself should not overwrite it. The change uses the defined style in case it is given in the AndroidManifest.xml. This seems to fix also QTBUG-35151. Task-number: QTBUG-35050 Change-Id: I8b55c02ca1ecd7baa5f2f9460d154095aacf015f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Overwrite plugin cache when APK is updatedEskil Abrahamsen Blomfeldt2014-01-031-10/+116
| | | | | | | | | | | | | | | | | | | | | | | | | To allow updating APKs with new versions of Qt, we need to delete the old cache when the APK is updated. This patch does two things: 1. Move the plugins (and imports/qml) into a directory called qt-reserved-files/ to better separate the cache from the rest of the application. The first time the files are put here, we will delete the old cache in <datadir>/plugins, <datadir>/imports and <datadir>/qml if they exist to avoid leaving old files around forever. 2. Add versioning to the cache and flush it every time the APK is reinstalled. Potentially, the libraries in the APK can change for every reinstall, so this is the safest approach. Task-number: QTBUG-35129 [ChangeLog][Android][QTBUG-35129] Update deployed plugins and imports when APK is updated on the device. Change-Id: Ie38b639db2cfba8a521acc875c4afd5e07df3efd Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-052-2/+2
|\ | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_post.prf tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp Change-Id: Iaba97eed2272bccf54289640b8197d40e22f7bf5
| * Default to 5.2 source repository for Qt 5.2.xBogDan Vatra2013-12-032-2/+2
| | | | | | | | | | | | | | | | | | We can't use latest anymore because the qreal change is not back compatible and all the apps that used latest will stop to run when Ministro will upgrade the libs. Change-Id: I5286e72eccf86b4dead773a637aa28e29d120605 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Report hardware acceleration in default manifestEskil Abrahamsen Blomfeldt2013-12-041-1/+1
|/ | | | | | | | | | | | | | | Qt applications require the "hardwareAccelerated" flag set on some devices or Android versions. The symptoms that this was missing was problems when handling orientation changes. When the target SDK version is >= 14, it is true by default, but for lower versions it is not. There is no reason to set this to false for a Qt application, since we don't use any of the unsupported 2D drawing operations in the documentation, so lets just set it to true for all applications. Task-number: QTBUG-35293 Change-Id: Ie131a52a2a3fc5a520d0c5dd5d64f79269e9b6b5 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android native message dialogBogDan Vatra2013-11-091-3/+3
| | | | | Change-Id: Ief8c3ce3b8683c6960f046245844c1835a327d51 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: Allow modules to specify permissions/featuresEskil Abrahamsen Blomfeldt2013-11-071-0/+2
| | | | | | | | | | | | Some modules, such as Qt Multimedia, needs special permissions to avoid getting exceptions at run-time. We should apply these by default to the AndroidManifest.xml so that an application using e.g. the camera will work out of the box. Task-number: QTBUG-33953 Change-Id: Ibc1f086d249197b63e7ed1075ae7d54bdd1212f2 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: allow installing apps to SD card by defaultPaul Olav Tvete2013-11-071-1/+1
| | | | | | | Task-number: QTBUG-34423 Change-Id: I3b2c8a12b113a35f8b8454191d8ba8832d9fd995 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix menu on API-11+BogDan Vatra2013-11-061-1/+14
| | | | | | | | | | | On API-11+ if there is no hardware menu button show the action bar. Fix menu when using the opengl android plugin. Task-number: QTBUG-32002 Change-Id: I45bd49107621e4cab85eb6411897229e20bb8281 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: prevent main activity to be recreated.BogDan Vatra2013-11-061-1/+1
| | | | | | | | Add more config changes needed for API 13+ API 13+ is mandatory to build any Qt for Android application. Change-Id: I595f7174dd2fc8a0865772f9780ce606e1f1fcf1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove android specific qmake variables.BogDan Vatra2013-10-311-1/+1
| | | | | Change-Id: Iba2b929ba70588ffcbcc9395501753521cfe5154 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Allow the user to specify a theme list.BogDan Vatra2013-10-291-27/+58
| | | | | | | | | Cleanup the theme handling. Set default theme, needed by native dialogs. Needs Ministro v9.6+. Change-Id: Ia131edd8712b7737d3118d714c7772adb8f27acd Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix deploy mechanism.BogDan Vatra2013-10-231-2/+2
| | | | | | | | | The order of "android:value" and "android:name" attributes can be changed when saving the XML document. Use placeholders instead. Change-Id: I9a97bb0df2d2d16c8a9443a21ce7d3290e0ab466 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Move untranslatable stings to AndroidManifest.xmlBogDan Vatra2013-10-233-13/+8
| | | | | | | strings.xml file is used to store strings that can/should be internationalized. Change-Id: I2fc305b6917752e9f502bd4beb172205ba4f9fba Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Make it possible to pass arguments via intent extrasEskil Abrahamsen Blomfeldt2013-10-161-0/+8
| | | | | | | | | | | | | | | Needed for autotest script, so that we can pass command line arguments to Qt Test. This can now be done by: % adb shell am start \ -e applicationArguments "argument1 argument2" \ <INTENT> Change-Id: I772209f66da055c6a0b01b709f36e33fdb5c2ed6 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix black screen when changing orientationEskil Abrahamsen Blomfeldt2013-10-091-1/+1
| | | | | | | | | | | When targeting API level 13 or higher, you need to explicitly subscribe to configuration changes for screen size, otherwise surfaceChanged() will not be called when you change the orientation of the screen. Task-number: QTBUG-33140 Change-Id: I48fd1d298c408802d1743736f62128cd0eec8983 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Remove logic which changes install rules inside Qt dirEskil Abrahamsen Blomfeldt2013-09-261-1/+1
| | | | | | | | | | | | | | A common problem is that examples and other apps are unusable on Android when they are inside the Qt directory. There doesn't really seem to be any good reason for having a special case in place, since this will only affect applications which are not built with the host toolchain, and we aren't building any command line apps for the target devices. So the only thing this will affect are the examples and we want those to be installed into the correct path. Change-Id: Ibae365e06eb77944f11e596c16c3c5baf798848c Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Add tokens for androiddeployqt in template filesEskil Abrahamsen Blomfeldt2013-09-193-20/+41
| | | | | | | | | Make it possible for the androiddeployqt tool to replace certain parts of the template with data from the .pro file. Task-number: QTBUG-32856 Change-Id: Iaedd2076bc1ea5dac0b94624c0ba3a755d2a08f3 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Fix Android Style plugin.BogDan Vatra2013-09-102-4/+13
| | | | | | | | Task-number: QTBUG-29565 Change-Id: Iedb861962e3638bcbdf9d9a72a47bebc63b425b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Add default values for min and target SDKsEskil Abrahamsen Blomfeldt2013-08-211-0/+1
| | | | | | | | | | | | The minimum SDK version supported should be set to 9, since this is required by Qt. We also set the target SDK version to 14, since this will remove certain compatibility features, like the overflow button in the action bar. Task-number: QTBUG-30860 Change-Id: Iddd0eba2e802d03c5fe6e9b5da626808bbbad71d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: handle keyboard connect/disconnectPaul Olav Tvete2013-06-211-1/+1
| | | | | | | | | | | | Even though the documentation says that "This should never normally happen", we do get a "navigation" change when an external keyboard is connected or disconnected. Thanks to BogDan for finding the solution. Task-number: QTBUG-31806 Change-Id: Id92639800e617821976f842f93e09517529e14ef Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Never show EGLFS mouse cursor in Qt for Android platform pluginEskil Abrahamsen Blomfeldt2013-05-201-1/+0
| | | | | | | | | | | | | The hack to use the environment variable for turning off the mouse cursor is broken when running against Ministro, because Ministro does not pass the environment on. A better solution is to make it possible to turn the cursor in the EGLFS plugin off in the hooks instead. Task-number: QTBUG-30553 Change-Id: Id09b48c350d2c95de9bb174f7480cf0cd2bf8145 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Android: Change default Ministro download locationEskil Abrahamsen Blomfeldt2013-05-072-2/+2
| | | | | | | | | Set up for downloading from the qt-project.org servers instead of KDE servers. Change-Id: I6f9e69f91ea956165300d75109e1683d0b1aa5f0 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Make it possible to bundle Qt libraries in Android apkEskil Abrahamsen Blomfeldt2013-05-014-4/+126
| | | | | | | | | | | | | | | | | | | | | | Add the enablers so that Qt Creator (or another deployment tool) can add a specification in the app's meta data of which libraries are bundled and the Java code required to extract plugins and imports into the required directory structure inside the app's data directory. This is intended to be an alternative to using Ministro for deployment, and the mechanism of extracting libraries on first startup is a work-around for the requirement in Qt of having this directory structure. For Qt 5.2, the approach should be changed to load plugins directly from the app's lib directory and the other files in imports will be bundled as qrcs in the native plugins. Task-number: QTBUG-30751 Change-Id: Ibdb3a672548b4802f9bf3ecd05fc194426ac30e7 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Update java part for Ministro 9.xBogDan Vatra2013-04-057-36/+63
| | | | | | | Add default source and repository. Change-Id: Idfa7936e8a2879fad9944702c2aa5c6d4638185a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: use Fusion style by defaultPaul Olav Tvete2013-04-051-2/+3
| | | | | | | | | | | The Android style is not fully implemented yet, so prefer the Fusion style by default. Task-number: QTBUG-29565 Change-Id: Ida413e6b34a41b618b8e2206688922195ffcc519 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Also version.xml needs to be installedBogDan Vatra2013-04-031-0/+1
| | | | | | | | | This file is used by QtCreator to decide if the java files need to be updated. Change-Id: Ib4875c32a071dd768f89950582c81ccdd420feca Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Use qtproject instead of necessitas for default package namePaul Olav Tvete2013-03-221-1/+1
| | | | | | Task-number: QTCREATORBUG-8779 Change-Id: Idf62e5efa4b8bc4b90d99b3883ae127a0cc7e92c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix installation of Android java filesEskil Abrahamsen Blomfeldt2013-03-221-0/+2
| | | | | | | | | | | | | The installation of the java files does not depend on Qt, so it can be built before the rest of Qt, which means we need to remove the default dependency in qmake, otherwise we can get an error message: Project ERROR: Unknown module(s) in QT: gui core Change-Id: Ibb968acf6ec06c91ccfd5002e08c93c96a209934 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Android: Fix use_local_libs when running from launcherEskil Abrahamsen Blomfeldt2013-03-212-17/+20
| | | | | | | | | | | Use persistent data to specify the alternative location of Qt libraries instead of command line arguments, so that the application can be run from the launcher and not just from Qt Creator. Task-number: QTCREATORBUG-8643 Change-Id: I72df2905f3f35a3b924edd47d3a5387e674c97ac Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: install java-related filesPaul Olav Tvete2013-03-121-0/+8
| | | | | | | | The jar files are deployed on the device. The files in the java directory are used by creator when making a new project. Change-Id: Ie59f40edaa9c10044a1ca9949808ee22e6622ea1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Introducing the Qt Android portPaul Olav Tvete2013-03-0528-0/+1704
Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> hjk <hjk121@nokiamail.com> Oswald Buddenhagen <oswald.buddenhagen@digia.com> Paul Olav Tvete <paul.tvete@digia.com> Robin Burchell <robin+qt@viroteck.net> Samuel Rødal <samuel.rodal@digia.com> Yoann Lopes <yoann.lopes@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>