% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math} % this also loads fontspec
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{lmodern}
\ifPDFTeX\else
  % xetex/luatex font selection
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same}
\hypersetup{
  pdftitle={android-programming-on-linux},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}

\title{android-programming-on-linux}
\author{}
\date{}

\begin{document}
\maketitle

\hypertarget{android-programming-on-linux}{%
\section{android-programming-on-linux}\label{android-programming-on-linux}}

Android programming on Linux
\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#

.. contents::

\hypertarget{setup-your-development-environment}{%
\section{Setup your development
environment}\label{setup-your-development-environment}}

\begin{itemize}
\item
  install the Java Development Kit (JDK)

  .. code-block:: bash

  \# On Redhat or Fedora run the following

  yum install java-1.7.0-openjdk yum install java-1.7.0-openjdk-devel
\item
  install the android sdk::

  http://developer.android.com/sdk/index.html
\item
  adjust your path environment variable

  .. code-block:: bash

  \# echo `export
  PATH=\(PATH:/home/fox/android/tools:/home/fox/android/platform-tools' >> ~/.bashrc  echo 'export PATH=\)PATH:/path/to/android/tools'
  \textgreater\textgreater{} \textasciitilde/.bashrc
\item
  optionally install eclipse
\item
  create an ADV (android virtual device) emulator
\end{itemize}

\textbf{Tip:} Add the platform-tools/ as well as the tools/ directory to
your PATH environment variable.

\hypertarget{create-an-android-project-on-the-cli}{%
\section{Create an android project on the
cli}\label{create-an-android-project-on-the-cli}}

reference:
http://developer.android.com/guide/developing/projects/projects-cmdline.html

The following cli command will create an android project skeleton named
HelloWorld in your home directory.

.. code-block:: bash

android create project\\
--package com.example.helloworld\\
--activity HelloWorld\\
--target 3\\
--path \textasciitilde/HelloWorld

target The ``build target'' for your application.

This corresponds to an Android platform library (including any add-ons,
such as Google APIs) that you would like to build your project against.

To see a list of available targets and their corresponding IDs,
\textbf{execute: android list targets.}

name The name for your project.

This is optional. If provided, this name will be used for your .apk
filename when you build your application.

path The location of your project directory.

If the directory does not exist, it will be created for you.

activity The name for your default Activity class.

This class file will be created for you inside /src// .

This will also be used for your .apk filename unless you provide a name.

package the package namespace for your project

This will follow the Java programming language standards.

\hypertarget{programming-the-helloworld-project}{%
\section{Programming the HelloWorld
project}\label{programming-the-helloworld-project}}

modify your source code\ldots{}

\hypertarget{building-and-running-from-the-command-line}{%
\subsection{Building and running from the command
line}\label{building-and-running-from-the-command-line}}

Reference:
http://developer.android.com/guide/developing/building/building-cmdline.html

The Ant script compiles and builds your project into a .apk file which
may be installed on an emulator or device.

Ant provides the following two build modes:

\begin{itemize}
\tightlist
\item
  Test or Debug (Development)
\item
  Release (Production)
\end{itemize}

Regardless of the build mode chosen the application must be signed
before it can be installed on an emulator or device.

In development (debug mode) the SDK will automatically sign your project
with a development key. An application signed with a development key
cannot be distributed.

In production (release mode) the SDK will not sign the .apk file, you
will need to do this manually using the Keytool and Jarsigner.

\hypertarget{building-in-debug-mode-development}{%
\subsection{Building in debug mode
(development)}\label{building-in-debug-mode-development}}

\begin{enumerate}
\item
  Navigate to root of the project
\item
  Compile the project using Ant.

  .. code-block:: bash

  ant debug
\end{enumerate}

\hypertarget{install-debug-application-to-emulator}{%
\subsection{Install debug application to
emulator}\label{install-debug-application-to-emulator}}

\begin{enumerate}
\tightlist
\item
  Start your AVD (android Virtual Device) emulator.
\item
  Install your application using the adb script which exists in the
  platform-tools/ directory of the SDK.
\end{enumerate}

.. code-block:: bash

\begin{verbatim}
adb install ~/HelloWorld/bin/HelloWorld-debug.apk
\end{verbatim}

You might need to specify the device serial which is found on the top of
the virtual device titlebar.

.. code-block:: bash

\begin{verbatim}
adb -s emulator-5554 install ~/HelloWorld/bin/HelloWorld-debug.apk
\end{verbatim}

A top secret command for both building in debug mode and deploying to a
running emulator use the following command:

.. code-block:: bash

ant install

\hypertarget{how-to-update-android-sdk}{%
\section{How to update Android SDK}\label{how-to-update-android-sdk}}

Periodically you may want to update your development environment, here's
how:

\begin{itemize}
\tightlist
\item
  open a Terminal (ctrl+alt+t)
\item
  type `android' and press enter
\item
  click the `Installed packages' tab
\item
  click the `Update All\ldots{}' button
\end{itemize}

\hypertarget{installing-scala}{%
\section{Installing Scala}\label{installing-scala}}

Not directly related to Android development, but I plan to learn Scala
(expand my use of functional langs) while building android apps. Replace
version with latest in the subsequent code block.

.. code-block:: bash

\# download \& unzip wget
hhttp://www.scala-lang.org/files/archive/scala-2.11.0.tgz tar -xzvf
scala-2.11.0.tgz

\# install sudo mv scala-2.11.0 /usr/share/scala sudo ln -s
/usr/share/scala/bin/scala /usr/bin/scala sudo ln -s
/usr/share/scala/bin/scalac /usr/bin/scalac sudo ln -s
/usr/share/scala/bin/fsc /usr/bin/fsc sudo ln -s
/usr/share/scala/bin/scaladoc /usr/bin/scaladoc sudo ln -s
/usr/share/scala/bin/scalap /usr/bin/scalap

might need sbt (scala build tools)

\hypertarget{scala-game-engines}{%
\section{scala game engines}\label{scala-game-engines}}

https://github.com/dunnololda/scage : game engine

http://scalandroid.blogspot.com/ : game making blog scala android
scawars devs used: maven progaurd scala

http://www.drdobbs.com/mobile/developing-android-apps-with-scala-and-s/
: android app development with scala

http://scala-ide.org/docs/tutorials/androiddevelopment/index.html :
andoir app development with scala

https://github.com/banshee/AndroidProguardScala compiles only the parts
of scala lib that your application needs.

http://eed3si9n.com/tetrix-in-scala/index.html : tetris in scala step by
step howto really in depth !

http://eed3si9n.com/tetrix-in-scala/android.html port a scala tetris
game to android using `android', sbt, pfn/android-plugin,

\hypertarget{libgdx}{%
\section{libGDX}\label{libgdx}}

libGDX is a cross-platform Java game development framework based on
OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, your WebGL
enabled browser and iOS.

https://github.com/libgdx/libgdx

https://github.com/libgdx/libgdx/wiki/

https://github.com/libgdx/libgdx/wiki/Using-libgdx-with-Scala describes
how to use sbt (scala build tool and g8 to build android apps)

http://www.badlogicgames.com/ : Mario's game dev blog which is very
active, he authored libGDX and builds lots of android games.

unofficial libGDX references

http://raintomorrow.cc/post/70000607238/develop-games-in-scala-with-libgdx-getting-started
: develop games in scala with libgdx getting-started

https://www.youtube.com/watch?v=P-XN5gPRZkw libGDX games on android
youtube video

\end{document}
