├── .gitignore ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── libs │ └── volley.jar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── cbitss │ │ └── careforu │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── fonts │ │ │ ├── Gabriola.ttf │ │ │ ├── bradhitc.ttf │ │ │ ├── georgia.ttf │ │ │ ├── georgiab.ttf │ │ │ ├── georgiai.ttf │ │ │ └── georgiaz.ttf │ ├── java │ │ └── com │ │ │ └── cbitss │ │ │ └── careforu │ │ │ ├── AboutUs.java │ │ │ ├── AddReminder.java │ │ │ ├── AlarmActivity.java │ │ │ ├── AlarmReceiver.java │ │ │ ├── ColorGenerator.java │ │ │ ├── CustomAdapter.java │ │ │ ├── CustomDialogClass.java │ │ │ ├── CustomGrid.java │ │ │ ├── CustomList.java │ │ │ ├── DatabaseHandler.java │ │ │ ├── FirstAidCard.java │ │ │ ├── FirstAidContent.java │ │ │ ├── FirstAidContentAdapter.java │ │ │ ├── FirstAidOffline.java │ │ │ ├── FirstAidRVAdapter.java │ │ │ ├── FirstAidTips.java │ │ │ ├── FirstAidTipsHome.java │ │ │ ├── FragmentReminder.java │ │ │ ├── GooglePlacesReadTask.java │ │ │ ├── HealthTips.java │ │ │ ├── Home.java │ │ │ ├── Http.java │ │ │ ├── Knowmed.java │ │ │ ├── MainActivity.java │ │ │ ├── MedInfo.java │ │ │ ├── MedRemInfo.java │ │ │ ├── MedReminderObj.java │ │ │ ├── Nearbyhosp.java │ │ │ ├── Places.java │ │ │ ├── PlacesDisplayTask.java │ │ │ ├── Reminder.java │ │ │ ├── Splash.java │ │ │ └── TextDrawable.java │ └── res │ │ ├── anim │ │ └── slidingimages.xml │ │ ├── color │ │ └── drawer_item.xml │ │ ├── drawable-v21 │ │ ├── diltran.png │ │ ├── ic_menu_slideshow.xml │ │ └── logo2.png │ │ ├── drawable │ │ ├── border_edit_text.xml │ │ ├── border_without_top.xml │ │ ├── boy.jpg │ │ ├── boythree.jpg │ │ ├── boytwo.jpg │ │ ├── careforu.PNG │ │ ├── dil.png │ │ ├── dil_tran.png │ │ ├── firstaidtips.png │ │ ├── flask.png │ │ ├── girl.jpg │ │ ├── girlfour.jpg │ │ ├── girlone.jpg │ │ ├── girlthree.jpg │ │ ├── health_tips.png │ │ ├── hospitals.png │ │ ├── ic_add_black_24dp.xml │ │ ├── ic_add_location_black_24dp.xml │ │ ├── ic_alarm_black_24dp.xml │ │ ├── ic_arrow_back_black_24dp.xml │ │ ├── ic_check_black_24dp.xml │ │ ├── ic_chevron_right_black_24dp.xml │ │ ├── ic_delete_black_24dp.xml │ │ ├── ic_edit_black_24dp.xml │ │ ├── ic_info_black_24dp.xml │ │ ├── ic_info_outline_black_24dp.xml │ │ ├── ic_local_hospital_black_24dp.xml │ │ ├── ic_note_add_black_24dp.xml │ │ ├── ic_power_settings_new_black_24dp.xml │ │ ├── ic_search_black_24dp.xml │ │ ├── ic_watch_later_black_24dp.xml │ │ ├── logo.png │ │ ├── med.png │ │ ├── med_remind.png │ │ ├── medicines.jpg │ │ ├── medreminder.png │ │ ├── nosebleeding.jpg │ │ ├── remind.jpg │ │ ├── rounded_corner.xml │ │ ├── side_nav_bar.xml │ │ ├── splash.png │ │ ├── tip1.jpg │ │ ├── tip2.png │ │ ├── tip3.png │ │ ├── tip4.jpg │ │ └── tip5.png │ │ ├── layout │ │ ├── activity_add_reminder.xml │ │ ├── activity_alarm.xml │ │ ├── activity_first_aid_content.xml │ │ ├── activity_main.xml │ │ ├── activity_med_info.xml │ │ ├── activity_med_rem_info.xml │ │ ├── activity_splash.xml │ │ ├── app_bar_main.xml │ │ ├── card_view.xml │ │ ├── components_view.xml │ │ ├── content_main.xml │ │ ├── custom_dialog.xml │ │ ├── fragment_about_us.xml │ │ ├── fragment_first_aid_offline.xml │ │ ├── fragment_first_aid_tips.xml │ │ ├── fragment_first_aid_tips_home.xml │ │ ├── fragment_health_tips.xml │ │ ├── fragment_home.xml │ │ ├── fragment_knowmed.xml │ │ ├── fragment_nearbyhosp.xml │ │ ├── fragment_reminder.xml │ │ ├── grid_single.xml │ │ ├── imageitem.xml │ │ ├── list_medinfo.xml │ │ └── nav_header_main.xml │ │ ├── menu │ │ ├── activity_main_drawer.xml │ │ └── main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── drawables.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── cbitss │ └── careforu │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshots ├── Screenshot (10).png ├── Screenshot (11).png ├── Screenshot (12).png ├── Screenshot (13).png ├── Screenshot (14).png ├── Screenshot (15).png ├── Screenshot (16).png ├── Screenshot (17).png ├── Screenshot (18).png ├── Screenshot (19).png ├── Screenshot (2).png ├── Screenshot (3).png ├── Screenshot (4).png ├── Screenshot (5).png ├── Screenshot (6).png ├── Screenshot (7).png ├── Screenshot (8).png ├── Screenshot (8-1).png └── Screenshot (9).png └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | 1.8 51 | 52 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion '25.0.0' 6 | defaultConfig { 7 | applicationId "com.cbitss.careforu" 8 | minSdkVersion 15 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | //compile 'com.google.android.gms:play-services:10.0.1' 28 | compile 'com.android.support:cardview-v7:25.1.0' 29 | compile 'com.android.support:recyclerview-v7:25.1.0' 30 | compile 'com.android.support:appcompat-v7:25.1.0' 31 | compile 'com.android.support:design:25.1.0' 32 | compile 'com.android.support:support-v4:25.1.0' 33 | compile 'com.squareup.picasso:picasso:2.5.2' 34 | compile 'com.google.android.gms:play-services:9.0.1' 35 | compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' 36 | compile 'com.android.volley:volley:1.0.0' 37 | compile 'com.squareup.okhttp:okhttp:2.5.0' 38 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 39 | compile 'org.apache.commons:commons-lang3:3.5' 40 | testCompile 'junit:junit:4.12' 41 | } 42 | -------------------------------------------------------------------------------- /app/libs/volley.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/libs/volley.jar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\Rishab\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/cbitss/careforu/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.cbitss.careforu", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 43 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | 59 | 62 | 65 | 66 | 69 | 70 | 74 | 77 | 78 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /app/src/main/assets/fonts/Gabriola.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/assets/fonts/Gabriola.ttf -------------------------------------------------------------------------------- /app/src/main/assets/fonts/bradhitc.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/assets/fonts/bradhitc.ttf -------------------------------------------------------------------------------- /app/src/main/assets/fonts/georgia.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/assets/fonts/georgia.ttf -------------------------------------------------------------------------------- /app/src/main/assets/fonts/georgiab.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/assets/fonts/georgiab.ttf -------------------------------------------------------------------------------- /app/src/main/assets/fonts/georgiai.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/assets/fonts/georgiai.ttf -------------------------------------------------------------------------------- /app/src/main/assets/fonts/georgiaz.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/assets/fonts/georgiaz.ttf -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/AboutUs.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Context; 4 | import android.content.res.AssetManager; 5 | import android.graphics.Typeface; 6 | import android.net.Uri; 7 | import android.os.Bundle; 8 | import android.support.v4.app.Fragment; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.widget.TextView; 13 | 14 | 15 | /** 16 | * A simple {@link Fragment} subclass. 17 | * Activities that contain this fragment must implement the 18 | * {@link OnFragmentInteractionListener} interface 19 | * to handle interaction events. 20 | * Use the {@link AboutUs#newInstance} factory method to 21 | * create an instance of this fragment. 22 | */ 23 | public class AboutUs extends Fragment { 24 | // TODO: Rename parameter arguments, choose names that match 25 | // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER 26 | private static final String ARG_PARAM1 = "param1"; 27 | private static final String ARG_PARAM2 = "param2"; 28 | 29 | // TODO: Rename and change types of parameters 30 | private String mParam1; 31 | private String mParam2; 32 | 33 | private OnFragmentInteractionListener mListener; 34 | 35 | public AboutUs() { 36 | // Required empty public constructor 37 | } 38 | 39 | /** 40 | * Use this factory method to create a new instance of 41 | * this fragment using the provided parameters. 42 | * 43 | * @param param1 Parameter 1. 44 | * @param param2 Parameter 2. 45 | * @return A new instance of fragment AboutUs. 46 | */ 47 | // TODO: Rename and change types and number of parameters 48 | public static AboutUs newInstance(String param1, String param2) { 49 | AboutUs fragment = new AboutUs(); 50 | Bundle args = new Bundle(); 51 | args.putString(ARG_PARAM1, param1); 52 | args.putString(ARG_PARAM2, param2); 53 | fragment.setArguments(args); 54 | return fragment; 55 | } 56 | 57 | @Override 58 | public void onCreate(Bundle savedInstanceState) { 59 | super.onCreate(savedInstanceState); 60 | if (getArguments() != null) { 61 | mParam1 = getArguments().getString(ARG_PARAM1); 62 | mParam2 = getArguments().getString(ARG_PARAM2); 63 | } 64 | } 65 | 66 | @Override 67 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 68 | Bundle savedInstanceState) { 69 | // Inflate the layout for this fragment 70 | View v=inflater.inflate(R.layout.fragment_about_us, container, false); 71 | TextView myTextView = (TextView) v.findViewById(R.id.AbtUs_tv); 72 | Typeface typeface=Typeface.createFromAsset(getActivity().getAssets(), "fonts/bradhitc.ttf"); 73 | myTextView.setTypeface(typeface); 74 | return v; 75 | } 76 | 77 | // TODO: Rename method, update argument and hook method into UI event 78 | public void onButtonPressed(Uri uri) { 79 | if (mListener != null) { 80 | mListener.onFragmentInteraction(uri); 81 | } 82 | } 83 | 84 | @Override 85 | public void onAttach(Context context) { 86 | super.onAttach(context); 87 | if (context instanceof OnFragmentInteractionListener) { 88 | mListener = (OnFragmentInteractionListener) context; 89 | } else { 90 | throw new RuntimeException(context.toString() 91 | + " must implement OnFragmentInteractionListener"); 92 | } 93 | } 94 | 95 | @Override 96 | public void onDetach() { 97 | super.onDetach(); 98 | mListener = null; 99 | } 100 | 101 | /** 102 | * This interface must be implemented by activities that contain this 103 | * fragment to allow an interaction in this fragment to be communicated 104 | * to the activity and potentially other fragments contained in that 105 | * activity. 106 | *

107 | * See the Android Training lesson Communicating with Other Fragments for more information. 110 | */ 111 | public interface OnFragmentInteractionListener { 112 | // TODO: Update argument type and name 113 | void onFragmentInteraction(Uri uri); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/AlarmActivity.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Intent; 4 | import android.icu.text.DateFormat; 5 | import android.icu.text.SimpleDateFormat; 6 | import android.icu.util.Calendar; 7 | import android.os.Build; 8 | import android.os.Bundle; 9 | import android.support.annotation.RequiresApi; 10 | import android.support.v7.app.AppCompatActivity; 11 | import android.view.View; 12 | import android.view.Window; 13 | import android.widget.Button; 14 | import android.widget.TextView; 15 | 16 | import java.util.ArrayList; 17 | 18 | public class AlarmActivity extends AppCompatActivity { 19 | 20 | @RequiresApi(api = Build.VERSION_CODES.N) 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | 24 | super.onCreate(savedInstanceState); 25 | supportRequestWindowFeature(Window.FEATURE_NO_TITLE); 26 | setContentView(R.layout.activity_alarm); 27 | TextView tv=(TextView)findViewById(R.id.AlarmActtextView) ; 28 | TextView name = (TextView) findViewById(R.id.medname); 29 | TextView inst = (TextView) findViewById(R.id.instructions); 30 | 31 | Intent i=getIntent(); 32 | int a=i.getExtras().getInt("AlarmActivityid"); 33 | DatabaseHandler dh= new DatabaseHandler(this); 34 | ArrayList ar=dh.getReminder(a); 35 | 36 | DateFormat df = new SimpleDateFormat("EEE, d MMM yyyy, HH:mm"); 37 | String date = df.format(Calendar.getInstance().getTime()); 38 | tv.setText(date); 39 | name.setText(ar.get(1).toString()); 40 | String instructions = ar.get(2).toString(); 41 | if(instructions.compareTo("")==0) 42 | inst.setVisibility(View.GONE); 43 | else 44 | inst.setText(instructions); 45 | 46 | Button stop=(Button)findViewById(R.id.stop); 47 | 48 | stop.setOnClickListener(new View.OnClickListener() { 49 | public void onClick(View v) { 50 | AlarmReceiver.ringtone.stop(); 51 | finish(); 52 | //android.os.Process.killProcess(android.os.Process.myPid()); 53 | //System.exit(1); 54 | } 55 | }); 56 | 57 | 58 | 59 | 60 | } 61 | 62 | @Override 63 | public void onBackPressed() { 64 | AlarmReceiver.ringtone.stop(); 65 | finish(); 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/AlarmReceiver.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.app.AlarmManager; 4 | import android.app.PendingIntent; 5 | import android.content.BroadcastReceiver; 6 | import android.content.Context; 7 | import android.content.Intent; 8 | import android.media.Ringtone; 9 | import android.media.RingtoneManager; 10 | import android.net.Uri; 11 | import android.os.SystemClock; 12 | import android.util.Log; 13 | import android.widget.Toast; 14 | 15 | import java.text.SimpleDateFormat; 16 | import java.util.ArrayList; 17 | import java.util.Calendar; 18 | 19 | /** 20 | * Created by Harpreet on 12/23/2016. 21 | */ 22 | public class AlarmReceiver extends BroadcastReceiver { 23 | static Ringtone ringtone; 24 | String ending_date; 25 | @Override 26 | public void onReceive(Context context, Intent intent) { 27 | 28 | int a=intent.getIntExtra("Reminderid",2332); 29 | Log.d("integeralarmReceiver ",""+a); 30 | 31 | DatabaseHandler dh= new DatabaseHandler(context); 32 | ArrayList all=dh.getReminder(a); 33 | ending_date= (String) all.get(10); 34 | if( checkEndingDate()==0) 35 | { 36 | Toast.makeText(context, "received", Toast.LENGTH_SHORT).show(); 37 | Uri alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM); 38 | if (alarmUri == null) { 39 | alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); 40 | 41 | } 42 | 43 | //this will update the UI with message 44 | ringtone = RingtoneManager.getRingtone(context, alarmUri); 45 | ringtone.play(); 46 | 47 | Intent i = new Intent().setClass(context,AlarmActivity.class); 48 | i.putExtra("AlarmActivityid",a); 49 | i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK); 50 | context.startActivity(i); 51 | } 52 | else 53 | { 54 | 55 | AlarmManager alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); 56 | int times=Integer.parseInt((String) all.get(4)); 57 | if(times>1) 58 | { 59 | for(int i=0;i mColors; 51 | private final Random mRandom; 52 | 53 | public static ColorGenerator create(List colorList) { 54 | return new ColorGenerator(colorList); 55 | } 56 | 57 | private ColorGenerator(List colorList) { 58 | mColors = colorList; 59 | mRandom = new Random(System.currentTimeMillis()); 60 | } 61 | 62 | public int getRandomColor() { 63 | return mColors.get(mRandom.nextInt(mColors.size())); 64 | } 65 | 66 | public int getColor(Object key) { 67 | return mColors.get(Math.abs(key.hashCode()) % mColors.size()); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/CustomAdapter.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.support.v4.view.PagerAdapter; 6 | import android.support.v4.view.ViewPager; 7 | import android.util.Log; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.view.animation.Animation; 12 | import android.view.animation.AnimationUtils; 13 | import android.widget.ImageView; 14 | 15 | public class CustomAdapter extends PagerAdapter { 16 | 17 | Context context; 18 | int[] imageId = {R.drawable.tip1, R.drawable.tip2, R.drawable.tip3,R.drawable.tip4,R.drawable.tip5}; 19 | 20 | public CustomAdapter(Context context){ 21 | this.context = context; 22 | 23 | } 24 | 25 | public static int cposition=0; 26 | 27 | @Override 28 | public Object instantiateItem(ViewGroup container, int position) { 29 | // TODO Auto-generated method stub 30 | 31 | position=cposition; 32 | LayoutInflater inflater = ((Activity)context).getLayoutInflater(); 33 | Log.d("ffffffffffffffffffff",""+cposition); 34 | View viewItem = inflater.inflate(R.layout.imageitem, container, false); 35 | ImageView imageView = (ImageView) viewItem.findViewById(R.id.imageView); 36 | imageView.setImageResource(imageId[cposition%imageId.length]); 37 | imageView.setScaleType(ImageView.ScaleType.FIT_XY); 38 | cposition++; 39 | 40 | Animation rotateimage = AnimationUtils.loadAnimation(context, R.anim.slidingimages); 41 | imageView.startAnimation(rotateimage); 42 | 43 | ((ViewPager)container).addView(viewItem); 44 | 45 | return viewItem; 46 | } 47 | 48 | @Override 49 | public int getCount() { 50 | // TODO Auto-generated method stub 51 | return imageId.length; 52 | } 53 | 54 | @Override 55 | public boolean isViewFromObject(View view, Object object) { 56 | // TODO Auto-generated method stub 57 | 58 | return view == ((View)object); 59 | } 60 | 61 | 62 | @Override 63 | public void destroyItem(ViewGroup container, int position, Object object) { 64 | // TODO Auto-generated method stub 65 | ((ViewPager) container).removeView((View) object); 66 | } 67 | 68 | } -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/CustomDialogClass.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.app.Activity; 4 | import android.app.Dialog; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.os.Bundle; 8 | import android.view.View; 9 | import android.view.Window; 10 | import android.widget.ImageView; 11 | import android.widget.TextView; 12 | 13 | /** 14 | * Created by Harpreet on 1/3/2017. 15 | */ 16 | 17 | public class CustomDialogClass extends Dialog implements 18 | View.OnClickListener { 19 | 20 | public Activity c; 21 | TextView textView; 22 | public Dialog d; 23 | int img=0; 24 | ImageView g1,g2,g3,b1,b2,b3; 25 | Context con; 26 | 27 | public CustomDialogClass(Activity a, Context c) { 28 | super(a); 29 | // TODO Auto-generated constructor stub 30 | this.c = a; 31 | con=c; 32 | } 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | requestWindowFeature(Window.FEATURE_NO_TITLE); 38 | setContentView(R.layout.custom_dialog); 39 | g1=(ImageView)findViewById(R.id.g1); 40 | g2=(ImageView)findViewById(R.id.g2); 41 | g3=(ImageView)findViewById(R.id.g3); 42 | b1=(ImageView)findViewById(R.id.b1); 43 | b2=(ImageView)findViewById(R.id.b2); 44 | b3=(ImageView)findViewById(R.id.b3); 45 | textView=(TextView)findViewById(R.id.dia_name) ; 46 | g1.setOnClickListener(this); g2.setOnClickListener(this); g3.setOnClickListener(this); 47 | b1.setOnClickListener(this);b2.setOnClickListener(this);b3.setOnClickListener(this); 48 | 49 | } 50 | 51 | @Override 52 | public void onClick(View v) { 53 | switch (v.getId()) { 54 | case R.id.g1: 55 | img=R.drawable.girlone; 56 | break; 57 | case R.id.g2: 58 | img=R.drawable.girlthree; 59 | break; 60 | case R.id.g3: 61 | img=R.drawable.girlfour; 62 | break; 63 | case R.id.b1: 64 | img=R.drawable.boy; 65 | break; 66 | case R.id.b2: 67 | img=R.drawable.boytwo; 68 | break; 69 | case R.id.b3: 70 | img=R.drawable.boythree; 71 | break; 72 | default: 73 | break; 74 | } 75 | 76 | String s=textView.getText().toString(); 77 | Intent in=new Intent(con,MainActivity.class); 78 | in.putExtra("id",img); 79 | in.putExtra("text",s); 80 | 81 | in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 82 | con.startActivity(in); 83 | c.finish(); 84 | 85 | dismiss(); 86 | } 87 | 88 | } -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/CustomGrid.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | /** 4 | * Created by Rishab on 6/28/2017. 5 | */ 6 | 7 | import android.content.Context; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.BaseAdapter; 12 | import android.widget.ImageView; 13 | import android.widget.TextView; 14 | 15 | public class CustomGrid extends BaseAdapter{ 16 | private Context mContext; 17 | private final String[] text; 18 | private final int[] Imageid; 19 | 20 | public CustomGrid(Context c,String[] text,int[] Imageid ) { 21 | mContext = c; 22 | this.Imageid = Imageid; 23 | this.text = text; 24 | } 25 | 26 | @Override 27 | public int getCount() { 28 | // TODO Auto-generated method stub 29 | return text.length; 30 | } 31 | 32 | @Override 33 | public Object getItem(int position) { 34 | // TODO Auto-generated method stub 35 | return null; 36 | } 37 | 38 | @Override 39 | public long getItemId(int position) { 40 | // TODO Auto-generated method stub 41 | return 0; 42 | } 43 | 44 | @Override 45 | public View getView(int position, View convertView, ViewGroup parent) { 46 | // TODO Auto-generated method stub 47 | View grid; 48 | LayoutInflater inflater = (LayoutInflater) mContext 49 | .getSystemService(Context.LAYOUT_INFLATER_SERVICE); 50 | 51 | if (convertView == null) { 52 | 53 | grid = new View(mContext); 54 | grid = inflater.inflate(R.layout.grid_single, null); 55 | TextView textView = (TextView) grid.findViewById(R.id.grid_text); 56 | ImageView imageView = (ImageView)grid.findViewById(R.id.grid_image); 57 | textView.setText(text[position]); 58 | imageView.setImageResource(Imageid[position]); 59 | } else { 60 | grid = (View) convertView; 61 | } 62 | 63 | return grid; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/CustomList.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | /** 4 | * Created by Harpreet on 1/3/2017. 5 | */ 6 | 7 | import android.app.Activity; 8 | import android.graphics.Color; 9 | import android.graphics.Typeface; 10 | import android.util.Log; 11 | import android.util.TypedValue; 12 | import android.view.LayoutInflater; 13 | import android.view.View; 14 | import android.view.ViewGroup; 15 | import android.widget.ArrayAdapter; 16 | import android.widget.ImageView; 17 | import android.widget.TextView; 18 | 19 | import java.util.List; 20 | import java.util.Random; 21 | 22 | /** 23 | * Created by Belal on 7/22/2015. 24 | */ 25 | public class CustomList extends ArrayAdapter { 26 | private List names; 27 | private String[] desc; 28 | private Activity context; 29 | 30 | public CustomList(Activity context, List names, String[] desc) { 31 | super(context, R.layout.list_medinfo, names); 32 | this.context = context; 33 | this.names = names; 34 | this.desc = desc; 35 | 36 | } 37 | String color_hex[]={"#ff4000","#0000ff","#003EFF","#5C246E","#8B668B","#CD2990","#D41A1F","#FBDB0C","#FF6600"}; 38 | @Override 39 | public View getView(int position, View convertView, ViewGroup parent) { 40 | //******************************************************************** 41 | ViewHolder holder; 42 | LayoutInflater inflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE); 43 | // If holder not exist then locate all view from UI file. 44 | if (convertView == null) { 45 | // inflate UI from XML file 46 | convertView = inflater.inflate(R.layout.list_medinfo, parent, false); 47 | // get all UI view 48 | holder = new ViewHolder(convertView); 49 | // set tag for holder 50 | convertView.setTag(holder); 51 | } else { 52 | // if holder created, get tag from view 53 | holder = (ViewHolder) convertView.getTag(); 54 | } 55 | 56 | holder.textView.setText(getItem(position)); 57 | String firstLetter = null; 58 | //get first letter of each String item 59 | 60 | Log.d("String",getItem(position)); 61 | String str=getItem(position); 62 | 63 | firstLetter=String.valueOf(str.charAt(0)).toUpperCase(); 64 | // firstLetter.toUpperCase(); 65 | ColorGenerator generator = ColorGenerator.MATERIAL; // or use DEFAULT 66 | // generate random color 67 | //int color = generator.getColor(getItem(position)); 68 | 69 | int color = generator.getRandomColor(); 70 | int pos= new Random().nextInt(color_hex.length); 71 | color = Color.parseColor(color_hex[pos]); 72 | Log.d("Color",""+pos); 73 | 74 | TextDrawable drawable = TextDrawable.builder() 75 | .buildRound(firstLetter, color); // radius in px 76 | 77 | holder.imageView.setImageDrawable(drawable); 78 | 79 | return convertView; 80 | //*********************************************************************** 81 | /* LayoutInflater inflater = context.getLayoutInflater(); 82 | View listViewItem = inflater.inflate(R.layout.list_medinfo, null, true); 83 | TextView textViewName = (TextView) listViewItem.findViewById(R.id.medname); 84 | TextView textViewDesc = (TextView) listViewItem.findViewById(R.id.textViewDesc); 85 | ImageView image = (ImageView) listViewItem.findViewById(R.id.imageView); 86 | 87 | textViewName.setText(names.get(position).toString()); 88 | textViewDesc.setText(desc[position]); 89 | image.setImageResource(imageid[position]); 90 | return listViewItem;*/ 91 | } 92 | 93 | private class ViewHolder { 94 | private ImageView imageView; 95 | private TextView textView; 96 | 97 | public ViewHolder(View v) { 98 | imageView = (ImageView) v.findViewById(R.id.medimage); 99 | textView = (TextView) v.findViewById(R.id.medname); 100 | Typeface typeface=Typeface.createFromAsset(context.getAssets(), "fonts/georgia.ttf"); 101 | textView.setTypeface(typeface); 102 | textView.setTextSize(TypedValue.COMPLEX_UNIT_SP,20); 103 | } 104 | } 105 | } 106 | 107 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/DatabaseHandler.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.ContentValues; 4 | import android.content.Context; 5 | import android.database.Cursor; 6 | import android.database.sqlite.SQLiteDatabase; 7 | import android.database.sqlite.SQLiteOpenHelper; 8 | import android.util.Log; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * Created by Harpreet on 12/24/2016. 15 | */ 16 | 17 | public class DatabaseHandler extends SQLiteOpenHelper { 18 | 19 | // All Static variables 20 | // Database Version 21 | private static final int DATABASE_VERSION = 1; 22 | 23 | // Database Name 24 | private static final String DATABASE_NAME = "ReminderManager"; 25 | 26 | // table name 27 | private static final String TABLE_REMINDERS = "Reminders"; 28 | private static final String TABLE_TIPS = "Tips"; 29 | 30 | // Table Columns names 31 | 32 | public DatabaseHandler(Context context) { 33 | super(context, DATABASE_NAME, null, DATABASE_VERSION); 34 | } 35 | 36 | // Creating Tables 37 | @Override 38 | public void onCreate(SQLiteDatabase db) { 39 | String CREATE_REMINDERS_TABLE = "CREATE TABLE " + TABLE_REMINDERS + "( counter INTEGER PRIMARY KEY , medname TEXT , medinfo TEXT,"+ 40 | "interval INTEGER ,TimeUnit TEXT,Freq INTEGER,weekdays TEXT,Times TEXT, StartTime TEXT,StartDate DATE,EndDate DATE)"; 41 | db.execSQL(CREATE_REMINDERS_TABLE); 42 | String CREATE_TIPS_TABLE = "CREATE TABLE " + TABLE_TIPS + "( id INTEGER PRIMARY KEY, title TEXT,"+ 43 | "intro_text TEXT )"; 44 | db.execSQL(CREATE_TIPS_TABLE); 45 | Log.d("DatabaseHandler","Database Created"); 46 | } 47 | 48 | // Upgrading database 49 | @Override 50 | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { 51 | // Drop older table if existed 52 | db.execSQL("DROP TABLE IF EXISTS " + TABLE_REMINDERS); 53 | db.execSQL("DROP TABLE IF EXISTS " + TABLE_TIPS); 54 | // Create tables again 55 | onCreate(db); 56 | } 57 | 58 | int deleteReminder(String name) 59 | { 60 | SQLiteDatabase db = this.getWritableDatabase(); 61 | return db.delete(TABLE_REMINDERS,"medname" + "='" + name + "'",null); 62 | } 63 | 64 | void addReminder(ArrayList al) { 65 | SQLiteDatabase db = this.getWritableDatabase(); 66 | 67 | ContentValues values = new ContentValues(); 68 | values.put("counter", (int) al.get(0)); 69 | values.put("medname", ""+al.get(1)); 70 | values.put("medinfo", ""+al.get(2)); 71 | values.put("interval", (int) al.get(3)); 72 | values.put("TimeUnit", ""+al.get(4)); 73 | values.put("Freq", ""+al.get(5)); 74 | values.put("weekdays", ""+al.get(6)); 75 | values.put("Times",""+al.get(7)); 76 | values.put("StartTime", ""+al.get(8)); 77 | values.put("StartDate", ""+al.get(9)); 78 | values.put("EndDate", ""+al.get(10)); 79 | 80 | // Inserting Row 81 | db.insert(TABLE_REMINDERS, null, values); 82 | Log.d("Inserted:","Row Inserted"); 83 | db.close(); // Closing database connection 84 | 85 | ArrayList all=new ArrayList(); 86 | all.add(al.get(0)); 87 | all.add(al.get(1)); 88 | //final boolean hi = al.add("hi"); 89 | FragmentReminder rm=new FragmentReminder(); 90 | rm.receiveData(al); 91 | } 92 | 93 | void addTips(ArrayList al) { 94 | SQLiteDatabase db = this.getWritableDatabase(); 95 | ContentValues values = new ContentValues(); 96 | values.put("id", (int)al.get(0)); 97 | values.put("title", ""+al.get(1)); 98 | values.put("intro_text", ""+al.get(2)); 99 | 100 | // Inserting Row 101 | db.insert(TABLE_TIPS, null, values); 102 | Log.d("Inserted:",values+""); 103 | db.close(); // Closing database connection 104 | } 105 | 106 | 107 | 108 | // Getting single contact 109 | ArrayList getReminder(int count) { 110 | SQLiteDatabase db = this.getReadableDatabase(); 111 | 112 | Cursor cursor = db.query(TABLE_REMINDERS, new String[] { "counter","medname", 113 | "medinfo", "interval","TimeUnit","Freq","weekdays","Times","StartTime","StartDate","EndDate"}, "counter" + "=?", 114 | new String[] { ""+count },null,null,null,null); 115 | if (cursor != null) 116 | cursor.moveToFirst(); 117 | 118 | ArrayList al=new ArrayList(); 119 | 120 | al.add(cursor.getString(0));al.add(cursor.getString(1));al.add(cursor.getString(2));al.add(cursor.getString(3)); 121 | al.add(cursor.getString(4));al.add(cursor.getString(5));al.add(cursor.getString(6));al.add(cursor.getString(7)); 122 | al.add(cursor.getString(8));al.add(cursor.getString(9));al.add(cursor.getString(10)); 123 | 124 | return al; 125 | 126 | } 127 | 128 | // Getting All Contacts 129 | public ArrayList getAllReminders() { 130 | ArrayList ReminderList = new ArrayList(); 131 | // Select All Query 132 | String selectQuery = "SELECT * FROM " + TABLE_REMINDERS; 133 | 134 | SQLiteDatabase db = this.getWritableDatabase(); 135 | Cursor cursor = db.rawQuery(selectQuery, null); 136 | 137 | // looping through all rows and adding to list 138 | if (cursor.moveToFirst()){ 139 | do{ 140 | ReminderList.add(cursor.getString(1)); 141 | }while(cursor.moveToNext()); 142 | db.close(); 143 | } 144 | 145 | return ReminderList; 146 | } 147 | 148 | public List getAllTips(String path) { 149 | List TipsList = new ArrayList<>(); 150 | // Select All Query 151 | String selectQuery = "SELECT * FROM " + TABLE_TIPS; 152 | 153 | SQLiteDatabase db = this.getWritableDatabase(); 154 | Cursor cursor = db.rawQuery(selectQuery, null); 155 | 156 | // looping through all rows and adding to list 157 | if (cursor.moveToFirst()) { 158 | do { 159 | 160 | TipsList.add(new FirstAidCard(Integer.parseInt(cursor.getString(0)),cursor.getString(1), 161 | cursor.getString(2),"file://"+path+"/"+cursor.getString(0)+"_0.jpg")); 162 | } while (cursor.moveToNext()); 163 | } 164 | db.close(); 165 | 166 | return TipsList; 167 | } 168 | 169 | 170 | // Getting Reminder Count 171 | public int getRemindersCount() { 172 | String countQuery = "SELECT * FROM " + TABLE_REMINDERS; 173 | SQLiteDatabase db = this.getWritableDatabase(); 174 | Cursor cursor = db.rawQuery(countQuery, null); 175 | if(cursor.getCount()==0) 176 | return 0; 177 | // looping through all rows and adding to list 178 | cursor.moveToLast(); 179 | int count=Integer.parseInt(cursor.getString(0)); 180 | 181 | db.close(); 182 | return count; 183 | } 184 | 185 | public ArrayList getReminder(String s) { 186 | SQLiteDatabase db = this.getReadableDatabase(); 187 | 188 | Cursor cursor = db.query(TABLE_REMINDERS, new String[] { "counter","medname", 189 | "medinfo", "interval","TimeUnit","Freq","weekdays","Times","StartTime","StartDate","EndDate"}, "medname" + "=?", 190 | new String[] {s },null,null,null,null); 191 | if (cursor != null) 192 | cursor.moveToFirst(); 193 | 194 | ArrayList al=new ArrayList(); 195 | 196 | al.add(cursor.getString(0));al.add(cursor.getString(1));al.add(cursor.getString(2));al.add(cursor.getString(3)); 197 | al.add(cursor.getString(4));al.add(cursor.getString(5));al.add(cursor.getString(6));al.add(cursor.getString(7)); 198 | al.add(cursor.getString(8));al.add(cursor.getString(9));al.add(cursor.getString(10)); 199 | 200 | return al; 201 | } 202 | } 203 | 204 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/FirstAidCard.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | /** 7 | * Created by Rishab on 12/29/2016. 8 | */ 9 | 10 | public class FirstAidCard { 11 | 12 | int id; 13 | String title,content; 14 | String imageId; 15 | 16 | FirstAidCard(int id,String title,String content,String imageId) 17 | { 18 | this.title = title; 19 | this.id=id; 20 | this.content = content; 21 | this.imageId = imageId; 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/FirstAidContentAdapter.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.support.v4.app.Fragment; 4 | import android.support.v4.app.FragmentManager; 5 | import android.support.v4.app.FragmentStatePagerAdapter; 6 | 7 | import static android.icu.lang.UCharacter.GraphemeClusterBreak.T; 8 | 9 | /** 10 | * Created by Rishab on 1/3/2017. 11 | */ 12 | 13 | public class FirstAidContentAdapter extends FragmentStatePagerAdapter { 14 | 15 | int tabno; 16 | public FirstAidContentAdapter(FragmentManager fm, int t) 17 | { 18 | super(fm); 19 | tabno=t; 20 | } 21 | @Override 22 | public Fragment getItem(int position) { 23 | switch(position) 24 | { 25 | case 0: FirstAidTips firstAidTips= new FirstAidTips(); 26 | return firstAidTips; 27 | case 1: FirstAidOffline firstAidOffline= new FirstAidOffline(); 28 | return firstAidOffline; 29 | default: return null; 30 | } 31 | } 32 | 33 | @Override 34 | public int getCount() { 35 | return tabno; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/FirstAidOffline.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Context; 4 | import android.net.Uri; 5 | import android.os.Bundle; 6 | import android.support.v4.app.Fragment; 7 | import android.support.v4.widget.SwipeRefreshLayout; 8 | import android.support.v7.widget.CardView; 9 | import android.support.v7.widget.LinearLayoutManager; 10 | import android.support.v7.widget.RecyclerView; 11 | import android.util.Log; 12 | import android.view.LayoutInflater; 13 | import android.view.View; 14 | import android.view.ViewGroup; 15 | import android.widget.ListView; 16 | import android.widget.Toast; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import static android.icu.lang.UCharacter.GraphemeClusterBreak.T; 22 | import static com.cbitss.careforu.R.id.rv; 23 | import static com.google.android.gms.wallet.PaymentInstrumentType.getAll; 24 | 25 | 26 | /** 27 | * A simple {@link Fragment} subclass. 28 | * Activities that contain this fragment must implement the 29 | * {@link OnFragmentInteractionListener} interface 30 | * to handle interaction events. 31 | * Use the {@link FirstAidOffline#newInstance} factory method to 32 | * create an instance of this fragment. 33 | */ 34 | public class FirstAidOffline extends Fragment implements SwipeRefreshLayout.OnRefreshListener{ 35 | // TODO: Rename parameter arguments, choose names that match 36 | // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER 37 | private static final String ARG_PARAM1 = "param1"; 38 | private static final String ARG_PARAM2 = "param2"; 39 | 40 | // TODO: Rename and change types of parameters 41 | private String mParam1; 42 | private String mParam2; 43 | SwipeRefreshLayout swipeRefreshLayout; 44 | private OnFragmentInteractionListener mListener; 45 | RecyclerView rv; 46 | CardView cardView; 47 | List firstAidCardList; 48 | 49 | public FirstAidOffline() { 50 | // Required empty public constructor 51 | } 52 | 53 | /** 54 | * Use this factory method to create a new instance of 55 | * this fragment using the provided parameters. 56 | * 57 | * @param param1 Parameter 1. 58 | * @param param2 Parameter 2. 59 | * @return A new instance of fragment FirstAidOffline. 60 | */ 61 | // TODO: Rename and change types and number of parameters 62 | public static FirstAidOffline newInstance(String param1, String param2) { 63 | FirstAidOffline fragment = new FirstAidOffline(); 64 | Bundle args = new Bundle(); 65 | args.putString(ARG_PARAM1, param1); 66 | args.putString(ARG_PARAM2, param2); 67 | fragment.setArguments(args); 68 | return fragment; 69 | } 70 | 71 | @Override 72 | public void onCreate(Bundle savedInstanceState) { 73 | super.onCreate(savedInstanceState); 74 | if (getArguments() != null) { 75 | mParam1 = getArguments().getString(ARG_PARAM1); 76 | mParam2 = getArguments().getString(ARG_PARAM2); 77 | } 78 | } 79 | 80 | @Override 81 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 82 | Bundle savedInstanceState) { 83 | View v =inflater.inflate(R.layout.fragment_first_aid_tips, container, false); 84 | rv = (RecyclerView)v.findViewById(R.id.rv); 85 | cardView = (CardView) v.findViewById(R.id.card); 86 | // Setting layout manager for recycler view 87 | LinearLayoutManager llm = new LinearLayoutManager(getActivity()); 88 | rv.setLayoutManager(llm); 89 | swipeRefreshLayout = (SwipeRefreshLayout)v.findViewById(R.id.tips_swipe_layout); 90 | swipeRefreshLayout.setOnRefreshListener(this); 91 | refresh(); 92 | return v; 93 | // Inflate the layout for this fragment 94 | } 95 | 96 | 97 | 98 | 99 | // TODO: Rename method, update argument and hook method into UI event 100 | public void onButtonPressed(Uri uri) { 101 | if (mListener != null) { 102 | mListener.onFragmentInteraction(uri); 103 | } 104 | } 105 | 106 | @Override 107 | public void onAttach(Context context) { 108 | super.onAttach(context); 109 | if (context instanceof OnFragmentInteractionListener) { 110 | mListener = (OnFragmentInteractionListener) context; 111 | } else { 112 | throw new RuntimeException(context.toString() 113 | + " must implement OnFragmentInteractionListener"); 114 | } 115 | } 116 | 117 | @Override 118 | public void onDetach() { 119 | super.onDetach(); 120 | mListener = null; 121 | } 122 | 123 | @Override 124 | public void onRefresh() { 125 | refresh(); 126 | } 127 | 128 | public void refresh() 129 | { 130 | DatabaseHandler dh = new DatabaseHandler(getActivity()); 131 | firstAidCardList = dh.getAllTips(getActivity().getExternalFilesDir(null)+""); 132 | FirstAidRVAdapter adapter = new FirstAidRVAdapter(firstAidCardList,getActivity(),true); 133 | rv.setAdapter(adapter); 134 | swipeRefreshLayout.setRefreshing(false); 135 | } 136 | @Override 137 | public void setUserVisibleHint(boolean isVisibleToUser) { 138 | super.setUserVisibleHint(isVisibleToUser); 139 | if(isVisibleToUser){ 140 | refresh(); 141 | } 142 | } 143 | 144 | 145 | 146 | /** 147 | * This interface must be implemented by activities that contain this 148 | * fragment to allow an interaction in this fragment to be communicated 149 | * to the activity and potentially other fragments contained in that 150 | * activity. 151 | *

152 | * See the Android Training lesson Communicating with Other Fragments for more information. 155 | */ 156 | public interface OnFragmentInteractionListener { 157 | // TODO: Update argument type and name 158 | void onFragmentInteraction(Uri uri); 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/FirstAidRVAdapter.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | /** 4 | * Created by Rishab on 12/29/2016. 5 | */ 6 | 7 | import android.app.ProgressDialog; 8 | import android.content.Context; 9 | import android.content.Intent; 10 | import android.os.AsyncTask; 11 | import android.support.v7.widget.CardView; 12 | import android.support.v7.widget.RecyclerView; 13 | import android.view.LayoutInflater; 14 | import android.view.View; 15 | import android.view.ViewGroup; 16 | import android.widget.ImageView; 17 | import android.widget.TextView; 18 | import android.widget.Toast; 19 | 20 | import com.android.volley.Request; 21 | import com.android.volley.RequestQueue; 22 | import com.android.volley.Response; 23 | import com.android.volley.VolleyError; 24 | import com.android.volley.toolbox.StringRequest; 25 | import com.android.volley.toolbox.Volley; 26 | import com.squareup.picasso.Picasso; 27 | 28 | import java.util.HashMap; 29 | import java.util.List; 30 | import java.util.Map; 31 | 32 | public class FirstAidRVAdapter extends RecyclerView.Adapter{ 33 | private static final String CONTENT_URL="http://careforu.esy.es/first_aid_content.php"; 34 | 35 | List firstAidList; 36 | boolean offline; 37 | Context context; 38 | String htmlres,photo,text,title; int pid; 39 | 40 | FirstAidRVAdapter(List firstAidList, Context context, boolean offline) 41 | { 42 | this.firstAidList = firstAidList; 43 | this.offline = offline; 44 | this.context = context; 45 | } 46 | 47 | 48 | @Override 49 | public TipsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 50 | View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.card_view, parent, false); 51 | TipsViewHolder tvh = new TipsViewHolder(v); 52 | return tvh; 53 | } 54 | 55 | @Override 56 | public void onBindViewHolder(TipsViewHolder holder, final int position) { 57 | holder.title.setText(firstAidList.get(position).title); 58 | holder.content.setText(firstAidList.get(position).content); 59 | Picasso.with(context).load(firstAidList.get(position).imageId).into(holder.image); 60 | holder.cv.setOnClickListener(new View.OnClickListener() { 61 | @Override 62 | public void onClick(View v) { 63 | pid = firstAidList.get(position).id; 64 | text = firstAidList.get(position).content; 65 | photo = firstAidList.get(position).imageId; 66 | title = firstAidList.get(position).title; 67 | if(offline) 68 | { 69 | Intent intent = new Intent(context,FirstAidContent.class); 70 | intent.putExtra("pid",pid); 71 | intent.putExtra("offline",true); 72 | intent.putExtra("title",title); 73 | context.startActivity(intent); 74 | } 75 | else 76 | getContent(pid); 77 | } 78 | }); 79 | //holder.image.setImageResource(firstAidList.get(position).imageId); 80 | 81 | } 82 | 83 | @Override 84 | public int getItemCount() { 85 | return firstAidList.size(); 86 | } 87 | 88 | @Override 89 | public void onAttachedToRecyclerView(RecyclerView recyclerView) { 90 | super.onAttachedToRecyclerView(recyclerView); 91 | } 92 | 93 | public static class TipsViewHolder extends RecyclerView.ViewHolder { 94 | CardView cv; 95 | TextView title; 96 | TextView content; 97 | ImageView image; 98 | 99 | TipsViewHolder(View itemView) { 100 | super(itemView); 101 | cv = (CardView)itemView.findViewById(R.id.card); 102 | title = (TextView)itemView.findViewById(R.id.ftips_title); 103 | content = (TextView)itemView.findViewById(R.id.ftips_content); 104 | image = (ImageView)itemView.findViewById(R.id.ftips_image); 105 | } 106 | } 107 | void loadContent(final int id){ 108 | 109 | } 110 | 111 | 112 | private void getContent(final int id) { 113 | 114 | class GetContent extends AsyncTask { 115 | ProgressDialog loading; 116 | @Override 117 | protected void onPreExecute() { 118 | super.onPreExecute(); 119 | loading = ProgressDialog.show(context, "Fetching Data...","Please Wait...",true,true); 120 | } 121 | 122 | @Override 123 | protected void onPostExecute(String s) { 124 | super.onPostExecute(s); 125 | } 126 | 127 | @Override 128 | protected String doInBackground(String... params) { 129 | StringRequest stringRequest = new StringRequest(Request.Method.POST,CONTENT_URL, 130 | new Response.Listener() { 131 | @Override 132 | public void onResponse(String response) { 133 | //Toast.makeText(context,response,Toast.LENGTH_LONG).show(); 134 | htmlres = response; 135 | loading.dismiss(); 136 | Intent intent = new Intent(context,FirstAidContent.class); 137 | intent.putExtra("html",htmlres); 138 | intent.putExtra("offline",false); 139 | intent.putExtra("pid",pid); 140 | intent.putExtra("text",text); 141 | intent.putExtra("photo",photo); 142 | intent.putExtra("title",title); 143 | context.startActivity(intent); 144 | } 145 | }, 146 | new Response.ErrorListener() { 147 | @Override 148 | public void onErrorResponse(VolleyError error) { 149 | Toast.makeText(context,error.toString()+"\nPlease Try again in a while",Toast.LENGTH_LONG).show(); 150 | } 151 | }){ 152 | @Override 153 | protected Map getParams(){ 154 | Map params = new HashMap(); 155 | params.put("id",String.valueOf(id)); 156 | return params; 157 | } 158 | 159 | }; 160 | 161 | RequestQueue requestQueue = Volley.newRequestQueue(context); 162 | requestQueue.add(stringRequest); 163 | return null; 164 | } 165 | } 166 | GetContent gc = new GetContent(); 167 | gc.execute(); 168 | } 169 | } 170 | 171 | 172 | /*//loadImage(firstAidList.get(position).imageId,holder.image); 173 | private void loadImage(String url,ImageView iv){ 174 | 175 | class DownloadImageTask extends AsyncTask { 176 | ImageView bmImage; 177 | 178 | public DownloadImageTask(ImageView bmImage) { 179 | this.bmImage = bmImage; 180 | } 181 | 182 | protected Bitmap doInBackground(String... urls) { 183 | String urldisplay = urls[0]; 184 | Bitmap mIcon11 = null; 185 | try { 186 | InputStream in = new java.net.URL(urldisplay).openStream(); 187 | mIcon11 = BitmapFactory.decodeStream(in); 188 | } catch (Exception e) { 189 | Log.e("Error", e.getMessage()); 190 | e.printStackTrace(); 191 | } 192 | return mIcon11; 193 | } 194 | 195 | protected void onPostExecute(Bitmap result) { 196 | bmImage.setImageBitmap(result); 197 | } 198 | } 199 | 200 | new DownloadImageTask(iv).execute(url); 201 | }*/ 202 | 203 | 204 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/FirstAidTips.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.app.ProgressDialog; 4 | import android.content.Context; 5 | import android.net.Uri; 6 | import android.os.AsyncTask; 7 | import android.os.Bundle; 8 | import android.os.Handler; 9 | import android.support.v4.app.Fragment; 10 | import android.support.v4.widget.SwipeRefreshLayout; 11 | import android.support.v7.widget.CardView; 12 | import android.support.v7.widget.LinearLayoutManager; 13 | import android.support.v7.widget.RecyclerView; 14 | import android.util.Log; 15 | import android.view.LayoutInflater; 16 | import android.view.View; 17 | import android.view.ViewGroup; 18 | import android.widget.Toast; 19 | 20 | import java.io.BufferedReader; 21 | import java.io.InputStreamReader; 22 | import java.net.HttpURLConnection; 23 | import java.net.URL; 24 | import java.util.ArrayList; 25 | import java.util.List; 26 | 27 | 28 | /** 29 | * A simple {@link Fragment} subclass. 30 | * Activities that contain this fragment must implement the 31 | * {@link OnFragmentInteractionListener} interface 32 | * to handle interaction events. 33 | * Use the {@link FirstAidTips#newInstance} factory method to 34 | * create an instance of this fragment. 35 | */ 36 | public class FirstAidTips extends Fragment { 37 | // TODO: Rename parameter arguments, choose names that match 38 | // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER 39 | private static final String ARG_PARAM1 = "param1"; 40 | private static final String ARG_PARAM2 = "param2"; 41 | RecyclerView rv; 42 | List firstAidCardList; 43 | SwipeRefreshLayout swipeRefreshLayout; 44 | ProgressDialog loading; 45 | private static final String IMAGES_URL = "http://careforu.esy.es/first_aid_tips.php"; 46 | 47 | String str[]; 48 | CardView cardView; 49 | Fragment fragment; 50 | 51 | // TODO: Rename and change types of parameters 52 | private String mParam1; 53 | private String mParam2; 54 | 55 | private OnFragmentInteractionListener mListener; 56 | 57 | public FirstAidTips() { 58 | // Required empty public constructor 59 | } 60 | 61 | /** 62 | * Use this factory method to create a new instance of 63 | * this fragment using the provided parameters. 64 | * 65 | * @param param1 Parameter 1. 66 | * @param param2 Parameter 2. 67 | * @return A new instance of fragment FirstAidTips. 68 | */ 69 | // TODO: Rename and change types and number of parameters 70 | public static FirstAidTips newInstance(String param1, String param2) { 71 | FirstAidTips fragment = new FirstAidTips(); 72 | Bundle args = new Bundle(); 73 | args.putString(ARG_PARAM1, param1); 74 | args.putString(ARG_PARAM2, param2); 75 | fragment.setArguments(args); 76 | return fragment; 77 | } 78 | 79 | @Override 80 | public void onCreate(Bundle savedInstanceState) { 81 | super.onCreate(savedInstanceState); 82 | if (getArguments() != null) { 83 | mParam1 = getArguments().getString(ARG_PARAM1); 84 | mParam2 = getArguments().getString(ARG_PARAM2); 85 | } 86 | } 87 | 88 | @Override 89 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 90 | Bundle savedInstanceState) { 91 | getActivity().setTitle("First Aid Tips"); 92 | fragment = this; 93 | View v =inflater.inflate(R.layout.fragment_first_aid_tips, container, false); 94 | rv = (RecyclerView)v.findViewById(R.id.rv); 95 | cardView = (CardView) v.findViewById(R.id.card); 96 | // Setting layout manager for recycler view 97 | LinearLayoutManager llm = new LinearLayoutManager(getActivity()); 98 | rv.setLayoutManager(llm); 99 | swipeRefreshLayout = (SwipeRefreshLayout)v.findViewById(R.id.tips_swipe_layout); 100 | getAll(); 101 | swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { 102 | @Override 103 | public void onRefresh() { 104 | getAll(); 105 | } 106 | }); 107 | return v; 108 | } 109 | 110 | // TODO: Rename method, update argument and hook method into UI event 111 | public void onButtonPressed(Uri uri) { 112 | if (mListener != null) { 113 | mListener.onFragmentInteraction(uri); 114 | } 115 | } 116 | 117 | @Override 118 | public void onAttach(Context context) { 119 | super.onAttach(context); 120 | if (context instanceof OnFragmentInteractionListener) { 121 | mListener = (OnFragmentInteractionListener) context; 122 | } else { 123 | throw new RuntimeException(context.toString() 124 | + " must implement OnFragmentInteractionListener"); 125 | } 126 | } 127 | 128 | @Override 129 | public void onDetach() { 130 | super.onDetach(); 131 | mListener = null; 132 | } 133 | 134 | /** 135 | * This interface must be implemented by activities that contain this 136 | * fragment to allow an interaction in this fragment to be communicated 137 | * to the activity and potentially other fragments contained in that 138 | * activity. 139 | *

140 | * See the Android Training lesson Communicating with Other Fragments for more information. 143 | */ 144 | public interface OnFragmentInteractionListener { 145 | // TODO: Update argument type and name 146 | void onFragmentInteraction(Uri uri); 147 | } 148 | 149 | private void getAll() { 150 | 151 | class GetData extends AsyncTask { 152 | @Override 153 | protected void onPreExecute() { 154 | super.onPreExecute(); 155 | loading = ProgressDialog.show(getActivity(), "Fetching Data...","Please Wait...",true,true); 156 | } 157 | 158 | @Override 159 | protected void onPostExecute(String s) { 160 | super.onPostExecute(s); 161 | Log.d("hello",s+""); 162 | loading.dismiss(); 163 | if(s!=null) 164 | { 165 | str = s.split("~"); 166 | //Adding data to list 167 | firstAidCardList = new ArrayList<>(); 168 | for(int i=0;i 131 | * See the Android Training lesson Communicating with Other Fragments for more information. 134 | */ 135 | public interface OnFragmentInteractionListener { 136 | // TODO: Update argument type and name 137 | void onFragmentInteraction(Uri uri); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/FragmentReminder.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.net.Uri; 6 | import android.os.Bundle; 7 | import android.support.design.widget.FloatingActionButton; 8 | import android.support.v4.app.Fragment; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.widget.AdapterView; 13 | import android.widget.ArrayAdapter; 14 | import android.widget.ListView; 15 | import android.widget.TextView; 16 | 17 | import java.util.ArrayList; 18 | import java.util.List; 19 | 20 | import static android.view.View.GONE; 21 | 22 | 23 | /** 24 | * A simple {@link Fragment} subclass. 25 | * Activities that contain this fragment must implement the 26 | * {@link OnFragmentInteractionListener} interface 27 | * to handle interaction events. 28 | * Use the {@link FragmentReminder#newInstance} factory method to 29 | * create an instance of this fragment. 30 | */ 31 | public class FragmentReminder extends Fragment implements View.OnClickListener{ 32 | // TODO: Rename parameter arguments, choose names that match 33 | // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER 34 | private static final String ARG_PARAM1 = "param1"; 35 | private static final String ARG_PARAM2 = "param2"; 36 | 37 | // TODO: Rename and change types of parameters 38 | private String mParam1; 39 | private String mParam2; 40 | private ArrayList al; 41 | private List list=new ArrayList(); 42 | private ArrayAdapter adapter; 43 | ListView lv; 44 | TextView tv; 45 | FloatingActionButton fab; 46 | 47 | private OnFragmentInteractionListener mListener; 48 | 49 | public FragmentReminder() { 50 | // Required empty public constructor 51 | } 52 | 53 | public void receiveData(ArrayList al) 54 | { 55 | this.al=al; 56 | list.add(al.get(0)); 57 | 58 | } 59 | /** 60 | * Use this factory method to create a new instance of 61 | * this fragment using the provided parameters. 62 | * 63 | * @param param1 Parameter 1. 64 | * @param param2 Parameter 2. 65 | * @return A new instance of fragment FragmentReminder. 66 | */ 67 | // TODO: Rename and change types and number of parameters 68 | public static FragmentReminder newInstance(String param1, String param2) { 69 | FragmentReminder fragment = new FragmentReminder(); 70 | Bundle args = new Bundle(); 71 | args.putString(ARG_PARAM1, param1); 72 | args.putString(ARG_PARAM2, param2); 73 | fragment.setArguments(args); 74 | return fragment; 75 | } 76 | 77 | @Override 78 | public void onCreate(Bundle savedInstanceState) { 79 | super.onCreate(savedInstanceState); 80 | if (getArguments() != null) { 81 | mParam1 = getArguments().getString(ARG_PARAM1); 82 | mParam2 = getArguments().getString(ARG_PARAM2); 83 | } 84 | } 85 | 86 | //data for customlist************************************************************************************ 87 | 88 | private String desc[] = {}; 89 | 90 | 91 | //************************************************************************************* 92 | 93 | 94 | @Override 95 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 96 | Bundle savedInstanceState) { 97 | getActivity().setTitle("Medicine Reminder"); 98 | View v=inflater.inflate(R.layout.fragment_reminder, container, false); 99 | fab=(FloatingActionButton)v.findViewById(R.id.floatingActionButton); 100 | lv=(ListView)v.findViewById(R.id.rem_lv); 101 | tv=(TextView) v.findViewById(R.id.reminder_tv); 102 | 103 | fab.setOnClickListener(this); 104 | DatabaseHandler db=new DatabaseHandler(getContext()); 105 | list=db.getAllReminders(); 106 | 107 | if(list.size()==0) 108 | { 109 | lv.setVisibility(GONE); 110 | return v; 111 | } 112 | 113 | tv.setVisibility(GONE); 114 | 115 | adapter = new CustomList(getActivity(),list,desc); 116 | lv.setAdapter(adapter); 117 | 118 | //***Customised list view add*********************************************************************** 119 | /* CustomList customList = new CustomList(getActivity(),list, desc); 120 | lv.setAdapter(customList);*/ 121 | 122 | lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { 123 | @Override 124 | public void onItemClick(AdapterView adapterView, View view, int i, long l) { 125 | //Toast.makeText(getActivity(),"You Clicked "+list.get(i),Toast.LENGTH_SHORT).show(); 126 | //addReminderInCalendar(); 127 | Intent in=new Intent(getActivity(),MedRemInfo.class); 128 | in.putExtra("id",list.get(i).toString()); 129 | startActivity(in); 130 | } 131 | }); 132 | //*************************************************************************** 133 | 134 | return v; 135 | } 136 | 137 | // TODO: Rename method, update argument and hook method into UI event 138 | public void onButtonPressed(Uri uri) { 139 | if (mListener != null) { 140 | mListener.onFragmentInteraction(uri); 141 | } 142 | } 143 | 144 | @Override 145 | public void onAttach(Context context) { 146 | super.onAttach(context); 147 | if (context instanceof OnFragmentInteractionListener) { 148 | mListener = (OnFragmentInteractionListener) context; 149 | } else { 150 | throw new RuntimeException(context.toString() 151 | + " must implement OnFragmentInteractionListener"); 152 | } 153 | } 154 | 155 | @Override 156 | public void onDetach() { 157 | super.onDetach(); 158 | mListener = null; 159 | } 160 | 161 | @Override 162 | public void onClick(View v) { 163 | Intent in=new Intent(getActivity(),AddReminder.class); 164 | startActivity(in); 165 | } 166 | 167 | /** 168 | * This interface must be implemented by activities that contain this 169 | * fragment to allow an interaction in this fragment to be communicated 170 | * to the activity and potentially other fragments contained in that 171 | * activity. 172 | *

173 | * See the Android Training lesson Communicating with Other Fragments for more information. 176 | */ 177 | public interface OnFragmentInteractionListener { 178 | // TODO: Update argument type and name 179 | void onFragmentInteraction(Uri uri); 180 | } 181 | } 182 | 183 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/GooglePlacesReadTask.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Context; 4 | import android.os.AsyncTask; 5 | import android.util.Log; 6 | 7 | import com.google.android.gms.maps.GoogleMap; 8 | 9 | public class GooglePlacesReadTask extends AsyncTask { 10 | String googlePlacesData = null; 11 | GoogleMap googleMap; 12 | 13 | Context context; 14 | 15 | public GooglePlacesReadTask(Context context) 16 | { 17 | this.context = context; 18 | } 19 | @Override 20 | protected String doInBackground(Object... inputObj) { 21 | try { 22 | googleMap = (GoogleMap) inputObj[0]; 23 | String googlePlacesUrl = (String) inputObj[1]; 24 | Http http = new Http(); 25 | googlePlacesData = http.read(googlePlacesUrl); 26 | Log.d("Google Place Read Task",googlePlacesData); 27 | } catch (Exception e) { 28 | Log.d("Google Place Read Task", e.toString()); 29 | } 30 | return googlePlacesData; 31 | } 32 | 33 | @Override 34 | protected void onPostExecute(String result) { 35 | PlacesDisplayTask placesDisplayTask = new PlacesDisplayTask(context); 36 | Object[] toPass = new Object[2]; 37 | toPass[0] = googleMap; 38 | toPass[1] = result; 39 | placesDisplayTask.execute(toPass); 40 | } 41 | } -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/HealthTips.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Context; 4 | import android.net.Uri; 5 | import android.os.Bundle; 6 | import android.support.v4.app.Fragment; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | import android.webkit.WebView; 11 | import android.webkit.WebViewClient; 12 | 13 | 14 | /** 15 | * A simple {@link Fragment} subclass. 16 | * Activities that contain this fragment must implement the 17 | * {@link OnFragmentInteractionListener} interface 18 | * to handle interaction events. 19 | * Use the {@link HealthTips#newInstance} factory method to 20 | * create an instance of this fragment. 21 | */ 22 | public class HealthTips extends Fragment { 23 | // TODO: Rename parameter arguments, choose names that match 24 | // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER 25 | private static final String ARG_PARAM1 = "param1"; 26 | private static final String ARG_PARAM2 = "param2"; 27 | 28 | // TODO: Rename and change types of parameters 29 | private String mParam1; 30 | private String mParam2; 31 | 32 | private OnFragmentInteractionListener mListener; 33 | 34 | public HealthTips() { 35 | // Required empty public constructor 36 | } 37 | 38 | /** 39 | * Use this factory method to create a new instance of 40 | * this fragment using the provided parameters. 41 | * 42 | * @param param1 Parameter 1. 43 | * @param param2 Parameter 2. 44 | * @return A new instance of fragment HealthTips. 45 | */ 46 | // TODO: Rename and change types and number of parameters 47 | public static HealthTips newInstance(String param1, String param2) { 48 | HealthTips fragment = new HealthTips(); 49 | Bundle args = new Bundle(); 50 | args.putString(ARG_PARAM1, param1); 51 | args.putString(ARG_PARAM2, param2); 52 | fragment.setArguments(args); 53 | return fragment; 54 | } 55 | 56 | @Override 57 | public void onCreate(Bundle savedInstanceState) { 58 | super.onCreate(savedInstanceState); 59 | if (getArguments() != null) { 60 | mParam1 = getArguments().getString(ARG_PARAM1); 61 | mParam2 = getArguments().getString(ARG_PARAM2); 62 | } 63 | } 64 | 65 | WebView w; 66 | 67 | @Override 68 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 69 | Bundle savedInstanceState) { 70 | // Inflate the layout for this fragment 71 | getActivity().setTitle("Health Tips"); 72 | View v=inflater.inflate(R.layout.fragment_health_tips, container, false); 73 | w=(WebView)v.findViewById(R.id.w_health); 74 | w.setWebViewClient(new dyk()); 75 | w.getSettings().getLoadsImagesAutomatically(); 76 | w.getSettings().getJavaScriptEnabled(); 77 | w.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); 78 | w.loadUrl("http://www.gkfacts.in/search/label/Health Tips"); 79 | //w.loadUrl("https://www.google.co.in/"); 80 | return v; 81 | } 82 | 83 | public class dyk extends WebViewClient { 84 | @Override 85 | public boolean shouldOverrideUrlLoading(WebView view, String url) { 86 | view.loadUrl(url); 87 | return true; 88 | } 89 | } 90 | 91 | // TODO: Rename method, update argument and hook method into UI event 92 | public void onButtonPressed(Uri uri) { 93 | if (mListener != null) { 94 | mListener.onFragmentInteraction(uri); 95 | } 96 | } 97 | 98 | @Override 99 | public void onAttach(Context context) { 100 | super.onAttach(context); 101 | if (context instanceof OnFragmentInteractionListener) { 102 | mListener = (OnFragmentInteractionListener) context; 103 | } else { 104 | throw new RuntimeException(context.toString() 105 | + " must implement OnFragmentInteractionListener"); 106 | } 107 | } 108 | 109 | @Override 110 | public void onDetach() { 111 | super.onDetach(); 112 | mListener = null; 113 | } 114 | 115 | /** 116 | * This interface must be implemented by activities that contain this 117 | * fragment to allow an interaction in this fragment to be communicated 118 | * to the activity and potentially other fragments contained in that 119 | * activity. 120 | *

121 | * See the Android Training lesson Communicating with Other Fragments for more information. 124 | */ 125 | public interface OnFragmentInteractionListener { 126 | // TODO: Update argument type and name 127 | void onFragmentInteraction(Uri uri); 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/Home.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Context; 4 | import android.net.Uri; 5 | import android.os.Bundle; 6 | import android.os.Handler; 7 | import android.support.v4.app.Fragment; 8 | import android.support.v4.app.FragmentTransaction; 9 | import android.support.v4.view.PagerAdapter; 10 | import android.support.v4.view.ViewPager; 11 | import android.view.LayoutInflater; 12 | import android.view.View; 13 | import android.view.ViewGroup; 14 | import android.widget.AdapterView; 15 | import android.widget.GridView; 16 | 17 | import java.util.Timer; 18 | import java.util.TimerTask; 19 | 20 | 21 | /** 22 | * A simple {@link Fragment} subclass. 23 | * Activities that contain this fragment must implement the 24 | * {@link OnFragmentInteractionListener} interface 25 | * to handle interaction events. 26 | * Use the {@link Home#newInstance} factory method to 27 | * create an instance of this fragment. 28 | */ 29 | public class Home extends Fragment { 30 | // TODO: Rename parameter arguments, choose names that match 31 | // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER 32 | private static final String ARG_PARAM1 = "param1"; 33 | private static final String ARG_PARAM2 = "param2"; 34 | 35 | // TODO: Rename and change types of parameters 36 | private String mParam1; 37 | private String mParam2; 38 | GridView grid; 39 | String[] text = { "Med Reminder","Health Tips","Know Your Med","First Aid Tips","Nearby Hospitals" }; 40 | int[] imageId = { R.drawable.med_remind,R.drawable.health_tips,R.drawable.med,R.drawable.firstaidtips,R.drawable.hospitals}; 41 | 42 | private OnFragmentInteractionListener mListener; 43 | 44 | public Home() { 45 | // Required empty public constructor 46 | } 47 | 48 | /** 49 | * Use this factory method to create a new instance of 50 | * this fragment using the provided parameters. 51 | * 52 | * @param param1 Parameter 1. 53 | * @param param2 Parameter 2. 54 | * @return A new instance of fragment Home. 55 | */ 56 | // TODO: Rename and change types and number of parameters 57 | public static Home newInstance(String param1, String param2) { 58 | Home fragment = new Home(); 59 | Bundle args = new Bundle(); 60 | args.putString(ARG_PARAM1, param1); 61 | args.putString(ARG_PARAM2, param2); 62 | fragment.setArguments(args); 63 | return fragment; 64 | } 65 | 66 | @Override 67 | public void onCreate(Bundle savedInstanceState) { 68 | super.onCreate(savedInstanceState); 69 | if (getArguments() != null) { 70 | mParam1 = getArguments().getString(ARG_PARAM1); 71 | mParam2 = getArguments().getString(ARG_PARAM2); 72 | } 73 | } 74 | 75 | ViewPager viewPager; 76 | @Override 77 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 78 | Bundle savedInstanceState) { 79 | getActivity().setTitle("Care For U"); 80 | View v=inflater.inflate(R.layout.fragment_home, container, false); 81 | // Inflate the layout for this fragment 82 | viewPager = (ViewPager)v.findViewById(R.id.viewPager); 83 | final PagerAdapter adapter = new CustomAdapter(getContext()); 84 | 85 | final Handler mHandler = new Handler(); 86 | 87 | // Create runnable for posting 88 | final Runnable mUpdateResults = new Runnable() { 89 | public void run() { 90 | 91 | viewPager.setAdapter(adapter); 92 | 93 | } 94 | }; 95 | 96 | int delay = 1000; // delay for 1 sec. 97 | int period = 5000; // repeat every 5 sec. 98 | Timer timer = new Timer(); 99 | 100 | timer.scheduleAtFixedRate(new TimerTask() { 101 | 102 | public void run() { 103 | 104 | mHandler.post(mUpdateResults); 105 | 106 | } 107 | 108 | }, delay, period); 109 | 110 | //Setting grid view 111 | CustomGrid gridAdapter = new CustomGrid(getContext(), text, imageId); 112 | grid=(GridView) v.findViewById(R.id.grid_home); 113 | grid.setAdapter(gridAdapter); 114 | grid.setOnItemClickListener(new AdapterView.OnItemClickListener() { 115 | 116 | @Override 117 | public void onItemClick(AdapterView parent, View view, 118 | int position, long id) { 119 | switch(position) 120 | { 121 | case 0 : 122 | { 123 | FragmentReminder rm=new FragmentReminder(); 124 | FragmentTransaction transaction = getFragmentManager().beginTransaction(); 125 | transaction.addToBackStack(null); 126 | transaction.replace(R.id.container,rm).commit(); 127 | break; 128 | } 129 | case 1 : 130 | { 131 | HealthTips rm=new HealthTips(); 132 | FragmentTransaction transaction = getFragmentManager().beginTransaction(); 133 | transaction.addToBackStack(null); 134 | transaction.replace(R.id.container,rm).commit(); 135 | break; 136 | } 137 | case 2 : 138 | { 139 | Knowmed rm=new Knowmed(); 140 | FragmentTransaction transaction = getFragmentManager().beginTransaction(); 141 | transaction.addToBackStack(null); 142 | transaction.replace(R.id.container,rm).commit(); 143 | break; 144 | } 145 | case 3 : 146 | { 147 | FirstAidTips rm=new FirstAidTips(); 148 | FragmentTransaction transaction = getFragmentManager().beginTransaction(); 149 | transaction.addToBackStack(null); 150 | transaction.replace(R.id.container,rm).commit(); 151 | break; 152 | } 153 | case 4 : 154 | { 155 | Nearbyhosp rm=new Nearbyhosp(); 156 | FragmentTransaction transaction = getFragmentManager().beginTransaction(); 157 | transaction.addToBackStack(null); 158 | transaction.replace(R.id.container,rm).commit(); 159 | break; 160 | } 161 | } 162 | 163 | } 164 | }); 165 | 166 | return v; 167 | } 168 | 169 | public void onButtonPressed(Uri uri) { 170 | if (mListener != null) { 171 | mListener.onFragmentInteraction(uri); 172 | } 173 | } 174 | 175 | @Override 176 | public void onAttach(Context context) { 177 | super.onAttach(context); 178 | if (context instanceof OnFragmentInteractionListener) { 179 | mListener = (OnFragmentInteractionListener) context; 180 | } else { 181 | throw new RuntimeException(context.toString() 182 | + " must implement OnFragmentInteractionListener"); 183 | } 184 | } 185 | 186 | @Override 187 | public void onDetach() { 188 | super.onDetach(); 189 | mListener = null; 190 | } 191 | 192 | /** 193 | * This interface must be implemented by activities that contain this 194 | * fragment to allow an interaction in this fragment to be communicated 195 | * to the activity and potentially other fragments contained in that 196 | * activity. 197 | *

198 | * See the Android Training lesson Communicating with Other Fragments for more information. 201 | */ 202 | public interface OnFragmentInteractionListener { 203 | // TODO: Update argument type and name 204 | void onFragmentInteraction(Uri uri); 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/Http.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.util.Log; 4 | 5 | import java.io.BufferedReader; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | import java.io.InputStreamReader; 9 | import java.net.HttpURLConnection; 10 | import java.net.URL; 11 | 12 | public class Http { 13 | 14 | public String read(String httpUrl) throws IOException { 15 | String httpData = ""; 16 | InputStream inputStream = null; 17 | HttpURLConnection httpURLConnection = null; 18 | try { 19 | URL url = new URL(httpUrl); 20 | httpURLConnection = (HttpURLConnection) url.openConnection(); 21 | httpURLConnection.connect(); 22 | inputStream = httpURLConnection.getInputStream(); 23 | BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); 24 | StringBuffer stringBuffer = new StringBuffer(); 25 | String line = ""; 26 | while ((line = bufferedReader.readLine()) != null) { 27 | stringBuffer.append(line); 28 | } 29 | httpData = stringBuffer.toString(); 30 | bufferedReader.close(); 31 | } catch (Exception e) { 32 | Log.d("Exception - reading", e.toString()); 33 | } finally { 34 | inputStream.close(); 35 | httpURLConnection.disconnect(); 36 | } 37 | return httpData; 38 | } 39 | } -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/MedInfo.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.app.ProgressDialog; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.os.AsyncTask; 7 | import android.os.Bundle; 8 | import android.support.v7.app.AppCompatActivity; 9 | import android.text.Html; 10 | import android.view.LayoutInflater; 11 | import android.view.MenuItem; 12 | import android.view.View; 13 | import android.view.ViewGroup; 14 | import android.widget.TextView; 15 | 16 | import com.squareup.okhttp.Callback; 17 | import com.squareup.okhttp.MediaType; 18 | import com.squareup.okhttp.OkHttpClient; 19 | import com.squareup.okhttp.Request; 20 | import com.squareup.okhttp.Response; 21 | 22 | import org.apache.commons.lang3.text.WordUtils; 23 | import org.json.JSONArray; 24 | import org.json.JSONException; 25 | import org.json.JSONObject; 26 | 27 | import java.io.IOException; 28 | 29 | public class MedInfo extends AppCompatActivity implements Callback { 30 | 31 | String ID,token; ProgressDialog loading; 32 | JSONObject info;JSONArray components; 33 | TextView info_heading,nametv,sizetv,pricetv,manufacturertv; 34 | String name,price,manufacturer,type,size,constituents; 35 | //TODO: Alternatives and constituents 36 | @Override 37 | protected void onCreate(Bundle savedInstanceState) { 38 | super.onCreate(savedInstanceState); 39 | 40 | //Adding back button to actionBar 41 | android.support.v7.app.ActionBar actionBar = getSupportActionBar(); 42 | actionBar.setHomeButtonEnabled(true); 43 | actionBar.setDisplayHomeAsUpEnabled(true); 44 | 45 | //Initialising Views 46 | setContentView(R.layout.activity_med_info); 47 | info_heading = (TextView) findViewById(R.id.info_heading); 48 | nametv = (TextView) findViewById(R.id.name); 49 | sizetv = (TextView) findViewById(R.id.size); 50 | manufacturertv = (TextView) findViewById(R.id.manufacturer); 51 | pricetv = (TextView) findViewById(R.id.price); 52 | 53 | //Getting token and ID 54 | Intent intent = getIntent(); 55 | ID = intent.getStringExtra("ID"); 56 | token = intent.getStringExtra("token"); 57 | name=intent.getStringExtra("name"); 58 | setTitle(WordUtils.capitalizeFully(name)); 59 | // Making new equest for Complete data for given ID 60 | final OkHttpClient client = new OkHttpClient(); 61 | MediaType JSON = MediaType.parse("application/json; charset=utf-8"); 62 | final Request request = new Request.Builder() 63 | .addHeader("authorization", "Bearer " + token) 64 | .url("http://www.healthos.co/api/v1/medicines/brands/" +ID) 65 | .build(); 66 | client.newCall(request).enqueue(this); 67 | //makeRequest(this); //TODO: make it async task 68 | 69 | } 70 | 71 | @Override 72 | public boolean onOptionsItemSelected(MenuItem item) { 73 | onBackPressed(); 74 | return true; 75 | } 76 | 77 | private void makeRequest(final MedInfo medInfo) 78 | { 79 | class GetData extends AsyncTask 80 | { 81 | 82 | @Override 83 | protected void onPreExecute() { 84 | super.onPreExecute(); 85 | loading = ProgressDialog.show(getApplicationContext(), "Loading..","Please Wait...",true,true); 86 | } 87 | 88 | @Override 89 | protected Void doInBackground(Object... params) { 90 | 91 | return null; 92 | } 93 | 94 | @Override 95 | protected void onPostExecute(Void aVoid) { 96 | super.onPostExecute(aVoid); 97 | loading.dismiss(); 98 | } 99 | } 100 | final GetData getData = new GetData(); 101 | getData.execute(); 102 | } 103 | @Override 104 | public void onFailure(Request request, IOException e) { 105 | e.printStackTrace(); 106 | } 107 | 108 | @Override 109 | public void onResponse(Response response) throws IOException { 110 | if (!response.isSuccessful()) { 111 | throw new IOException("Unexpected code " + response); 112 | } else { 113 | try { 114 | info = new JSONObject(response.body().string()); 115 | name = info.getString("name"); 116 | price = info.getString("price"); 117 | manufacturer = info.getString("manufacturer"); 118 | type = info.getString("package_form"); 119 | size = info.getString("size"); 120 | components = info.getJSONArray("components"); 121 | 122 | runOnUiThread(new Runnable() { 123 | @Override 124 | public void run() { 125 | //Setting information 126 | nametv.setText(name); 127 | pricetv.setText("Rs. " + price); 128 | manufacturertv.setText(manufacturer); 129 | sizetv.setText(size); 130 | 131 | 132 | 133 | for(int i=0;i= android.os.Build.VERSION_CODES.N) { 153 | instructions.setText(Html.fromHtml(components.getJSONObject(i).getString("instructions"),Html.FROM_HTML_MODE_LEGACY)); 154 | } else { 155 | instructions.setText(Html.fromHtml(components.getJSONObject(i).getString("instructions"))); 156 | } 157 | 158 | used_for.setText(components.getJSONObject(i).getString("used_for")); 159 | side_effects.setText(components.getJSONObject(i).getString("side_effects")); 160 | how_it_works.setText(components.getJSONObject(i).getString("how_it_works")); 161 | parent.addView(v); 162 | } catch (JSONException e) { 163 | e.printStackTrace(); 164 | } 165 | 166 | } 167 | 168 | } 169 | }); 170 | } catch (JSONException e) { 171 | e.printStackTrace(); 172 | } 173 | } 174 | 175 | } 176 | } 177 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/MedRemInfo.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Intent; 4 | import android.graphics.Color; 5 | import android.os.Bundle; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.View; 8 | import android.widget.LinearLayout; 9 | import android.widget.RelativeLayout; 10 | import android.widget.TextView; 11 | import android.widget.Toast; 12 | 13 | import java.util.ArrayList; 14 | 15 | import static android.view.View.GONE; 16 | 17 | public class MedRemInfo extends AppCompatActivity { 18 | TextView name,info,interval,unit,freq,startTime,startDate,endDate,title; //TODO: Handle Weekdays 19 | TextView timers[]= new TextView[6]; 20 | String timers_val[]; 21 | LinearLayout freq_layout,starting_time_layout,weekdays_layout; 22 | RelativeLayout frequency_rl; 23 | ArrayList ar; 24 | 25 | //String medname,medinfo,timeunit,weekdays,times,startdate,starttime,enddate; 26 | //int freq,interval; 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | 30 | super.onCreate(savedInstanceState); 31 | setContentView(R.layout.activity_med_rem_info); 32 | 33 | Intent in=getIntent(); 34 | String s=in.getExtras().getString("id"); 35 | 36 | DatabaseHandler db=new DatabaseHandler(this); 37 | ar=db.getReminder(s); 38 | 39 | title = (TextView) findViewById(R.id.title_rem); 40 | name = (TextView) findViewById(R.id.name); 41 | info = (TextView) findViewById(R.id.info_rm); 42 | interval = (TextView) findViewById(R.id.interval); 43 | unit = (TextView) findViewById(R.id.time_unit); 44 | freq = (TextView) findViewById(R.id.freq); 45 | startTime = (TextView) findViewById(R.id.starting_time); 46 | startDate = (TextView) findViewById(R.id.starting_date); 47 | endDate = (TextView) findViewById(R.id.ending_date); 48 | freq_layout = (LinearLayout) findViewById(R.id.freq_layout); 49 | weekdays_layout = (LinearLayout) findViewById(R.id.weekdays_layout); 50 | starting_time_layout = (LinearLayout) findViewById(R.id.starting_time_layout); 51 | frequency_rl = (RelativeLayout) findViewById(R.id.frequency_rl); 52 | timers[0]=(TextView) findViewById(R.id.time1); 53 | timers[1]=(TextView) findViewById(R.id.time2); 54 | timers[2]=(TextView) findViewById(R.id.time3); 55 | timers[3]=(TextView) findViewById(R.id.time4); 56 | timers[4]=(TextView) findViewById(R.id.time5); 57 | timers[5]=(TextView) findViewById(R.id.time6); 58 | 59 | title.setText(ar.get(1).toString()); 60 | name.setText(ar.get(1).toString()); 61 | if(ar.get(2).toString().equals("")) 62 | info.setText("No instructions added"); 63 | else 64 | { 65 | info.setText(ar.get(2).toString()); 66 | info.setTextColor(Color.parseColor("#000000")); 67 | } 68 | interval.setText(ar.get(3).toString()); 69 | unit.setText(ar.get(4).toString()); 70 | freq.setText(ar.get(5).toString()+" times"); 71 | timers_val = ar.get(7).toString().split("\\s+"); 72 | startTime.setText(ar.get(8).toString()); 73 | startDate.setText(ar.get(9).toString()); 74 | endDate.setText(ar.get(10).toString()); 75 | 76 | if( unit.getText().equals("hours")) 77 | { 78 | weekdays_layout.setVisibility(GONE); 79 | freq_layout.setVisibility(GONE); 80 | frequency_rl.setVisibility(GONE); 81 | starting_time_layout.setVisibility(View.VISIBLE); 82 | } 83 | else if(unit.getText().equals("weeks")) 84 | { 85 | weekdays_layout.setVisibility(View.VISIBLE); 86 | frequency_rl.setVisibility(View.VISIBLE); 87 | freq_layout.setVisibility(View.VISIBLE); 88 | starting_time_layout.setVisibility(GONE); 89 | } 90 | else if(unit.getText().equals("days")) 91 | { 92 | weekdays_layout.setVisibility(GONE); 93 | frequency_rl.setVisibility(View.VISIBLE); 94 | freq_layout.setVisibility(View.VISIBLE); 95 | starting_time_layout.setVisibility(GONE); 96 | } 97 | 98 | // Toast.makeText(this,ar.get(6).toString(), Toast.LENGTH_SHORT).show(); 99 | 100 | if( unit.getText().equals("weeks") || unit.getText().equals("days")) 101 | { 102 | for(int i=0;i0) 118 | { 119 | Toast.makeText(this, "Alarm Deleted Successfully", Toast.LENGTH_SHORT).show(); 120 | Intent intent = new Intent(this,MainActivity.class); 121 | intent.putExtra("frag","Med Reminder"); 122 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); 123 | startActivity(intent); 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/MedReminderObj.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | 4 | import android.app.AlarmManager; 5 | import android.app.PendingIntent; 6 | import android.content.Context; 7 | import android.content.Intent; 8 | import android.util.Log; 9 | 10 | import java.util.Calendar; 11 | import java.util.GregorianCalendar; 12 | import java.util.HashMap; 13 | import java.util.Map; 14 | 15 | /** 16 | * Created by hp on 6/28/2017. 17 | */ 18 | 19 | public class MedReminderObj { 20 | 21 | int interval, times; 22 | String timers[], time_unit; 23 | String starting_time, starting_date, ending_date, medname, medinfo, weekday; 24 | AlarmManager alarmMgr; 25 | PendingIntent alarmIntent; 26 | Calendar cur_cal; 27 | Intent intent; 28 | Context context; 29 | int alarmReqCode; 30 | 31 | public MedReminderObj(Context context, int count ,int interval, int times, String[] timers, String time_unit, String starting_time, 32 | String starting_date,String ending_date, String medname, String medinfo, String weekday) { 33 | this.context = context; 34 | this.interval = interval; 35 | this.times = times; 36 | this.timers = timers; 37 | this.time_unit = time_unit; 38 | this.starting_time = starting_time; 39 | this.starting_date = starting_date; 40 | this.ending_date = ending_date; 41 | this.medname = medname; 42 | this.medinfo = medinfo; 43 | this.weekday = weekday; 44 | alarmReqCode=count; 45 | } 46 | 47 | public void setMedReminder() { 48 | int mins = Integer.parseInt(starting_time.substring(starting_time.lastIndexOf(':') + 1)); 49 | int hrs = Integer.parseInt(starting_time.substring(0, starting_time.lastIndexOf(':'))); 50 | 51 | cur_cal = new GregorianCalendar(); 52 | cur_cal.setTimeInMillis(System.currentTimeMillis());//set the current time and date for this calendar 53 | 54 | Calendar cal = Calendar.getInstance(); 55 | cal.set(Calendar.HOUR_OF_DAY, hrs); 56 | cal.set(Calendar.MINUTE, mins); 57 | 58 | intent = new Intent(context, AlarmReceiver.class); 59 | intent.putExtra("Reminderid",alarmReqCode); 60 | alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); 61 | 62 | if (time_unit.equals("hours")) { 63 | 64 | int hr = (int) interval; 65 | long t=cal.getTimeInMillis(); 66 | long tim= System.currentTimeMillis(); 67 | alarmIntent = PendingIntent.getBroadcast(context,alarmReqCode, intent, PendingIntent.FLAG_UPDATE_CURRENT); 68 | alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP,t, hr * 60 * 60 * 1000, alarmIntent); 69 | } 70 | 71 | else if (time_unit.equals("days")) { 72 | PendingIntent pintentDay[]=new PendingIntent[times]; 73 | 74 | Map map = new HashMap(); 75 | for(int i=0;i map = new HashMap(); 98 | for(int i=0;i> parse(JSONObject jsonObject) { 14 | JSONArray jsonArray = null; 15 | try { 16 | jsonArray = jsonObject.getJSONArray("results"); 17 | } catch (JSONException e) { 18 | e.printStackTrace(); 19 | } 20 | return getPlaces(jsonArray); 21 | } 22 | 23 | private List> getPlaces(JSONArray jsonArray) { 24 | int placesCount = jsonArray.length(); 25 | List> placesList = new ArrayList>(); 26 | HashMap placeMap = null; 27 | 28 | for (int i = 0; i < placesCount; i++) { 29 | try { 30 | placeMap = getPlace((JSONObject) jsonArray.get(i)); 31 | placesList.add(placeMap); 32 | 33 | } catch (JSONException e) { 34 | e.printStackTrace(); 35 | } 36 | } 37 | return placesList; 38 | } 39 | 40 | private HashMap getPlace(JSONObject googlePlaceJson) { 41 | HashMap googlePlaceMap = new HashMap(); 42 | String placeName = "-NA-"; 43 | String vicinity = "-NA-"; 44 | String latitude = ""; 45 | String longitude = ""; 46 | String reference = ""; 47 | 48 | try { 49 | if (!googlePlaceJson.isNull("name")) { 50 | placeName = googlePlaceJson.getString("name"); 51 | } 52 | if (!googlePlaceJson.isNull("vicinity")) { 53 | vicinity = googlePlaceJson.getString("vicinity"); 54 | } 55 | latitude = googlePlaceJson.getJSONObject("geometry").getJSONObject("location").getString("lat"); 56 | longitude = googlePlaceJson.getJSONObject("geometry").getJSONObject("location").getString("lng"); 57 | reference = googlePlaceJson.getString("reference"); 58 | googlePlaceMap.put("place_name", placeName); 59 | googlePlaceMap.put("vicinity", vicinity); 60 | googlePlaceMap.put("lat", latitude); 61 | googlePlaceMap.put("lng", longitude); 62 | googlePlaceMap.put("reference", reference); 63 | } catch (JSONException e) { 64 | e.printStackTrace(); 65 | } 66 | return googlePlaceMap; 67 | } 68 | } -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/PlacesDisplayTask.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Context; 4 | import android.os.AsyncTask; 5 | import android.util.Log; 6 | import android.widget.Toast; 7 | 8 | import com.google.android.gms.maps.GoogleMap; 9 | import com.google.android.gms.maps.model.LatLng; 10 | import com.google.android.gms.maps.model.MarkerOptions; 11 | 12 | import org.json.JSONObject; 13 | 14 | import java.util.HashMap; 15 | import java.util.List; 16 | 17 | public class PlacesDisplayTask extends AsyncTask>> { 18 | 19 | JSONObject googlePlacesJson; 20 | GoogleMap googleMap; 21 | Context context; 22 | 23 | public PlacesDisplayTask(Context context) 24 | { 25 | this.context = context; 26 | } 27 | 28 | @Override 29 | protected List> doInBackground(Object... inputObj) { 30 | 31 | List> googlePlacesList = null; 32 | Places placeJsonParser = new Places(); 33 | 34 | try { 35 | googleMap = (GoogleMap) inputObj[0]; 36 | googlePlacesJson = new JSONObject((String) inputObj[1]); 37 | googlePlacesList = placeJsonParser.parse(googlePlacesJson); 38 | } catch (Exception e) { 39 | Log.d("Exception", e.toString()); 40 | } 41 | return googlePlacesList; 42 | } 43 | 44 | @Override 45 | protected void onPostExecute(List> list) { 46 | googleMap.clear(); 47 | if(list!=null) 48 | { 49 | for (int i = 0; i < list.size(); i++) { 50 | MarkerOptions markerOptions = new MarkerOptions(); 51 | HashMap googlePlace = list.get(i); 52 | double lat = Double.parseDouble(googlePlace.get("lat")); 53 | double lng = Double.parseDouble(googlePlace.get("lng")); 54 | String placeName = googlePlace.get("place_name"); 55 | String vicinity = googlePlace.get("vicinity"); 56 | LatLng latLng = new LatLng(lat, lng); 57 | markerOptions.position(latLng); 58 | markerOptions.title(placeName + " : " + vicinity); 59 | googleMap.addMarker(markerOptions); 60 | } 61 | } 62 | else 63 | { 64 | Toast.makeText(context, "No Internet Connection", Toast.LENGTH_SHORT).show(); 65 | } 66 | 67 | } 68 | } 69 | 70 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/Reminder.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.net.Uri; 6 | import android.os.Bundle; 7 | import android.support.design.widget.FloatingActionButton; 8 | import android.support.v4.app.Fragment; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.widget.AdapterView; 13 | import android.widget.ArrayAdapter; 14 | import android.widget.ListView; 15 | import android.widget.TextView; 16 | 17 | import java.util.ArrayList; 18 | import java.util.List; 19 | 20 | import static android.view.View.GONE; 21 | 22 | 23 | /** 24 | * A simple {@link Fragment} subclass. 25 | * Activities that contain this fragment must implement the 26 | * {@link Reminder.OnFragmentInteractionListener} interface 27 | * to handle interaction events. 28 | * Use the {@link Reminder#newInstance} factory method to 29 | * create an instance of this fragment. 30 | */ 31 | public class Reminder extends Fragment implements View.OnClickListener{ 32 | // TODO: Rename parameter arguments, choose names that match 33 | // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER 34 | private static final String ARG_PARAM1 = "param1"; 35 | private static final String ARG_PARAM2 = "param2"; 36 | 37 | // TODO: Rename and change types of parameters 38 | private String mParam1; 39 | private String mParam2; 40 | private ArrayList al; 41 | private List list=new ArrayList(); 42 | private ArrayAdapter adapter; 43 | ListView lv; 44 | TextView tv; 45 | FloatingActionButton fab; 46 | 47 | private OnFragmentInteractionListener mListener; 48 | 49 | public Reminder() { 50 | // Required empty public constructor 51 | } 52 | 53 | public void receiveData(ArrayList al) 54 | { 55 | this.al=al; 56 | list.add(al.get(0)); 57 | } 58 | /** 59 | * Use this factory method to create a new instance of 60 | * this fragment using the provided parameters. 61 | * 62 | * @param param1 Parameter 1. 63 | * @param param2 Parameter 2. 64 | * @return A new instance of fragment Reminder. 65 | */ 66 | // TODO: Rename and change types and number of parameters 67 | public static Reminder newInstance(String param1, String param2) { 68 | Reminder fragment = new Reminder(); 69 | Bundle args = new Bundle(); 70 | args.putString(ARG_PARAM1, param1); 71 | args.putString(ARG_PARAM2, param2); 72 | fragment.setArguments(args); 73 | return fragment; 74 | } 75 | 76 | @Override 77 | public void onCreate(Bundle savedInstanceState) { 78 | super.onCreate(savedInstanceState); 79 | if (getArguments() != null) { 80 | mParam1 = getArguments().getString(ARG_PARAM1); 81 | mParam2 = getArguments().getString(ARG_PARAM2); 82 | } 83 | } 84 | 85 | //data for customlist************************************************************************************ 86 | 87 | private String desc[] = { 88 | "The Powerful Hypter Text Markup Language 5", 89 | "Cascading Style Sheets", 90 | "Code with Java Script", 91 | "Manage your content with Wordpress" 92 | }; 93 | 94 | 95 | //************************************************************************************* 96 | 97 | 98 | @Override 99 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 100 | Bundle savedInstanceState) { 101 | getActivity().setTitle("Medicine Reminder"); 102 | View v=inflater.inflate(R.layout.fragment_reminder, container, false); 103 | fab=(FloatingActionButton)v.findViewById(R.id.floatingActionButton); 104 | lv=(ListView)v.findViewById(R.id.rem_lv); 105 | tv=(TextView) v.findViewById(R.id.reminder_tv); 106 | 107 | fab.setOnClickListener(this); 108 | DatabaseHandler db=new DatabaseHandler(getContext()); 109 | list=db.getAllReminders(); 110 | 111 | if(list.size()==0) 112 | { 113 | lv.setVisibility(GONE); 114 | return v; 115 | } 116 | 117 | tv.setVisibility(GONE); 118 | 119 | adapter = new CustomList(getActivity(),list,desc); 120 | lv.setAdapter(adapter); 121 | 122 | 123 | lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { 124 | @Override 125 | public void onItemClick(AdapterView adapterView, View view, int i, long l) { 126 | //Toast.makeText(getActivity(),"You Clicked "+list.get(i), Toast.LENGTH_SHORT).show(); 127 | Intent in=new Intent(getActivity(),MedRemInfo.class); 128 | in.putExtra("id",list.get(i).toString()); 129 | startActivity(in); 130 | } 131 | }); 132 | return v; 133 | } 134 | 135 | // TODO: Rename method, update argument and hook method into UI event 136 | public void onButtonPressed(Uri uri) { 137 | if (mListener != null) { 138 | mListener.onFragmentInteraction(uri); 139 | } 140 | } 141 | 142 | @Override 143 | public void onAttach(Context context) { 144 | super.onAttach(context); 145 | if (context instanceof OnFragmentInteractionListener) { 146 | mListener = (OnFragmentInteractionListener) context; 147 | } else { 148 | throw new RuntimeException(context.toString() 149 | + " must implement OnFragmentInteractionListener"); 150 | } 151 | } 152 | 153 | @Override 154 | public void onDetach() { 155 | super.onDetach(); 156 | mListener = null; 157 | } 158 | 159 | @Override 160 | public void onClick(View v) { 161 | Intent in=new Intent(getActivity(),AddReminder.class); 162 | startActivity(in); 163 | } 164 | 165 | 166 | /** 167 | * This interface must be implemented by activities that contain this 168 | * fragment to allow an interaction in this fragment to be communicated 169 | * to the activity and potentially other fragments contained in that 170 | * activity. 171 | *

172 | * See the Android Training lesson Communicating with Other Fragments for more information. 175 | */ 176 | public interface OnFragmentInteractionListener { 177 | // TODO: Update argument type and name 178 | void onFragmentInteraction(Uri uri); 179 | } 180 | } 181 | 182 | -------------------------------------------------------------------------------- /app/src/main/java/com/cbitss/careforu/Splash.java: -------------------------------------------------------------------------------- 1 | package com.cbitss.careforu; 2 | 3 | import android.content.Intent; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.os.Bundle; 6 | 7 | public class Splash extends AppCompatActivity { 8 | 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | setContentView(R.layout.activity_splash); 13 | Thread t = new Thread(){ 14 | public void run() 15 | { 16 | try { 17 | Thread.sleep(2000); 18 | } catch (InterruptedException e) { 19 | e.printStackTrace(); 20 | } 21 | Intent in= new Intent(getApplicationContext(),MainActivity.class); 22 | startActivity(in); 23 | finish(); 24 | } 25 | }; 26 | t.start(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slidingimages.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/color/drawer_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/diltran.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable-v21/diltran.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_slideshow.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable-v21/logo2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/border_edit_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/border_without_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/boy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/boy.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/boythree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/boythree.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/boytwo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/boytwo.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/careforu.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/careforu.PNG -------------------------------------------------------------------------------- /app/src/main/res/drawable/dil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/dil.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/dil_tran.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/dil_tran.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/firstaidtips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/firstaidtips.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/flask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/flask.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/girl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/girl.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/girlfour.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/girlfour.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/girlone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/girlone.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/girlthree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/girlthree.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/health_tips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/health_tips.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/hospitals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/hospitals.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_location_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_alarm_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_back_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_check_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_chevron_right_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_delete_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_edit_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_info_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_info_outline_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_local_hospital_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_note_add_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_power_settings_new_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_search_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_watch_later_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/med.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/med.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/med_remind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/med_remind.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/medicines.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/medicines.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/medreminder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/medreminder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/nosebleeding.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/nosebleeding.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/remind.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/remind.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/rounded_corner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/tip1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/tip1.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/tip2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/tip2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/tip3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/tip3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/tip4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/tip4.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/tip5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rishab951/CareForU/542a68c5f413250d7770a34945fb88442a3ae3aa/app/src/main/res/drawable/tip5.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_alarm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 23 | 24 | 31 | 32 | 39 | 40 | 44 |