9 Cards does the bulk of the work for you, organizing your apps into collections. Get quick and easy access to the apps you need most
## Prerequisites
### SBT
- Download and install sbt
- Download. You only need the command line tools
- Set
ANDROID_HOME
environment variable pointing to the root folder
### Android Device
You need an Android device and enable USB debugging
### Google Project
9Cards needs the following Google APIs:
- Google Drive API for storing your devices in the cloud
- Google Plus API for authenticating the user requests
You need to create a project in the Google API Console with these two APIs enabled.
#### Create the project
- Go to the Google Developers Console
- From the project drop-down, select a project, or create a new one.
#### Google Drive API
- Enable the Google Drive API service:
- In the sidebar under "API Manager", select Library.
- In the list of Google APIs, search for the Google Drive API service.
- Select Google Drive API from the results list.
- Press the Enable API button.
- In the sidebar under "API Manager", select Credentials.
- In the Credentials tab, select the Create credentials drop-down list, and choose OAuth client ID.
- Select Android as Application type.
- Enter a key Name.
- Find your certificate SHA1 fingerprint and paste it in the form where requested.
- Enter
com.fortysevendeg.ninecardslauncher
in the package name field. - Click on "Create".
#### Google Plus API
- Enable the Google Plus API service:
- In the sidebar under "API Manager", select Library.
- In the list of Google APIs, search for the Google+ API service.
- Select Google+ API from the results list.
- Press the Enable API button.
- In the sidebar under "API Manager", select Credentials.
- In the Credentials tab, select the Create credentials drop-down list, and choose OAuth client ID.
- Select Web application as Application type.
- Enter a key Name then select Create.
- Then copy the client ID of the newly generated credential.
## Compile and Run
To compile the project:
- Clone this GitHub project to your computer
$ git clone [email protected]:47deg/nine-cards-v2.git
-
Add a
ninecards.properties
file (See Add Debug Keys section) -
You need to set the heap size to at least 2M
$ sbt -mem 2048
- Verify that your device is attached
> devices
The output should look like:
[info] Serial Model Battery % Android Version
[info] ---------------------- ---------------- --------- ---------------
[info] XXXXXXXXXX Nexus 6 66% 6.0.1 API 23
- Now you're ready to run the project, just execute:
> run
You need to add a ninecards.properties
file in the project root folder.
This file provides some some keys for different third party services. We'll see all down bellow.
To begin with, you can use the template provided in the root folder:
$ cp ninecards.properties.default ninecards.properties
This is the content:
# Backend V2
backend.v2.url=
backend.v2.clientid=
# Third Parties
crashlytics.enabled=false
crashlytics.apikey=
crashlytics.apisecret=
strictmode.enabled=false
analytics.enabled=false
analytics.trackid=
# Firebase
firebase.enabled=false
firebase.url=
firebase.google.appid=
firebase.google.apikey=
firebase.gcm.senderid=
firebase.clientid=
# FlowUp
flowup.enabled=false
flowup.apikey=
### Backend V2 (Mandatory)
backend.v2.url
: Defines the URL for the Backend. Visit the GitHub project for more informationbackend.v2.clientid
: This value is used for requesting a token id that will be used by the Backend to authenticate the user. It's the client id obtained in the Google Plus API section.
### Third Parties (Optional)
crashlytics.enabled
: Enables or disables the Crashlytics servicecrashlytics.apikey
&crashlytics.apisecret
: These values are fetched from your Crashlytics organization page
strictmode.enabled
: Enables or disables the Strict Mode
analytics.enabled
: Enables or disables the Google Analytics serviceanalytics.trackid
: You can use your own tracking ID. See how to find your tracking code, tracking ID, and property number
flowup.enabled
: Enables or disables the FlowUp serviceflowup.apikey
: These values are fetched from your FlowUp account
### Google Firebase (Optional)
Google Firebase is used for push notifications.
- Create a Firebase project in the Firebase console, if you don't already have one. If you already have an existing Google project associated with your mobile app, click Import Google Project. Otherwise, click Create New Project.
- Add a new app in Project Settings -> General
- Select the newly created app and download the
google-services.json
- Open the file in a text editor. All bellow properties are taken from this file
firebase.enabled
: Enables or disables the Google Firebase servicefirebase.url
: Propertyproject_info.firebase_url
firebase.google.appid
: Propertyclient[0].client_info.mobilesdk_app_id
firebase.google.apikey
: Propertyclient[0].api_key[0].current_key
firebase.gcm.senderid
: Propertyproject_info.project_number
firebase.clientid
: Propertyclient[0].oauth_client[x].client_id
where x is the index of one element withclient_type
== 3
## Troubleshooting
This section contains information about possible problems compiling 9Cards
When you compile the project it's possible that you have this error:
com.android.ide.common.process.ProcessException
It's a problem in 64-bit system and you need to install the ia32-libs
. You should install it the following next:
sudo apt-get install lib32stdc++6 lib32z1
More information here
### Ubuntu: Launching IntelliJ from unity panel
If you are using IntelliJ from unity panel it's possible that the app don't find the ANDROID_HOME
environment variable.
Unity launcher doesn't source the users environment from .bashrc
and you shoud include the ANDROID_HOME
in /etc/environment
and IntelliJ will work fine