I initialized my twilio client in the code below but I am getting an error
Unable to establish connection to Twilio Sync service
My code:
public void build(String token, TaskCompletionListener<ChatClient, String> listener) {
ChatClient.Properties props =
new ChatClient.Properties.Builder()
.setRegion("us1")
.createProperties();
this.buildListener = listener;
//Toast.makeText(context,"++-==++",Toast.LENGTH_LONG).show();
ChatClient.create(context.getApplicationContext(),
token,
props,
new CallbackListener<ChatClient>()
{
@Override
public void onSuccess(ChatClient chatClient) {
Toast.makeText(context,chatClient.getMyIdentity(),Toast.LENGTH_LONG).show();
}
@Override
public void onError (ErrorInfo errorInfo)
{
Log.e("++==00",errorInfo.getMessage());
Toast.makeText(context,errorInfo.getMessage(),Toast.LENGTH_LONG).show();
}
});