This is repository for the Snaption Android Application.
These are some of the necessary tools and steps that you will need to build the Snaption Android application on your own machine. These steps will work with Windows, macOS, and Linux.
You may be asked to install extra SDKs or Build tools upon opening the project in Android Studio.
-
To grab the latest source code from the remote master branch, run:
git clone https://github.com/tylerbwong/SnaptionAndroid.git
-
Open up Android Studio and select
Open Existing Android Project
-
Android Studio should then walk you through the steps to set up the project.
-
Depending on if you have used Android Studio in the past, the IDE may prompt you to install extra plugins and dependencies in order to build the project (i.e. Gradle Plugins, Android SDKs, Android Build Tools). Go ahead and install everything it asks you to. If you have installed everything that Android Studio has asked you to and the build still fails, go to
Tools -> Android -> SDK Manager
and install the following:- SDK Platforms/Android 7.1.1 (Nougat)
- SDK Platforms/Android 6.0 (Marshmallow)
- SDK Tools/Android SDK Build-Tools 25
- SDK Tools/Android SDK Platform-Tools 25
- SDK Tools/Android SDK Tools 25.2.3
- SDK Tools/Support Repository/Android Support Repository
- SDK Tools/Support Repository/Google Repository
-
Once the project has been opened and all plugins and dependencies have been installed, try building the project by going to
Build -> Rebuild Project
. Hopefully it builds! -
Once the project builds successfully, go ahead and add your name to the bottom of this README.md and push it to the repository to initiate a remote build.
-
To push your new code change to the remote master branch, run:
git add <Any files to be committed, "." or "-A" for all> git commit -m "<Meaningful commit message (Note the quotes)>" git push
-
This push should initiate a remote build either on Travis CI and hopefully it builds successfully too!
In Android Studio, you will have the option of running the application on your compatible personal Android device, or through an emulator.
- In Android Studio, go to
Tools -> Android -> AVD Manager
. - Click on
Create New Virtual Device
- Specify which kind of device you would like to run. For our purposes,
a Nexus 5X will suffice. Click
Next
. - You will now be asked to select an Android System Image. This is the
version of Android that the emulator will run. Select anything API 19
and above. Click
Next
. - The next page will show different options about the hardware of the
virtual device. Here you will be able to specify the amount of RAM, the
VM Heap size, and even the size of an SD card (external storage). Leave
everything as the default, but increase the amount of RAM to 2048 MB.
Click
Finish
. - You are now ready to run the application. Find the green arrow at the
top of Android Studio and click it. It will bring up a window that will
let you choose a device to run the application on. Click the virtual
device that you just created. Click
OK
. If everything builds and you created the virtual device correctly, the virtual device should start up and the app should run automatically!
- In order to run the application on your own device, you will need to
enable Developer options. On your Android device, navigate to
Settings -> About Phone
. - Scroll down until you see a "Build Number". Keep tapping that row until a message says that you are a developer.
- Go back to the Settings page and click on
Developer Options
. Make sure Developer Options is turned on. - Scroll down and make sure that
USB debugging
is enabled. - Now your device is ready to run your application. Plug in your device
to your computer and press the green arrow to run the application. Instead
of choosing an emulator, you should see your personal device listed under
"Connected devices". Choose your device and click
OK
. - If this is your first time using your device to run an app through
Android Studio, a pop-up might appear on your device asking if you would
like to accept your computer's RSA fingerprint. Check
Always remember this computer
and clickOK
. The app will be installed and you should be ready to run your app on your own device!
If you have any questions feel free to ask me or anyone else who has gotten the project to build successfully!
- BranchMetrics/android-branch-deep-linking
- hdodenhof/CircleImageView
- facebook/facebook-android-sdk
- bumptech/glide
- wasabeef/glide-transformations
- airbnb/lottie-android
- afollestad/material-dialogs
- deano2390/MaterialShowcaseView
- hootsuite/nachos
- square/okhttp
- chrisbanes/PhotoView
- square/retrofit
- ReactiveX/RxAndroid
- ReactiveX/RxJava
- amulyakhare/TextDrawable