diff --git a/app/build.gradle b/app/build.gradle index 10dd341..36e0f96 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "uk.co.medivoice.jv" minSdkVersion 19 targetSdkVersion 23 - versionCode 3 - versionName "1.0.2" + versionCode 4 + versionName "1.0.3" } signingConfigs { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 33da9ed..6472c75 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -58,6 +58,9 @@ android:label="@string/allergies"/> + \ No newline at end of file diff --git a/app/src/main/java/uk/co/jaspalsvoice/jv/MainActivity.java b/app/src/main/java/uk/co/jaspalsvoice/jv/MainActivity.java index f8550a4..e637621 100644 --- a/app/src/main/java/uk/co/jaspalsvoice/jv/MainActivity.java +++ b/app/src/main/java/uk/co/jaspalsvoice/jv/MainActivity.java @@ -1,5 +1,7 @@ package uk.co.jaspalsvoice.jv; +import android.app.PendingIntent; +import android.app.TaskStackBuilder; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; @@ -9,8 +11,10 @@ import android.os.Handler; import android.os.Message; import android.speech.tts.TextToSpeech; +import android.support.v4.app.Fragment; import android.support.v4.content.ContextCompat; import android.support.v4.view.MenuItemCompat; +import android.support.v7.app.NotificationCompat; import android.support.v7.widget.ShareActionProvider; import android.text.Editable; import android.text.InputType; @@ -63,6 +67,7 @@ import uk.co.jaspalsvoice.jv.activities.LikesDislikesActivity; import uk.co.jaspalsvoice.jv.activities.MedicinesActivity; import uk.co.jaspalsvoice.jv.activities.PersonalDetailsActivity; +import uk.co.jaspalsvoice.jv.activities.TermsAndConditionsActivity; import uk.co.jaspalsvoice.jv.activities.VitalsActivity; import uk.co.jaspalsvoice.jv.db.DatabaseHelper; import uk.co.jaspalsvoice.jv.task.FetchWordsTask; @@ -118,35 +123,6 @@ public void onUpdateUi(List text) { } }; - /*@Override - public View findViewById(int id) { - View view= super.findViewById(id); - if (view instanceof TextView){ - *//*float a = ((TextView) view).getTextSize(); - a += 120;*//* - ((TextView) view).setTextSize(200); - } - return view; - }*/ - - /* private View.OnClickListener onSuggestionListener = new View.OnClickListener() { - @Override - public void onClick(View v) { - String currentText = messageTextView.getText().toString(); - String suggestion = ((TextView) v).getText().toString(); - // Don't do any replacement if we have the default suggestion. - if (!defaultSuggestion.equals(suggestion)) { - if (t9Enabled) { - ((T9Handler) currentHandler).replaceWordWith(currentText, suggestion); - } else { - ((KeypadHandler) currentHandler).replaceWordWith(currentText, suggestion); - } - } - } - }; -*/ - - private View.OnClickListener onSuggestionListener = new View.OnClickListener() { @Override public void onClick(View v) { @@ -613,6 +589,10 @@ public void run() { defaultSuggestion = getString(R.string.no_suggestion); shareIntent.setType("text/plain"); + getSupportActionBar().setDisplayHomeAsUpEnabled(false); + getSupportActionBar().setHomeButtonEnabled(false); + getSupportActionBar().setDisplayShowHomeEnabled(false); + if (t9Enabled) { currentHandler = new T9Handler(ContextCompat.getColor(this, R.color.colorAccent_40)); ((T9Handler) currentHandler).setListener(keyPadListener); @@ -633,6 +613,20 @@ public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMen @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_menu, menu); + MenuItem appInfoItem = menu.findItem(R.id.menu_app_info); + appInfoItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { + @Override + public boolean onMenuItemClick(MenuItem item) { + Intent appInfoIntent = new Intent(MainActivity.this, TermsAndConditionsActivity.class); + + //hack so that the back button works correctly + //todo find a better fix + isPassportScene = true; + + startActivity(appInfoIntent); + return false; + } + }); MenuItem item = menu.findItem(R.id.menu_text_share); shareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(item); MenuItem textSizeItem = menu.findItem(R.id.menu_text_font); @@ -640,6 +634,11 @@ public boolean onCreateOptionsMenu(Menu menu) { @Override public boolean onMenuItemClick(MenuItem item) { Intent intent = new Intent(MainActivity.this, FontSizeActivity.class); + + //hack so that the back button works correctly + //todo find a better fix + isPassportScene = true; + startActivity(intent); return false; } diff --git a/app/src/main/java/uk/co/jaspalsvoice/jv/activities/TermsAndConditionsActivity.java b/app/src/main/java/uk/co/jaspalsvoice/jv/activities/TermsAndConditionsActivity.java new file mode 100644 index 0000000..83357a4 --- /dev/null +++ b/app/src/main/java/uk/co/jaspalsvoice/jv/activities/TermsAndConditionsActivity.java @@ -0,0 +1,25 @@ +package uk.co.jaspalsvoice.jv.activities; + +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.support.v7.app.AppCompatActivity; + +import uk.co.jaspalsvoice.jv.R; + +/** + * Created by claudia on 22/04/2017. + */ +public class TermsAndConditionsActivity extends AppCompatActivity { + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_terms_conditions); + } + + @Override + protected void onPause() { + super.onPause(); + finish(); + } +} diff --git a/app/src/main/res/drawable/ic_info_outline_white_24px.xml b/app/src/main/res/drawable/ic_info_outline_white_24px.xml new file mode 100644 index 0000000..96161b7 --- /dev/null +++ b/app/src/main/res/drawable/ic_info_outline_white_24px.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/activity_about_me.xml b/app/src/main/res/layout/activity_about_me.xml index a23f46e..2a41ca1 100644 --- a/app/src/main/res/layout/activity_about_me.xml +++ b/app/src/main/res/layout/activity_about_me.xml @@ -22,69 +22,77 @@ android:id="@+id/sitting_position" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/activity_horizontal_margin" - android:layout_width="match_parent" + android:layout_width="wrap_content" android:padding="@dimen/margin_small" - app:entries="@array/about_me_sitting_position_item"/> + app:entries="@array/about_me_sitting_position_item" + android:layout_weight="1" /> + app:entries="@array/about_me_need_to_use" + android:layout_weight="1" /> + android:padding="@dimen/margin_small" + android:layout_weight="1" /> + app:entries="@array/about_me_breathing_when" + android:layout_weight="1" /> + app:entries="@array/about_me_sleep_position" + android:layout_weight="1" /> + android:padding="@dimen/margin_small" + android:layout_weight="1" /> + android:padding="@dimen/margin_small" + android:layout_weight="1" /> + app:entries="@array/about_me_transfer_to" + android:layout_weight="1" /> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_terms_conditions.xml b/app/src/main/res/layout/activity_terms_conditions.xml new file mode 100644 index 0000000..9b6b65c --- /dev/null +++ b/app/src/main/res/layout/activity_terms_conditions.xml @@ -0,0 +1,19 @@ + + + + + + + diff --git a/app/src/main/res/menu/main_menu.xml b/app/src/main/res/menu/main_menu.xml index 9a5c1d1..6f4437e 100644 --- a/app/src/main/res/menu/main_menu.xml +++ b/app/src/main/res/menu/main_menu.xml @@ -1,6 +1,13 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d46679b..cce920a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -186,4 +186,40 @@ Edit Medical\nRecords + + App information + + Medivoice is developed and owned by Jaspal’s Voice Limited for further information please go to www.Jaspalsvoice.co.uk + \n\n + Medivoice was developed following android app development methodology by an ISO9000-2001 certified company. + \n\n + We endeavour to develop this app so it is intuitive to use and is error free. If you have any comments or feedback please email info@jaspalsvoice.co.uk. We aim to respond within 3 days. + \n\n + Medivoice was tested and validated by patients with neurological conditions eg Parkinsons, MND as well as carers, GPs, disease support groups, consultants and speech and language therapists. + \n\n + Testimonials by the professionals :- + \n\n + “Hi Susan, everyone who has seen it is impressed. I also showed it to a patient who was having difficulty with existing methods.” Professor Ammar Al-Chalabi, Professor of Neurology Kings College London. + \n\n + “Your communication app is inspiring” Jan Clarke, MND Clinical Nurse Specialist + \n\n + “Medivoice can make a difference in people’s lives”, Helen Paterson, Speech and Language Therapist + \n\n + “Medivoice saves me time and provides the information I need accurately and quickly”, Dr Harpreet Aurora, GP + \n\n + Glossary of terms + \n\n + Blood pressure – Two numbers indicating heart performance e.g. 120/80 + \n Blood Glucose – One number that measures the amount of sugar in the blood. Ideal range 70-100 mg/dL + \n Environmental allergy – An adverse reaction to the environment e.g. cat or pollen + \n Food allergy – An adverse reaction to food e.g. Peanuts + \n Hepatic dosage – maximum dosage limit for patients with liver problems + \n Medical allergy – An adverse reaction to medication– e.g. Penicillin, + \n NHS number – a ten digit number assigned to users of the NHS system + \n Renal dosage - maximum dosage limit for patients with kidney problems + \n\n + Jaspal’s Voice takes no responsibility or liability for social media content generated via the Medivoice app. + + +