Skip to content

Commit

Permalink
Update native READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
ebelair committed Mar 25, 2017
1 parent f22b8af commit 7b945c1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 61 deletions.
36 changes: 25 additions & 11 deletions android/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# CS Games - Sample Android App
# CS Games 2017 - Mobile - Android App

This project will guide you setting up your environment to build and run a sample Android application on your local machine.
This project serves as a starting base for the CS Games 2017 Mobile Competition.

You may edit it as much as you like (or start completely from scratch if you prefer) – as long as you make something awesome!

## Prerequisites

Expand All @@ -11,42 +13,54 @@ Make sure you have the following software installed before beginning:

You can download these from the [Android Developer website](http://developer.android.com/sdk/index.html).

> **NOTE:** If you have a Mac computer running macOS 10.11.5 or later, you may also be interested in our [Sample iOS app](https://github.com/mirego/csgames-sample-ios/), which uses Xcode and the latest iOS SDK.
> **NOTE:** If you have a Mac computer running macOS 10.11.5 or later, you may also be interested in our [iOS app](https://github.com/mirego/csgames17-competition/tree/master/ios), which uses Xcode and the latest iOS SDK.
## Getting started

First, clone the project from Github:
First, make sure you have cloned the project from Github:

```
git clone git@github.com:mirego/csgames-sample-android.git
git clone http://github.com/mirego/csgames17-competition.git
```

Then, in Android Studio:

- Select **Import project (Eclipse, ADT, Gradle, etc.)** in the Welcome Screen, go find the repository you just cloned, and click **OK**.
- Select **Import project (Eclipse, ADT, Gradle, etc.)** in the Welcome Screen, go find the `android` folder in the repository you just cloned, and click **OK**.
- Once the project is open, click on **Sync Project with Gradle Files** in the main toolbar (or navigate to `Tools -> Android` in the application menu and select the same option).

<p align="center"><img src="https://cloud.githubusercontent.com/assets/4378424/24182187/64981e3e-0e96-11e7-8fcb-f03f14d78c59.png" width="208"></p>

Once you see a `BUILD SUCCESSFUL` notice in the Gradle Console, your environment should be ready to build and run the project.

### Web server

For the app to communicate with the local web server, you must set your local IP address in the project configuration file.

In `app/src/main/java/com/mirego/cschat/AndroidModule.java`:

- Change the value of the server URL in `provideRetrofit.baseUrl()` to the IP address of your computer on the local network (you cannot set `localhost` or `127.0.0.1` because it will use the loopback of the Android device).

## Building the project

The project should have already been configured as an Android project in Android Studio, therefore you should see a target named `app` in the main toolbar, with **Play** and **Debug** buttons on its right.

Press on the **Debug** icon, and if you don't already have one, [create a new Android Virtual Device](https://developer.android.com/studio/run/managing-avds.html), then select it to run the project.
Press on the **Debug** icon, and if you don't already have one, [create a new Android Virtual Device](http://developer.android.com/tools/devices/managing-avds.html), then select it to run the project.

Once the app appears running in your Virtual Device, your environment is ready for the competition.

## Support
## How it works

**CSChat** is a small application inspired by [Facebook Messenger](https://www.messenger.com/) and [Slack](https://www.slack.com/). It is very basic however, as it can only send basic messages to single conversations.

It should be fairly straightforward to use and customize, but if you want to know more about it, you can read on.

If you have questions about the project or encounter any problem while configuring your environment, please don't hesistate to contact the [project author](https://github.com/ebelair) or submit an [issue](https://github.com/mirego/csgames-sample-android/issues).
> **NOTE:** Before you begin, make sure the web server is up and running (see the [server page](https://github.com/mirego/csgames17-competition/tree/master/server)).
## License

This sample app is © 2016 [Mirego](http://www.mirego.com) and may be freely
This competition is © 2017 [Mirego](http://www.mirego.com) and may be freely
distributed under the [New BSD license](http://opensource.org/licenses/BSD-3-Clause).
See the [`LICENSE.md`](https://github.com/mirego/csgames-sample-android/blob/master/LICENSE.md) file.
See the [`LICENSE.md`](https://github.com/mirego/csgames17-competition/blob/master/LICENSE.md) file.

## About Mirego

Expand Down
52 changes: 2 additions & 50 deletions ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Make sure you have the following software installed before beginning:

You can download these from the [Apple Developer website](https://developer.apple.com/downloads/).

> **NOTE:** You need a Mac computer running macOS 10.11.5 or later. If you don't have one, you may check our [Sample Android app](https://github.com/mirego/csgames-sample-android/), which can be run on Windows, Linux and older versions of macOS.
> **NOTE:** You need a Mac computer running macOS 10.11.5 or later. If you don't have one, go to our [Android app](https://github.com/mirego/csgames17-competition/tree/master/android), which can be run on Windows, Linux and older versions of macOS.
## Getting started

Expand Down Expand Up @@ -51,7 +51,7 @@ open CSChat.xcworkspace

In Xcode, run the project by simply pressing the "Play" button on the top left, or by hitting `⌘R`.

<p align="center"><img width="397" src="https://cloud.githubusercontent.com/assets/4378424/13624346/1c8ac8c0-e57b-11e5-9a4d-af6d4a104255.png"></p>
<p align="center"><img width="397" src="https://cloud.githubusercontent.com/assets/4378424/24324682/3c682b70-1161-11e7-9d87-373095c82ed7.jpg"></p>

Once the app opens up in the iOS Simulator, you are ready to start coding.

Expand All @@ -63,54 +63,6 @@ It should be fairly straightforward to use and customize, but if you want to kno

> **NOTE:** Before you begin, make sure the web server is up and running (see the [server page](https://github.com/mirego/csgames17-competition/tree/master/server)).
### Views

The app contains two main view controllers:

- `MainViewController`: The **home screen**, with *login* and *registration*
- `MessagesViewController`: The **messaging screen**, with random text strings and a fixed image

You will customize mostly the latter, where you can add real messaging functionalities. You are free to change the project structure and add as many views as you want, but keep in mind that 3 hours go very fast.

### Libraries

As you will see from the `Podfile`, this project uses a couple of libraries:

#### Public libraries
- **[Alamofire](https://github.com/Alamofire/Alamofire)**: Simple HTTP networking, to easily send requests to the web server
- **[SVProgressHUD](https://github.com/SVProgressHUD/SVProgressHUD)**: Simple HUD controller, to display loading indicators and operation results
- **[SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON)**: Simple JSON-handler, to easily handle server responses

#### Mirego libraries
- **[MCUIColorUtils](https://github.com/mirego/MCUIColorUtils)**: Extension to UIColor, adding convenient methods for color management
- **[MCUIViewLayout](https://github.com/mirego/MCUIViewLayout)**: Extension to UIView, making manual view layouting easier
- **[MRGArchitect](https://github.com/mirego/MRGArchitect)**: Device-agnostic tool to load different values depending on the current screen size

These make up the project as it is, but you may add or remove pod dependencies as much as you like.

### Data Sources

The app contains two data sources:

- `UserApi`: For user login and registration
- `MessageApi`: For messages sent through the app

They offer very basic support for two routes available in the [server](https://github.com/mirego/csgames17-competition/tree/master/server). The data is not validated, except for the user login, where only existing users are authorized.

### Next steps

So, what's the room for improvement?

Here are some features you could add to this app:

- Rich text messages
- Real-time socketed messaging
- Group conversations
- Conversation messages paging
- Push notifications

The list is non-exhaustive, feel free to do anything you can think of!

## License

This competition is © 2017 [Mirego](http://www.mirego.com) and may be freely
Expand Down

0 comments on commit 7b945c1

Please sign in to comment.