This Document explains how to build with licensing.
This document was my guide when I implemented the service.
[Link]
Licensing requires Android 1.5 or later
Licensing will only work if the application is being sold at the Android Marketplace.
If it sold at any other sites or venues please ensure to turn off licensing.
To Turn off Licensing.
Make sure this flag in the class Mobiviewer is off.
public static final boolean LICENSE_CHECK = false;
and that in the AndroidManifest file this line is commented out or is missing in the file
<!--
<uses-permission android:name="[Link].CHECK_LICENSE"/>
-->
To Turn on Licensing.
Make sure this flag in the class Mobiviewer is on.
public static final boolean LICENSE_CHECK = true;
and that in the AndroidManifest file this line is present and not commented out
<uses-permission android:name="[Link].CHECK_LICENSE"/>
==========
There is a supplied ant file to build and sign the application and obfuscate it with
proguard.
To make it work with your system you must edit the [Link] file.
Mine looks like this
[Link]=/Users/mike/Library/android-sdk-mac
[Link]=/Users/mike/Library/keys/[Link]
[Link]=mobi50
[Link]=/Users/mike/Library/proguard4.5.1/lib
Please edit this to match your machine.
To build to be safe first do the command ant clean
Then do the command ant release
The script will ask you for your keystore password and your key password just enter
them in from the shell.
Upon a successful build the ant script will place the apk file in the bin directory of the
project.
And it will be the file with release appended to the project name E.G. MobiViewer-
[Link]
It is very important that you test the application after obfuscation, especially after
the first time a code
base has been obfuscated.
=====
To test phone with emulator You will need
An Android emulator running the Google APIs Add-on, API level 8 (release 2) or higher
You will also need to log in a as chris (gmail login) to test before the application is placed
on the android market place, once it is placed on the market place we can add test gmail
accounts that will work.