-
Notifications
You must be signed in to change notification settings - Fork 694
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
114 changed files
with
1,305 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"app_id": "92", | ||
"auth_key": "wJHdOcQSxXQGWx5", | ||
"auth_secret": "BTFsj7Rtt27DAmT", | ||
"account_key": "rz2sXxBt5xgSxGjALDW6", | ||
"api_domain": "https://api.quickblox.com", | ||
"chat_domain": "chat.quickblox.com", | ||
"gcm_sender_id": "761750217637" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"users_tag": "webrtcusers", | ||
"users_password": "x6Bt0VDy5", | ||
"port": 5223, | ||
"socket_timeout": 120, | ||
"keep_alive": true, | ||
"use_tls": true, | ||
"auto_join": false, | ||
"auto_mark_delivered": true, | ||
"reconnection_allowed": true, | ||
"allow_listen_network": true | ||
} | ||
|
19 changes: 18 additions & 1 deletion
19
sample-chat/src/main/java/com/quickblox/sample/chat/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
package com.quickblox.sample.chat; | ||
|
||
import com.quickblox.sample.chat.models.SampleConfigs; | ||
import com.quickblox.sample.chat.utils.Consts; | ||
import com.quickblox.sample.chat.utils.configs.ConfigUtils; | ||
import com.quickblox.sample.core.CoreApp; | ||
import com.quickblox.sample.core.utils.ActivityLifecycle; | ||
|
||
import java.io.IOException; | ||
|
||
public class App extends CoreApp { | ||
private static final String TAG = App.class.getSimpleName(); | ||
private static SampleConfigs sampleConfigs; | ||
|
||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
ActivityLifecycle.init(this); | ||
initCredentials(Consts.QB_APP_ID, Consts.QB_AUTH_KEY, Consts.QB_AUTH_SECRET, Consts.QB_ACCOUNT_KEY); | ||
initSampleConfigs(); | ||
} | ||
|
||
private void initSampleConfigs() { | ||
try { | ||
sampleConfigs = ConfigUtils.getSampleConfigs(Consts.SAMPLE_CONFIG_FILE_NAME); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
public static SampleConfigs getSampleConfigs() { | ||
return sampleConfigs; | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
sample-chat/src/main/java/com/quickblox/sample/chat/managers/DialogsManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
sample-chat/src/main/java/com/quickblox/sample/chat/models/SampleConfigs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
package com.quickblox.sample.chat.models; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public class SampleConfigs { | ||
|
||
public SampleConfigs() { | ||
} | ||
|
||
@SerializedName("users_tag") | ||
private String usersTag; | ||
|
||
@SerializedName("users_password") | ||
private String usersPassword; | ||
|
||
@SerializedName("port") | ||
private int chatPort; | ||
|
||
@SerializedName("socket_timeout") | ||
private int chatSocketTimeout; | ||
|
||
@SerializedName("keep_alive") | ||
private boolean keepAlive; | ||
|
||
@SerializedName("use_tls") | ||
private boolean useTls; | ||
|
||
@SerializedName("auto_join") | ||
private boolean autoJoinEnabled; | ||
|
||
@SerializedName("auto_mark_delivered") | ||
private boolean autoMarkDelivered; | ||
|
||
@SerializedName("reconnection_allowed") | ||
private boolean reconnectionAllowed; | ||
|
||
@SerializedName("allow_listen_network") | ||
private boolean allowListenNetwork; | ||
|
||
public String getUsersTag() { | ||
return usersTag; | ||
} | ||
|
||
public void setUsersTag(String usersTag) { | ||
this.usersTag = usersTag; | ||
} | ||
|
||
public String getUsersPassword() { | ||
return usersPassword; | ||
} | ||
|
||
public void setUsersPassword(String usersPassword) { | ||
this.usersPassword = usersPassword; | ||
} | ||
|
||
public int getChatPort() { | ||
return chatPort; | ||
} | ||
|
||
public void setChatPort(int chatPort) { | ||
this.chatPort = chatPort; | ||
} | ||
|
||
public int getChatSocketTimeout() { | ||
return chatSocketTimeout; | ||
} | ||
|
||
public void setChatSocketTimeout(int chatSocketTimeout) { | ||
this.chatSocketTimeout = chatSocketTimeout; | ||
} | ||
|
||
public boolean isKeepAlive() { | ||
return keepAlive; | ||
} | ||
|
||
public void setKeepAlive(boolean keepAlive) { | ||
this.keepAlive = keepAlive; | ||
} | ||
|
||
public boolean isUseTls() { | ||
return useTls; | ||
} | ||
|
||
public void setUseTls(boolean useTls) { | ||
this.useTls = useTls; | ||
} | ||
|
||
public boolean isAutoJoinEnabled() { | ||
return autoJoinEnabled; | ||
} | ||
|
||
public void setAutoJoinEnabled(boolean autoJoinEnabled) { | ||
this.autoJoinEnabled = autoJoinEnabled; | ||
} | ||
|
||
public boolean isAutoMarkDelivered() { | ||
return autoMarkDelivered; | ||
} | ||
|
||
public void setAutoMarkDelivered(boolean autoMarkDelivered) { | ||
this.autoMarkDelivered = autoMarkDelivered; | ||
} | ||
|
||
public boolean isReconnectionAllowed() { | ||
return reconnectionAllowed; | ||
} | ||
|
||
public void setReconnectionAllowed(boolean reconnectionAllowed) { | ||
this.reconnectionAllowed = reconnectionAllowed; | ||
} | ||
|
||
public boolean isAllowListenNetwork() { | ||
return allowListenNetwork; | ||
} | ||
|
||
public void setAllowListenNetwork(boolean allowListenNetwork) { | ||
this.allowListenNetwork = allowListenNetwork; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.