- Clone this project
git clone git@github.com:APISENSE/bee-android.git
. - Build the application using
./gradlew installDebug
- [Optional] Add a
gradle.properties
file in the project root containing the following lines, if needed:- To use the APISENSE SDK (see how to register an application):
- debug_sdk_key = application_key
- release_sdk_key = application_key
- To upload error on a rollbar server
- rollbar_key = rollbar_key
- To build an application release:
- release_keystore_password = keystore password
- release_key_password = key password
- To use the APISENSE SDK (see how to register an application):
- First, you have to add a new achievement in the Google Play Games in the Play Developer Console.
- You have to choose the name and the description
- You have to choose the reward (XP) when the achievement is completed. Be aware that the number that you enter in the field is multiplied by 1000 in the application.
- Then, you need to integrate this new achievement in the application.
-
Get the achievement ID in the Play Developer console. The achievement must be like this : CgkIl-DToIgLEAIQAw.
-
Add this ID as a resource in strings.xml.
<string translatable="false" name="achievement_secretive_bee">CgkIl-DToIgLEAIQAw</string>
-
Unlock the achievement or increment its progress, e.g.:
// In both examples, // this is an Activity extending BeeGameActivity, or a Fragment embedded in a BeeGameActivity. new SimpleGameAchievement(getString(R.string.achievement_secretive_bee)).unlock(this); new IncrementalGameAchievement(getString(R.string.achievement_bronze_wings)).increment(this);
-
- Install Google Play Services on your virtual device. To do so, refer to this tutorial.
- Sign in with your personal or team Google account and update all services (G+, Gmail etc..)
- Symptom: The connected tests end with a timeout because
ADB server didn't ACK
- Reason: Happens when using Genymotion as android emulator.
Genymotion uses a specific version of
adb
embedded in their installation files and gradle uses your Android-SDKadb
, which might be a newer version. - Correction: You might force the use of Genymotion's
adb
version (A symlink being the simplest correction)cd $ANDROID_HOME/platform-tools/
mv adb adb-newest
ln -s $GENYMOTION_DIR/tool/adb adb
Currently we have no automatic delivery for the application. In order to build a release version, you will have to follow this procedure:
- Copy the
release.keystore
file available in the project keepass into theKeystoreCertificates
directory. - Copy the
google-services.json
file available in the project keepass into thebee
directory. - Create a
gradle.properties
file at the project root with the right values for the keys:release_sdk_key
rollbar_key
release_keystore_password
release_key_password
- Build the Android both vanilla and experimental applications using the command
./gradlew clean assembleRelease
, or select either one or the other usingassembleVanillaRelease
orassembleExperimentalRelease
. - Upload the artifact to the play developer console