This repository contains my Android base code which can be used to build other Android applications. It has an integration to CircleCI.
- Android SDK
- Android Studio 1.0+
- Android 4.0+
- Git
- CircleCI account (free for public repositories)
├── assets
|
├── java/freedomofkeima/androidbase
| ├── activity
| | └── MainActivity.java
| ├── adapter
| ├── exception
| ├── fragment
| ├── helper
| | ├── AsyncTaskResult.java
| | ├── IAsyncTaskOwner.java
| | ├── PreferencesManager.java
| | └── VersionHelper.java
| ├── model
| ├── task
| | └── ExampleTask.java
| ├── Constants.java
| └── FreedomofkeimaApplication.java
|
└── res
You need to configure following values in gradle.properties
and update your build.gradle
file.
productKeyStore=
productKeyStorePassword=
productKeyAlias=
productKeyAliasPassword=
By using Android SDK, you can create a new AVD (let's say, the name is testing
), and run the following command to run it:
$ emulator -avd testing -no-audio -no-window -no-boot-anim
The entire process may take up to 5 minutes.
You can run unit tests locally by:
$ ./gradlew -i connectedAndroidTest --stacktrace
CircleCI sometimes throws an exception com.android.ddmlib.ShellCommandUnresponsiveException
. It may take 5 - 10 minutes until we can use the AVD for testing (for time being, we circumvented it with sleep: 300
). If this problem occurs, you need to press rebuild it again.
Guidelines:
Other references for application design:
- http://www.innofied.com/13-android-development-best-practices/
- http://code.tutsplus.com/articles/introduction-to-android-design-patterns--cms-20808
Other references for security design:
- http://developer.android.com/intl/ja/training/articles/security-tips.html
- http://developer.android.com/intl/ja/google/play/billing/billing_best_practices.html#obfuscate
- http://www.jssec.org/dl/android_securecoding_en.pdf
MIT License.
Last Updated: June 14, 2016