/usr/share/doc/renpy/html/android.html is in renpy-doc 6.17.6-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Android — Ren'Py Documentation</title>
<link rel="stylesheet" href="_static/screen.css" type="text/css" media="screen, projection"/>
<link rel="stylesheet" href="_static/renpydoc.css" type="text/css" media="print" />
<!--[if lt IE 8]>
<link rel="stylesheet" href="_static/renpydoc.css" type="text/css" media="screen, projection"/>
<![endif]-->
<link rel="stylesheet" href="_static/renpydoc.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '6.18.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="Ren'Py Documentation" href="index.html" />
<link rel="next" title="Dealing with Problems" href="problems.html" />
<link rel="prev" title="Web Updater" href="updater.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="problems.html" title="Dealing with Problems"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="updater.html" title="Web Updater"
accesskey="P">previous</a> |</li>
<li> <img src="_static/logo.png" width=19 height=21 align=center>
<li> <a href="http://www.renpy.org/">Ren'Py Home</a> |
<li><a href="index.html">Ren'Py Documentation</a></li>
</ul>
</div>
<div class="container">
<div class="span4">
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Android</a><ul>
<li><a class="reference internal" href="#user-instructions">User Instructions</a></li>
<li><a class="reference internal" href="#platform-differences">Platform Differences</a></li>
<li><a class="reference internal" href="#testing-and-emulation">Testing and Emulation</a></li>
<li><a class="reference internal" href="#building-android-applications">Building Android Applications</a><ul>
<li><a class="reference internal" href="#step-1-installing-the-dependencies">Step 1: Installing the Dependencies</a></li>
<li><a class="reference internal" href="#step-2-set-up-the-android-sdk-and-development-environment">Step 2: Set up the Android SDK and Development Environment</a></li>
<li><a class="reference internal" href="#step-3-configure-your-game">Step 3: Configure Your Game</a></li>
<li><a class="reference internal" href="#step-4-build-and-install-the-package">Step 4: Build and Install the Package</a></li>
</ul>
</li>
<li><a class="reference internal" href="#viewing-debug-output">Viewing Debug Output</a></li>
<li><a class="reference internal" href="#icon-and-presplash-images">Icon and Presplash Images</a></li>
<li><a class="reference internal" href="#google-play-expansion-apks">Google Play Expansion APKs</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="updater.html"
title="previous chapter">Web Updater</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="problems.html"
title="next chapter">Dealing with Problems</a></p>
<h4>Search</h4>
<div id="cse-search-form" style="width: 100%;"></div>
<div class="copydata">
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
<br>
</div>
</div>
</div>
</div>
<div class="document span20 last">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="android">
<h1>Android<a class="headerlink" href="#android" title="Permalink to this headline">¶</a></h1>
<p>Ren'Py support devices running the Android operating system, such as
smartphones and tablets. While these devices do not support 100% of
Ren'Py's functionality, with minimal modification code can be packaged
and ported to these devices.</p>
<p>RAPT - the Ren'Py Android Packaging Tool - is a program, downloaded separately
from Ren'Py, that creates an Android package for testing or release purposes.</p>
<div class="section" id="user-instructions">
<h2>User Instructions<a class="headerlink" href="#user-instructions" title="Permalink to this headline">¶</a></h2>
<p>When a Ren'Py game has been launched on Android, the following
keybindings work:</p>
<dl class="docutils">
<dt><cite>Home</cite></dt>
<dd>Returns to the Android home screen, suspending the Ren'Py
game. As part of the suspend process, Ren'Py will automatically
save the game. If necessary, the save will be automatically
loaded when the user returns to the game.</dd>
<dt><cite>Menu</cite></dt>
<dd>Brings up the in-game menu, and returns to the game.</dd>
<dt><cite>Back</cite></dt>
<dd>Rolls back.</dd>
<dt><cite>Volume Up</cite>, <cite>Volume Down</cite></dt>
<dd>Controls Android's media volume.</dd>
</dl>
</div>
<div class="section" id="platform-differences">
<h2>Platform Differences<a class="headerlink" href="#platform-differences" title="Permalink to this headline">¶</a></h2>
<p>There are many important differences between the touch-based Android
platform and the mouse-based platforms that Ren'Py supports. Changes
due to the Android software and hardware are:</p>
<ul class="simple">
<li>The touchscreen is treated as if it was a mouse. However, it will
only produce mouse events when the user is actively touching the
screen. When the user is not touching the screen, the virtual
pointer will move to the upper-left corner of the screen.</li>
<li>Movie playback is only supported in fullscreen mode, and only with
media formats that are supported by Android devices. See
<a class="reference external" href="http://developer.android.com/guide/appendix/media-formats.html">this page</a>
for a list of supported video formats.</li>
<li>Ren'Py cannot change the device volume. However, the android volume
buttons work normally.</li>
</ul>
<p>In addition, there are a few changes that may be necessary due to
human factors:</p>
<ul class="simple">
<li>Since Android smartphones can be smaller than a computer monitor, it
may be necessary to increase text size.</li>
<li>Since touch input is less accurate than mouse input, touch-based
buttons need to be larger than mouse-based ones.</li>
</ul>
<p>To help you adapt to these differences, Ren'Py for Android
automatically selects screen variants based on the
device's screen size and capabilities. See <a class="reference internal" href="screens.html#screen-variants"><em>Screen Variants</em></a> for
more information.</p>
</div>
<div class="section" id="testing-and-emulation">
<h2>Testing and Emulation<a class="headerlink" href="#testing-and-emulation" title="Permalink to this headline">¶</a></h2>
<p>For testing purposes, Ren'Py supports three Android emulation modes. These
are accessed from the Android screen of the launcher.</p>
<dl class="docutils">
<dt>Phone</dt>
<dd>This mode emulates an Android phone. Touch emulation is performed
using the mouse, but only when the mouse button is held down. Escape
is mapped to the menu button, and Page Up is mapped to the back button.</dd>
<dt>Tablet</dt>
<dd>This mode emulates an Android tablet. Touch emulation is performed
using the mouse, but only when the mouse button is held down. Escape
is mapped to the menu button, and Page Up is mapped to the back button.</dd>
<dt>Television / OUYA</dt>
<dd><p class="first">This mode emulates a television-based Android device, such as the OUYA
console. The keyboard is mapped to remote or controller input, with the
arrow keys providing navigation. Select is enter, Escape is menu, and
page-up is back.</p>
<p class="last">This mode also displays an overlay showing the Television-unsafe area.
Content in the Television-unsafe area may not display on all Televisions.</p>
</dd>
</dl>
<p>While these emulators can be used to quickly test your project, it's best to
also test on real hardware. The emulators do not deal with some human-factors
issues, like the size of a user's fingers.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">orphan:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="building-android-applications">
<h2>Building Android Applications<a class="headerlink" href="#building-android-applications" title="Permalink to this headline">¶</a></h2>
<p>Ren'Py contains tools that help you take a packaging-centric approach
to Android game development. In this approach, you will use a PC to
build an Android package and upload it to your device. You can then
run the game like any Android application. When it works correctly,
you can upload the package you make to Google Play and other app
stores.</p>
<p>Building an Android application takes four or five steps:</p>
<ol class="arabic simple">
<li>Download and install RAPT, the Java Development Kit,
and Android USB Drivers (scroll down for links).</li>
<li>Use the launcher to install the Android SDK and create keys.</li>
<li>Use the launcher to configure the Android build.</li>
<li>Use the launcher to build the Android application.</li>
</ol>
<p>Once you've finished these steps, you'll have a runnable Android
package. You'll only need to run step 3 when you decide to make changes to your
game's configuration or when configuring a new game entirely; you'll run step
4 most often, whenever you need to make a new build of your game.</p>
<div class="section" id="step-1-installing-the-dependencies">
<h3>Step 1: Installing the Dependencies<a class="headerlink" href="#step-1-installing-the-dependencies" title="Permalink to this headline">¶</a></h3>
<p>There are three things you may need to manually download and install
before you can build packages:</p>
<p><strong>Java Development Kit.</strong>
The Java Development Kit (JDK) contains several tools that are used by
RAPT, including the tools used to generate keys and sign
packages. It can be downloaded from:</p>
<blockquote>
<div><a class="reference external" href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a></div></blockquote>
<p>Please note that the developer-focused JDK is different from the
user-focused JRE, and you'll need the JDK to create Android packages.</p>
<p><strong>Android Device Drivers.</strong>
On Windows, you may want to install a device driver to access
your device, although this is not necessary. Links to android device drivers can be found at:</p>
<blockquote>
<div><a class="reference external" href="http://developer.android.com/sdk/oem-usb.html">http://developer.android.com/sdk/oem-usb.html</a></div></blockquote>
<p>On Linux or OS X, you won't need a device driver. If you can't access
your device, you may need to read:</p>
<blockquote>
<div><a class="reference external" href="http://developer.android.com/guide/developing/device.html#setting-up">http://developer.android.com/guide/developing/device.html#setting-up</a></div></blockquote>
<p>However, modern versions of Linux and OS X should just work.</p>
<p><strong>RAPT.</strong>
The latest version of RAPT can be downloaded from:</p>
<blockquote>
<div><a class="reference external" href="http://www.renpy.org/dl/android">http://www.renpy.org/dl/android</a></div></blockquote>
<p>Once RAPT has been downloaded, you should unpack it inside the
Ren'Py directory. (The directory that contains renpy.exe, renpy.sh,
and the Ren'Py app.) Then restart the launcher to ensure that it
detects the presence of RAPT.</p>
</div>
<div class="section" id="step-2-set-up-the-android-sdk-and-development-environment">
<h3>Step 2: Set up the Android SDK and Development Environment<a class="headerlink" href="#step-2-set-up-the-android-sdk-and-development-environment" title="Permalink to this headline">¶</a></h3>
<p>The next step is to set up the Android SDK and the rest of your
development environment. This step will:</p>
<ul class="simple">
<li>Check that the JDK is installed properly.</li>
<li>Install Apache Ant.</li>
<li>Install the Android SDK.</li>
<li>Use the Android SDK to install the appropriate development
packages.</li>
<li>Create a signing key that will be used to sign packages that are
placed on the market (android.keystore: this will be generated in the
RAPT directory).</li>
</ul>
<p>This step requires Internet access.</p>
<p>To perform this step, choose "Install SDK & Create Keys" from the
Android screen in the Ren'Py Launcher.</p>
<p>RAPT will report on what it's doing. It will also prompt you with
warnings about licenses, and ask if you want it to generate a key.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p>The key generated by RAPT is created with a standard
passphrase. You should really use keytool to generate your own
signing keys.</p>
<blockquote>
<div><a class="reference external" href="http://docs.oracle.com/javase/1.3/docs/tooldocs/win32/keytool.html">http://docs.oracle.com/javase/1.3/docs/tooldocs/win32/keytool.html</a></div></blockquote>
<p class="last">At the very least, you should keep the android.keystore file in
a safe place. You should also back it up, because without the
key, you won't be able to upload the generated applications.</p>
</div>
</div>
<div class="section" id="step-3-configure-your-game">
<h3>Step 3: Configure Your Game<a class="headerlink" href="#step-3-configure-your-game" title="Permalink to this headline">¶</a></h3>
<p>Before building a package, you must give Ren'Py some information
about the Android build of your game. To do this, choose "Configure"
from the Android screen of the Ren'Py launcher.</p>
<p>If you need to change the information - for example, if you release a
new version of your game - you can re-run the configure command. Your
previous choices will be remembered.</p>
</div>
<div class="section" id="step-4-build-and-install-the-package">
<h3>Step 4: Build and Install the Package<a class="headerlink" href="#step-4-build-and-install-the-package" title="Permalink to this headline">¶</a></h3>
<p>Finally, you can build and install the package. This is done with a
by connecting your Android device to your computer, and choosing
"Build & Install" from the Android screen of the Ren'Py launcher.
(The first time you install, your Android device may ask you
to authorize your computer to install applications.)</p>
<p>If you'd rather copy the game's apk file to your Android device manually,
choose "Build Package" from the Android screen of the Ren'Py launcher. Then
navigate to the 'bin' directory underneath the RAPT directory and copy the
file mygame-release.apk into your Android Device. You will then need to find
the .apk file in your Android device using a file manager application and
open it to install the game.</p>
</div>
</div>
<div class="section" id="viewing-debug-output">
<h2>Viewing Debug Output<a class="headerlink" href="#viewing-debug-output" title="Permalink to this headline">¶</a></h2>
<p>Debug output can be found by running the adb command manually from
the terminal. After installing the SDK, the adb command can be
found as <cite>rapt-dir</cite>/android-sdk/platform-tools/adb. (On Windows,
use adb.exe.)</p>
<p>To view output from Ren'Py, consider a command line like:</p>
<blockquote>
<div>adb logcat -s python:*</div></blockquote>
</div>
<div class="section" id="icon-and-presplash-images">
<h2>Icon and Presplash Images<a class="headerlink" href="#icon-and-presplash-images" title="Permalink to this headline">¶</a></h2>
<p>There are several special files that are used to set the icon and
presplash images used by the package. These files should be placed
in the base directory.</p>
<dl class="docutils">
<dt>android-icon.png</dt>
<dd>The icon that's used for the app in the Android launcher. This icon is
automatically scaled down to the appropriate size, and should be larger
that 144x144.</dd>
<dt>android-<cite>density</cite>-icon.png</dt>
<dd><p class="first">If present, these are used in preference to android-icon.png for screens
of the given densities. This allows for pixel-perfect icons. Available
screen densities and the corresponding icon sizes are:</p>
<ul class="last simple">
<li>ldpi (36x36)</li>
<li>mdpi (48x48)</li>
<li>hdpi (72x72)</li>
<li>xhdpi (96x96)</li>
<li>xxhdpi (144x144)</li>
</ul>
</dd>
<dt>android-presplash.jpg</dt>
<dd>The image that's used when the app is loading. This should be surrounded
by a monocolored border. That border is expanded to fill the screen.</dd>
<dt>ouya-icon.png</dt>
<dd>A 732x412 icon that's used on the OUYA console.</dd>
</dl>
</div>
<div class="section" id="google-play-expansion-apks">
<h2>Google Play Expansion APKs<a class="headerlink" href="#google-play-expansion-apks" title="Permalink to this headline">¶</a></h2>
<p>Ren'Py optionally supports the use of expansion APKs when used on a device
supporting Google Play. Expansion APKs allow Google Play to host games
larger than 50MB in size. Please see:</p>
<blockquote>
<div><a class="reference external" href="http://developer.android.com/google/play/expansion-files.html">http://developer.android.com/google/play/expansion-files.html</a></div></blockquote>
<p>For information about expansion APKs work. Right now, only the
main expansion APK is supported, giving a 2GB limit. When an Expansion
APK is created, all game files will be placed in the
expansion APK. Ren'Py will transparently use these files.</p>
<p>To configure your game to use Expansion APKs, you'll need to set two
variables:</p>
<dl class="var">
<dt id="var-build.google_play_key">
<tt class="descname">build.google_play_key</tt> = "..."<a class="headerlink" href="#var-build.google_play_key" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the Google Play license key associated with your application,
which can be found on the "Services & APIs" tab associated with
your application in the Google Play developer console. (Be sure to
remove all spaces and newlines from the key.)</p>
</dd></dl>
<dl class="var">
<dt id="var-build.google_play_salt">
<tt class="descname">build.google_play_salt</tt> = ( ... )<a class="headerlink" href="#var-build.google_play_salt" title="Permalink to this definition">¶</a></dt>
<dd><p>This should be a tuple of 20 bytes, where each byte is represented as
an integer between -128 and 127. This is used to encrypt license
information returned from Google Play.</p>
<p>A valid (if insecure) value for this variable is:</p>
<div class="highlight-none"><div class="highlight"><pre>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
</pre></div>
</div>
</dd></dl>
<p>RAPT will place the expansion APK on the device when installing
the APK package on the device. The expansion APK will be an .obb file
found inside the bin subdirectory of the RAPT directory.</p>
<p>In normal operation, Google Play will place the expansion APK on the
device automatically when the user installs the application.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="problems.html" title="Dealing with Problems"
>next</a> |</li>
<li class="right" >
<a href="updater.html" title="Web Updater"
>previous</a> |</li>
<li> <img src="_static/logo.png" width=19 height=21 align=center>
<li> <a href="http://www.renpy.org/">Ren'Py Home</a> |
<li><a href="index.html">Ren'Py Documentation</a></li>
</ul>
</div>
</body>
</html>
|