Commit 4bdb88c0 by Kunj Gupta

Added some of items -

New voice accent
Google assistance for launch the App and Chat screen.
parent 152f49f6
...@@ -5,7 +5,14 @@ ...@@ -5,7 +5,14 @@
<application> <application>
<activity <activity
android:name=".chat.ChatActivity"
android:label="@string/chat_activity_label"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:name=".chat.ChatActivity" /> android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application> </application>
</manifest> </manifest>
...@@ -10,7 +10,7 @@ public class AppConfig { ...@@ -10,7 +10,7 @@ public class AppConfig {
public static final String APP_INTERNAL_NAME = "Arrow"; public static final String APP_INTERNAL_NAME = "Arrow";
public static final String DOMAIN_PRODUCTION = "https://ven01199.service-now.com/"; public static final String DOMAIN_PRODUCTION = "https://ven01199.service-now.com/";
public static final String DOMAIN_TEST = "https://ven01199.service-now.com/";//"https://uofltest.service-now.com/"; public static final String DOMAIN_TEST = "https://vsoftconsultingdemo1.service-now.com/";//https://ven01199.service-now.com/";//"https://uofltest.service-now.com/";
public static final String LOGIN_CLIENT_ID_PRODUCTION = "d958eb06b0f3830093781f441d59febc"; public static final String LOGIN_CLIENT_ID_PRODUCTION = "d958eb06b0f3830093781f441d59febc";
public static final String LOGIN_CLIENT_SECRET_PRODUCTION = "krD*!O}1.8"; public static final String LOGIN_CLIENT_SECRET_PRODUCTION = "krD*!O}1.8";
......
...@@ -3,18 +3,13 @@ package com.vsoft.servicenow.chat; ...@@ -3,18 +3,13 @@ package com.vsoft.servicenow.chat;
import android.content.Intent; import android.content.Intent;
import android.graphics.Color; import android.graphics.Color;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import android.speech.RecognizerIntent;
import android.speech.tts.TextToSpeech; import android.speech.tts.TextToSpeech;
import android.speech.tts.UtteranceProgressListener; import android.speech.tts.UtteranceProgressListener;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log; import android.util.Log;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MenuItem; import android.view.MenuItem;
...@@ -28,7 +23,6 @@ import android.widget.Toast; ...@@ -28,7 +23,6 @@ import android.widget.Toast;
import com.github.nkzawa.emitter.Emitter; import com.github.nkzawa.emitter.Emitter;
import com.github.nkzawa.socketio.client.Socket; import com.github.nkzawa.socketio.client.Socket;
import com.google.gson.JsonObject;
import com.vsoft.servicenow.CatalogueApplication; import com.vsoft.servicenow.CatalogueApplication;
import com.vsoft.servicenow.R; import com.vsoft.servicenow.R;
import com.vsoft.servicenow.api.managers.LoginApiManager; import com.vsoft.servicenow.api.managers.LoginApiManager;
...@@ -133,7 +127,7 @@ public class ChatActivity extends HandleNotificationActivity implements OnDSList ...@@ -133,7 +127,7 @@ public class ChatActivity extends HandleNotificationActivity implements OnDSList
mMessagesView.setLayoutManager(new LinearLayoutManager(this)); mMessagesView.setLayoutManager(new LinearLayoutManager(this));
mMessagesView.setAdapter(mAdapter); mMessagesView.setAdapter(mAdapter);
mUsername = getIntent().getStringExtra(Constants.DATA_KEY_CHAT_USER_NAME); mUsername = PrefManager.getSharedPref(this, PrefManager.PREFERENCE_FIRST_NAME);
mInputMessageView = (EditText) findViewById(R.id.message_input); mInputMessageView = (EditText) findViewById(R.id.message_input);
mInputMessageView.setOnEditorActionListener(new TextView.OnEditorActionListener() { mInputMessageView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
......
...@@ -37,7 +37,7 @@ public class Speaker implements TextToSpeech.OnInitListener { ...@@ -37,7 +37,7 @@ public class Speaker implements TextToSpeech.OnInitListener {
if (status == TextToSpeech.SUCCESS) { if (status == TextToSpeech.SUCCESS) {
// Change this to match your // Change this to match your
// locale // locale
tts.setLanguage(Locale.US); tts.setLanguage(Locale.UK);
ready = true; ready = true;
} else { } else {
ready = false; ready = false;
......
package com.vsoft.servicenow.ui; package com.vsoft.servicenow.ui;
import android.app.Notification;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.res.TypedArray; import android.content.res.TypedArray;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.widget.GridView; import android.widget.GridView;
import com.github.nkzawa.emitter.Emitter;
import com.github.nkzawa.socketio.client.Socket;
import com.google.android.gms.analytics.Tracker; import com.google.android.gms.analytics.Tracker;
import com.vsoft.servicenow.chat.ChatActivity; import com.vsoft.servicenow.chat.ChatActivity;
import com.vsoft.servicenow.utils.Constants;
import com.vsoft.servicenow.utils.Util; import com.vsoft.servicenow.utils.Util;
import com.vsoft.servicenow.CatalogueApplication; import com.vsoft.servicenow.CatalogueApplication;
import com.vsoft.servicenow.R; import com.vsoft.servicenow.R;
import com.vsoft.servicenow.adapters.HomeScreenAdapter; import com.vsoft.servicenow.adapters.HomeScreenAdapter;
import com.vsoft.servicenow.utils.PrefManager; import com.vsoft.servicenow.utils.PrefManager;
import org.json.JSONException;
import org.json.JSONObject;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
...@@ -70,9 +61,7 @@ public class HomeScreen extends HandleNotificationActivity { ...@@ -70,9 +61,7 @@ public class HomeScreen extends HandleNotificationActivity {
startActivity(new Intent(HomeScreen.this, MyRequestActivity.class)); startActivity(new Intent(HomeScreen.this, MyRequestActivity.class));
} else if (position == 4) { } else if (position == 4) {
// perform the user login attempt. // perform the user login attempt.
String userFirstName = PrefManager.getSharedPref(HomeScreen.this, PrefManager.PREFERENCE_FIRST_NAME);
Intent intent = new Intent(HomeScreen.this, ChatActivity.class); Intent intent = new Intent(HomeScreen.this, ChatActivity.class);
intent.putExtra(Constants.DATA_KEY_CHAT_USER_NAME, userFirstName);
startActivity(intent); startActivity(intent);
} else if (position == 5) { } else if (position == 5) {
Intent intent = new Intent(HomeScreen.this, NotificationScreen.class); Intent intent = new Intent(HomeScreen.this, NotificationScreen.class);
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<string name="app_name">Arrow POC</string> <string name="app_name">Arrow POC</string>
<!--Chat Related String--> <!--Chat Related String-->
<string name="chat_activity_label">Vera</string>
<string name="action_leave">Leave</string> <string name="action_leave">Leave</string>
<string name="action_send">Send</string> <string name="action_send">Send</string>
<string name="prompt_message">Message</string> <string name="prompt_message">Message</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment