Skip to content

Commit

Permalink
doc: add android configuration section
Browse files Browse the repository at this point in the history
  • Loading branch information
rockjam committed Feb 23, 2016
1 parent 628ff5d commit 9fcfca4
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion docs/android/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
# Building Android App

Building android app is very easy. Just download [Android Studio](http://developer.android.com/sdk/index.html) and import project from [app-android](../../app-android/).
### Requirements
* [Android Studio](http://developer.android.com/sdk/index.html)

### Development
To change source code of android app import project from [app-android](../../app-android/) in Android Studio.

### Configuration
Configuration is performed in [actor-bootstrap/app-android/src/main/java/im/actor/enterprise/MessengerApplication.java](../../app-android/src/main/java/im/actor/enterprise/MessengerApplication.java)

All customizations are inside `onConfigureActorSDK` method, and performed via methods of `ActorSDK.sharedActor()`

```
@Override
public void onConfigureActorSDK() {
//customizations goes here
//ActorSDK.sharedActor().set...
}
```

List of avaiable customizations:
#### Set server endpoints
In case of self hosted solution, the most important parameter is server endpoints. You can set them like this:

```
ActorSDK.sharedActor().setEndpoints(new String[] {
"tcp://93.184.216.34:9070"
});
```
Endpoint is:
```
<schema>://<server address>:<port>
```
where:
- schema: tcp or tls in case of secured connection
- server address: your server ip/dns
- port: your endpoint port

#### Change application name
If you want to change application name, you can do it this way:
```
ActorSDK.sharedActor().setCustomApplicationName("My awesome messenger");
ActorSDK.sharedActor().setAppName("My awesome messenger");
```

#### Receive push notification without configuring Google push service
Android application can work as background task, receiving push notification, it can replace Google pushes, or coexist with them.
You can enable background service this way:
```
ActorSDK.sharedActor().setIsKeepAliveEnabled(true);
```

0 comments on commit 9fcfca4

Please sign in to comment.