Android port

Experimental port of Stellarium to Android using not-yet-complete Android port of Qt, necessitas.

This is an experimental branch built on an incomplete library and is not yet ready for public consumption.

An official public release won't happen until some time after necessitas reaches Beta, and this port is sufficiently mature, whichever comes later; testing releases will probably start well before then.

You can build it at any time, though (see: Building for Android). If you want to help out in any way with development, it would be appreciated.

This page is development-centric right now; most of this will have to be spun off into another page at some point.

Note: There is a paidStellarium Mobile port for Android by Noktua Software. It is based on Fabien Chereau's Stellarium Mobile fork/port for Nokia smartphones. (For those who don't know, Fabien is Stellarium's original author. Noktua Software is a small company set up by Fabien and his brother.) There used to be another port on Google Play that used the same name without permission, but it apparently was taken down at the time the NS port was uploaded (some time in June 2012). Both apps are not related to the port discussed on this page - it uses a novel UI and it will not cost anything when it eventually makes it onto Google Play and elsewhere.

Some don't support ES 2. Based on IRC discussions, these plugins should be, whenever possible, doing their drawing through StelPainter and not accessing OpenGL directly

plugins know too much about the GUI; they access the concrete StelGui directly to create buttons, rather than the abstract StelGuiBase

Add pretty, Android-styled button icons

Decide on DPI buckets

Add a custom image provider for icons. This image provider will choose the correct icon based on the DPI bucket we're in. This process will be transparent to QML; all it needs to do is use use this image provider (e.g. Image{ source: "scaled://image.png" }), and it'll get the image from the correct bucket

Add search

...

Add settings screen

Create item types, a view, and a basic model

Hook items up to backend

Refine items, view and model

Have multiple list views working, along with categories

Complete the models (with most necessary settings)

Add locations screen

A specialized settings screen with a little image of the Earth and such

Design

Implement

Hook up to GPS/location/(orientation?) plugin

Plugin doesn't exist yet. QtMobility's location support looks like it supports desktop OSs, so this plugin would be useful for more than just mobile

This works; however, we need to manually fall back when we don't have the language+country, as this isn't handled by libintl-lite. For instance: if the locale requests "fr_CA" (which doesn't exist), we should fall back to "fr" (sans country code). Currently it just fails and falls back to "C" (English/US, the default)

Ensure that everything in QML is translatable, and in the gettext files

Accelerometer support

Fix large bugs and feature requests from pre-Alpha

Alpha testing

Optimize

Implement ETC1 texture compression

ETC1 may have issues with large chroma shifts, which could render it useless for us. If so, may have to use device-specific texture compression formats. => more work. We may want to move that way eventually anyways

scientes suggested on IRC that we might create a multiplatform Location plugin, using QtMobility's Location API. This API appears to support desktop as well as mobile clients.

the location API should supported by necessitas, but may require some minor Android-specific hacks. See [4] and [5]

Art

The following art is needed. Each section of art is accompanied with a link to the specification page describing what that piece of art is used for.

Raster artwork

Note that 1dp = 1px at 160dpi. Google recommends using a 3:4:6:8 scaling ratio for assets for screens of different densities; this means we'll end up having 4 sets of most every piece of art; to convert from dp to pixels for each of the groups:

Android artwork can be found in the AOSP repositories. The Android design site also has vector art, but it's under a somewhat vague license (unrestricted use to develop your apps). Much of the same art is available rasterized in AOSP's repository (under the Apache license 2.0) though.

Vector artwork

Vector artwork (in SVG format) can also be used. In that case, one can include them for as many of the above groups as desired. Simple icons may just be one image; more complex ones might have a simpler fallback for lower-DPI screens so that they don't end up as a blur.

Art grouping

Currently, the art resides in data/mobileGui in the following directories:

images-ldpi (low DPI; 0.75x scaling factor)

images-mdpi (medium DPI; 1.0x scaling factor)

images-hdpi (high DPI; 1.5x scaling factor)

images-xhdpi (extra-high DPI; 2.0x scaling factor)

images (used as a fallback if no images were found in the above directories; most vector art is here)

'Action bar' icons

The current thought is to imitate Android's Action Bar to provide a layout that's consistent with other Android apps. Standard size for an Action Bar icon in Android 4.0, according to the Android Design guidelines, is 32dp x 32dp.

The Action Bar itself is 48dp high.

The Action Bar logo (see Android_port/Specification; the icon on the far-left of the bar) should be larger than the other icons. It can be the same size as the launcher icon. In fact, it can be the same image as the launcher icon, or it can be a variant with larger margins, whatever works best.

There's more details in the guidelines, but Google says they should be flat (not shaded, outlined, or shadowed), pictographic, and #ffffff at 80% opacity (*** I think it's a good idea if we just do the opacity programatically. Make the image 100%, have Stellarium do 80% or 30% depending on if it's enabled or disabled. Halves the number of images we need to bother with...). If we diverge from that, we should keep things consistent.

If we're doing activated/deactivated icons like Stellarium does, the deactivated ones should probably still be fairly bright (near or at #ffffff). Mobile devices vary in screen quality, and are frequently used with low brightness settings and in adverse lighting conditions.

Icons. 32dp unless otherwise noted, and all four sizes are needed (see above):

Other art

the same size as the normal splash is probably fine; 512x512. Or anything smaller. Or larger, even. Will be placed in the center of the screen and scaled down uniformly until it fits in view

this is shown before the normal Stellarium splashscreen, but this one doesn't have a version # or anything else on it that isn't baked-in (so yes, we get two splash screens, so this should probably not be a repeat of the other one)

New issues

Known issues

Performance and CPU usage need to be looked at (above)

Check for NPOT texture support (driver may be returning true even if it's not)

do we care?

App should be suspended or outright killed when it's switched away from, as it continues to go full tilt and drain battery

need to (re)disable "Zoom to Fullscreen" option on tablets

it occasionally crashes very soon after starting; usually shortly after, or even during the loading screen

it may happen more frequently immediately after installing the app. The log and logcat output show nothing interesting.

this is associated with startup somehow; after the ~30 second mark, I've not seen it crash. I've had it running overnight unintentionally without instability.

this occurs on only one of my two devices, and somewhere deep in the GPU driver's code. May be a driver issue, though that doesn't mean we can't find a way to avoid it (assuming we're doing something to aggravate it, not necessitas, which is unclear)

Issues waiting for necessitas

necessitas bug #120 prevents us from using the package's Assets directory, as we would ideally do. For now, manually copy the files that get placed in stellarium/android/java/assets to /sdcard/stellarium on the device.

there's a fix that's yet to be reviewed

resuming the app (switching to another app, then back before Android closes it) results in a blank screen

Misc notes

Contributing

Building

Contributing

Right now, the main thing I need is development help. Please feel free to lend a hand; create a branch off the current one (see Building for Android) and go to town. Read above for means of communication.