Releasing for Android

These instructions assume your WhaleJS project is located in $PROJECT directory.

  1. Install APKTool.

  2. Install Uber Apk Signer.

  3. Download WhaleJS Android build.

  4. Extract downloaded WhaleJS APK file with APKTool. Let’s assume extracted files will be located in $WHALE directory.

    $ apktool d -s -o $WHALE WhaleJS-Android.apk
    
  5. Delete contents of $WHALE/assets/demo and copy your project into this directory.

    $ rm -rf $WHALE/assets/demo/*
    $ cp -r $PROJECT/* $WHALE/assets/demo/
    
  6. Customize your app’s label, package name and version by editing $WHALE/AndroidManifest.xml.

    <?xml version="1.0" encoding="utf-8"?>
    <manifest
      package="com.mycompany.myapp"
      android:versionCode="1"
      android:versionName="1.0.0"
      ...>
      ...
      <application android:label="MyApp" ...>
        <activity android:label="MyApp" ...>
          ...
        </activity>
      </application>
      ...
    </manifest>
    
  7. Customize your app’s icon in $WHALE/res.

  8. Package your project with APKTool.

    $ apktool b -o myapp.apk $WHALE
    
  9. Sign myapp.apk with Uber Apk Signer. The following command signs it with a debug keystore.

    $ java -jar uber-apk-signer.jar --apks myapp.apk
    

This will produce a new signed APK file which can now be installed.