Publishing for Android

Opus Pro has a publication type specifically for publication to devices using the Android operating system (predominantly mobile phones). The publication itself is simply an HTML5 publication but choosing the Android publishing option will let you package your Opus output into a standalone HTML5 app to be installed on the Android device and so will not need an internet connection.

Note:
HTML5 is only supported in Android v4.x and beyond.

Publication Type

Although Android publications are HTML5 there are some additional requirements for Android publications so this is presented as a different publication type which you should choose from the beginning when you select a New Publication.

In addition you should note that the performance of Opus HTML5 on Android devices will be dependent on the browser installed – older devices may not support all HTML5 features.

 

OpusScript on Android

Opusscript is a variation of javascript but is designed for use on a desktop. Some of the script functions which are available will work on desktop browsers but not on Android devices. We recommend you test fully and early in the design process. In some cases you will be able to use the new javascript action instead.

However, you should review the Publishing to HTML5 topic as this includes key information for your Android publication.

 

On the New Publication dialog choose the Android option.

image\ebx_-1843758754.jpg

Prerequisite – Install the JDK

In addition to Opus you will need to install the Java software development kit (JDK) which is available to download free-of-charge from:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

You will not need to use it yourself – Opus does all the work for you – but you should make a note of where you have installed it (particularly if you cannot install it to the default location) in case Opus can’t find it. You will need to be running with full Admin rights and preferably with the Windows User Account Control turned off.

All Android apps need to be "signed" to identify the creator and company publishing it and so that each product can be uniquely identified in the phone. Then any updates can be applied to the right product. This is done by using a key which you can set up via the Opus publishing process.

If you want to get a more detailed overview of how apps work then Google’s official information can be obtained here (but remember Opus does a lot of this work for you so not all of it is relevant)

Resizable Content

We recommend that any publication designed for Android should be resizable. This option is set via the Chapter Properties and can apply even to material published as a single DIV.

We recommend you set a minimum size for the content. If your content includes bitmap images you may prefer to set a maximum size as well to avoid the material becoming too pixelated. If you do not want a maximum size then simply uncheck the maximum size boxes.

image\ebx_1365220004.jpg

Icons

When creating an Android app you will also need an icon to represent your program on the phone screen. Infact you will need several at different sizes to cover all the different screen densities Android supports.

Screen pixel densities are the way Google prefers to characterise the screen resolution of a device as the actual number of pixels it will display in an area will effect the screen size and quality and is consistent across different phones, whilst the actual pixel dimensions of different phone screens vary.

Google specifies the following pixel densities for the icons which represent your app on the device screen. You do not need all the sizes but it is preferable if you want to ensure best quality on all devices. Thus you will need PNG graphics to represent your app in each of these sizes:

MDPI – Medium pixel density icon at 48x48 pixels

HDPI – High pixel density icon at 72x72 pixels

XHDPI – Extra High pixel density icon at 96x96 pixels

XXHDPI – Extra Extra High pixel density icon at 144x144 pixels

Publicatiion Title and Invalid Applications

By default Opus will use your publication title as the Android application name but please note that this may cause the APK to be invalid. Android APK do not allow special characters in the application name whereas Opus is less restrictive.

If you cannot install your APK on a phone and you get the error message "Invalid APK" this may be the reason so simply your application name.

Previewing your Publication

The Opus Preview does not emulate a smartphone, and the preview of HTML5 can also vary so you will need to test your publication regularly outside Opus. You will not want to create an Android apk file evrytime you do that. It will be more efficient and effective to create the HTML5 and test that , and only publish to Android once complete. We therefore recommend that you publish and test in an HTML5 browser on your development machine and then test key milestones or key functions regularly on a smartphone or one of the smartphone emulators you can find on the internet.

Publish Settings

There are a number of important settings specific to the Android package which allow your publication to be certified as an app. These are found in the Publish Settings which can be accessed from the Publication menu or from the Settings button on the final page of the Publish Wizard.

 

Related Topics:

Publish to HTML5

Publish Settings for Android