summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/src/androidjnimain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Support multiple native surfaces on Android.BogDan Vatra2014-01-171-884/+0
| | | | | | | | | | | | | | | | Support for multiple native surfaces is needed by applications that need to mix raster windows with GL windows. Rework the raster and opengl implementation, get rid of eglfs and fbconvenience dependencies. Create a single android platform plugin. [ChangeLog][Android] Rework the raster and opengl implementation. [ChangeLog][Android] Create a single android platform plugin. Task-number: QTBUG-34650 Change-Id: I9b1ab51554823329dda8cfbf8fef27c38f917c7b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Don't send ApplicationStateChanged, if platformIntegration is not set.BogDan Vatra2013-11-211-1/+2
| | | | | | | | Task-number: QTBUG-34868 Change-Id: Ia86877550884a3037b9ddedf5d8e227ec1ead2d6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android native message dialogBogDan Vatra2013-11-091-1/+3
| | | | | Change-Id: Ief8c3ce3b8683c6960f046245844c1835a327d51 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add better version checks for accessibilityFrederik Gladhorn2013-11-051-1/+16
| | | | | | | | | | | We would spam the debug output on devices with api < 16 with some warnings that the super class a11y delegate could not be found and others. Instead check the runtime version before trying to load the JNI code and only load the delegate if api is new enough. Change-Id: I52286cb99924b034b9b58c53566f15030939b0c9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Differ between ShowMaximized and ShowFullScreenEskil Abrahamsen Blomfeldt2013-11-011-0/+34
| | | | | | | | | | | | The default is now ShowMaximized which behaves as it did before, i.e. each window will fill the screen but the status bar will be visible. Calling showFullScreen() explicitly will now hide the status bar to maximize the amount of screen real estate occupied by the application. Task-number: QTBUG-33135 Change-Id: If0d0a2ab72f8026e76818290e2b953dbc0dec156 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Remove unused field.BogDan Vatra2013-11-011-7/+0
| | | | | | | Fix crash on Android 4.4 Change-Id: Ibee584c0154b0b116af58477302e7e8385f0290d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Don't crash if the screen is not yet initialized.BogDan Vatra2013-10-281-2/+4
| | | | | Change-Id: I4751c2dec5780f42b348a8a8ea628f65d548dcec Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Fix repaint on rotationEskil Abrahamsen Blomfeldt2013-10-251-12/+3
| | | | | | | | | | | | | After f89f099c55576992b39a8021aace64ff32747624, we no longer post a geometry-change and expose event when calling setGeometry, which the Android plugin depended on. This caused the window to stay the same size when it was resized by orientation changes. We put back the events in the code that calls setGeometry() instead. Task-number: QTBUG-32878 Change-Id: I449515dda07c839e0991c5a7031a972ca9c74dff Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Make it possible to pass arguments via intent extrasEskil Abrahamsen Blomfeldt2013-10-161-5/+2
| | | | | | | | | | | | | | | 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: remove environment variable warnings at app startup.Yoann Lopes2013-09-251-1/+1
| | | | | Change-Id: I8542809fd16465a29b4fb7e8276b63d71e1b9c0e Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: handle inverted orientationsPaul Olav Tvete2013-09-201-11/+31
| | | | | | | | | | Add logic to detect InvertedPortrait and InvertedLandscape orientations and implement QPlatformScreen::nativeOrientation() for Android. Task-number: QTBUG-32144 Change-Id: I294506714ea0faa9eacd7a15e1cfc45342659964 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-18/+22
|\ | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| * Android: Fix orientation change on Android 4.3Eskil Abrahamsen Blomfeldt2013-08-191-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Android 4.3, we will get a new native window pointer for the same surface (the old surface has not been destroyed), whereas before we would get the same pointer, thus hitting the "sameNativeWindow" branch. This revealed some bugs in the surfaceChanged code path when the old surface had not been destroyed. This path is now taken both when there's no old surface (the app has been suspended in the mean time) and when the orientation changes. To handle the second case, we need to make sure: 1. We update the static pointer 2. We update the pointers in the platform windows 3. We don't add a second reference to the static data for windows 4. We schedule an update of the window size Task-number: QTBUG-32878 Change-Id: I47257615f9ba820315fc98d7a804e52223f430bf Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Android: added ApplicationState capability.Yoann Lopes2013-08-281-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | The application state is tied to the QtActivity lifecycle. Mapping of states between Android and Qt is as follows: onResume --> ApplicationActive onPause --> ApplicationInactive onStop --> ApplicationSuspended Change-Id: Iefef08d6c7a7fde28fba1f4886882458cda6a0c0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Accessibility for AndroidFrederik Gladhorn2013-08-221-1/+3
|/ | | | | | | | | | | | | | | | This enables both modes for TalkBack, explore-by-touch and the normal swiping mode. It is partially inspired by the BarGraphView example of the Google/Android Eyes-Free project. Note that for any accessibility to work you'll need a device with api level 16 at least. Using reflection we should be able to dynamically pick up the classes if we have the high enough api level. Change-Id: I11b93bead451483782a1711434d45c8f9a35996f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Don't crash when displaying multiple top-levelsEskil Abrahamsen Blomfeldt2013-04-181-7/+12
| | | | | | | | | | | | | | | | | | | | | | While the raster platform plugin supports multiple top level windows, this is not supported on the GL plugin, so if you use GL or QtQuick2 in your app and use several top levels, the app would crash with an error message. A problem is that the top-level SurfaceView is a special overlay View and does not support being stacked in a layout. So instead, we let all windows share the same GL surface and draw on top of each other. This works fine for simple use cases. We implement a new platform capability to make sure no top level windows (even combobox popups and dialogs) get non-fullscreen geometries. That has never worked properly with the eglfs plugin. Task-number: QTBUG-30473 Change-Id: Ia1438019638fc739cc93ffe79b46b81631254df2 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Remove code for Android API level < 9Eskil Abrahamsen Blomfeldt2013-04-151-35/+2
| | | | | | | | We don't support API levels < 9, so we can simplify this code a little. Change-Id: I9823d4c5a44d265e03dec0ceedeeb3c34a1e1eab Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: set logicalDpi based on DisplayMetrics.scaledDensityPaul Olav Tvete2013-04-051-2/+9
| | | | | | | | | | | | | | The mathematically correct way would be to set logicalDPi to 160*scaledDensity, but then a 12 pt font would be gigantic. On iOS, we use a factor of 72 to be compatible with the native APIs, but that means that a 12 pt font is very small. A factor of 100 means that desktop apps look reasonable by default. Task-number: QTBUG-29674 Change-Id: I607f110150fb95685a6980b92f6f92f2b489f959 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove QtWidgets dependency from Android platform pluginEskil Abrahamsen Blomfeldt2013-03-221-24/+3
| | | | | | | | | | | The setFullScreen() function was never called from anywhere, so it was just removed. The update() loop for top level widgets has been replaced by a loop sending expose events to top level windows. Task-number: QTBUG-29313 Change-Id: Ic31a05ad3a0693f1d3f61457cee9d78f6b334b4d Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix multi-touch input on AndroidEskil Abrahamsen Blomfeldt2013-03-121-0/+6
| | | | | | | | | The touch events were collected but then thrown away because of a missing port of he handleTouchEvent() function call. Task-number: QTBUG-29126 Change-Id: I02f7380945be04a36da14a89f2f3ff9429b17cbc Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Introducing the Qt Android portPaul Olav Tvete2013-03-051-0/+839
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>