mirror of
https://github.com/SoPat712/TrackCovid19.git
synced 2025-08-22 02:38:45 -04:00
Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
595623b412 | |||
9e1e04333c | |||
16c3059a45 | |||
6515694dbe | |||
2782552fca | |||
244cd3a57a | |||
535f157c5b | |||
bb62488afb | |||
1e2ee57245 | |||
293e291f09 | |||
c86b5cd7e1 | |||
7eb6fac10b | |||
39f66c7142 | |||
1424bcc65c | |||
e9d3f0689a | |||
5a3cdacb1d | |||
23cd687b85 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
91
.idea/navEditor.xml
generated
Normal file
91
.idea/navEditor.xml
generated
Normal file
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="navEditor-manualLayoutAlgorithm2">
|
||||
<option name="myPositions">
|
||||
<map>
|
||||
<entry key="mobile_navigation.xml">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPositions">
|
||||
<map>
|
||||
<entry key="nav_sed">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="12" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yourcountry">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="256" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yourrealcountry">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="500" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yoursettings">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="12" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yourstate">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="12" />
|
||||
<option name="y" value="368" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yourworld">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="12" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@@ -5,7 +5,7 @@ If it is needed, feel free to submit an issue on this Github page, and the issue
|
||||
|
||||
# Downloading the app onto your own (Android)phone
|
||||
|
||||
In order to download the app on your own, you will need to navigate to my release apk download page, [which I will link here](https://github.com/souravp712/TrackCovid19/releases/download/v1.1/TrackCovid19.apk), or you can wait for the approval of the app to the Google Play Store.
|
||||
In order to download the app on your own, you will need to navigate to my release apk download page, [which I will link here](https://github.com/souravp712/TrackCovid19/releases/download/v1.2/TrackCovid19.apk), or you can wait for the approval of the app to the Google Play Store.
|
||||
|
||||
You may need to accept some permissions in order for the app to be installed. Then click install, and the app will be installed onto your own Android device for your own usages.
|
||||
|
||||
|
BIN
app/src/main/.DS_Store
vendored
BIN
app/src/main/.DS_Store
vendored
Binary file not shown.
@@ -0,0 +1,156 @@
|
||||
package com.josh.trackcovid19v2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.InflateException;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link SendFeedbackFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class SendFeedbackFragment extends Fragment {
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
public SendFeedbackFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment SendFeedbackFragment.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static SendFeedbackFragment newInstance(String param1, String param2) {
|
||||
SendFeedbackFragment fragment = new SendFeedbackFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_send_feedback, container, false);
|
||||
final TextView to = (TextView) view.findViewById(R.id.sendTo);
|
||||
final EditText message = (EditText) view.findViewById(R.id.EmailText);
|
||||
final EditText subject = (EditText) view.findViewById(R.id.subject);
|
||||
|
||||
Button sendE = (Button) view.findViewById(R.id.sendEmail);
|
||||
sendE.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(android.view.View v) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
|
||||
builder.setTitle("Data");
|
||||
builder.setMessage("We will need to take some data from your device to fix the report. Is this okay with you?");
|
||||
|
||||
builder.setPositiveButton("YES", new DialogInterface.OnClickListener() {
|
||||
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
String toS = "joshpatra12@protonmail.com";
|
||||
String subS = subject.getText().toString();
|
||||
String mesS = message.getText().toString();
|
||||
String system = System.getProperty("os.version");
|
||||
Integer API = Build.VERSION.SDK_INT;
|
||||
String device = Build.DEVICE;
|
||||
String model = Build.MODEL;
|
||||
String product = Build.PRODUCT;
|
||||
String display = Build.DISPLAY;
|
||||
String type = Build.TYPE;
|
||||
String user = Build.USER;
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
((Activity) getContext()).getWindowManager()
|
||||
.getDefaultDisplay()
|
||||
.getMetrics(displayMetrics);
|
||||
int height = displayMetrics.heightPixels + getNavigationBarHeight();
|
||||
int width = displayMetrics.widthPixels;
|
||||
Intent email = new Intent(Intent.ACTION_SEND);
|
||||
|
||||
email.putExtra(Intent.EXTRA_EMAIL , new String [] {toS});
|
||||
email.putExtra(Intent.EXTRA_SUBJECT , subS);
|
||||
email.putExtra(Intent.EXTRA_TEXT , mesS + "\n\n\n\n\n\n" + "\nAPI: " + API + "\nDevice: "
|
||||
+ device + "\nModel: "+ model +"\nType:" + type +"\nUser:" + user +
|
||||
"\nDisplay height: " + height + "\nDisplay width: " + width);
|
||||
|
||||
email.setType("message/rfc822");
|
||||
startActivity(Intent.createChooser(email, "Choose an app to send the email with"));
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
builder.setNegativeButton("NO", new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
Toast.makeText(getActivity(), "Canceled", Toast.LENGTH_SHORT).show();
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
private int getNavigationBarHeight() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
((Activity) getContext()).getWindowManager()
|
||||
.getDefaultDisplay()
|
||||
.getMetrics(metrics);
|
||||
int usableHeight = metrics.heightPixels;
|
||||
((Activity) getContext()).getWindowManager()
|
||||
.getDefaultDisplay()
|
||||
.getRealMetrics(metrics);
|
||||
int realHeight = metrics.heightPixels;
|
||||
if (realHeight > usableHeight)
|
||||
return realHeight - usableHeight;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
@@ -153,7 +153,7 @@ public class YourworldFragment extends Fragment {
|
||||
ss.setSpan(fcsWhite, 0, 16, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
textView8.setText(ss);
|
||||
} else {
|
||||
Spanned text = Html.fromHtml("<i>Daily Increment: " + "<b>" + "-" + dailyIncWithCommas + "</i></b>");
|
||||
Spanned text = Html.fromHtml("<i>Daily Increment: " + "<b>" + "" + dailyIncWithCommas + "</i></b>");
|
||||
SpannableString ss = new SpannableString(text);
|
||||
ForegroundColorSpan fcsWhite = new ForegroundColorSpan(Color.WHITE);
|
||||
@SuppressLint("ResourceAsColor") ForegroundColorSpan fcsGreen = new ForegroundColorSpan(R.color.just_cuz);
|
||||
@@ -163,17 +163,17 @@ public class YourworldFragment extends Fragment {
|
||||
if ((ACases[0] - yACases[0]) >= 0) {
|
||||
textView9.setText(Html.fromHtml("<b><i>" + "+" + dailyActWithCommas + "</i></b>"));
|
||||
} else {
|
||||
textView9.setText(Html.fromHtml("<b><i>" + "-" + dailyActWithCommas + "</i></b>"));
|
||||
textView9.setText(Html.fromHtml("<b><i>" + "" + dailyActWithCommas + "</i></b>"));
|
||||
}
|
||||
if ((recovered[0] - yRecovered[0]) >= 0) {
|
||||
textView10.setText(Html.fromHtml("<b><i>" + "+" + dailyRecoveredWithCommas + "</i></b>"));
|
||||
} else {
|
||||
textView10.setText(Html.fromHtml("<b><i>" + "-" + dailyRecoveredWithCommas + "</i></b>"));
|
||||
textView10.setText(Html.fromHtml("<b><i>" + "" + dailyRecoveredWithCommas + "</i></b>"));
|
||||
}
|
||||
if ((Toddeaths[0] - yDeaths[0]) >= 0) {
|
||||
textView11.setText(Html.fromHtml("<b><i>" + "+" + dailyDeathWithCommas + "</i></b>"));
|
||||
} else {
|
||||
textView11.setText(Html.fromHtml("<b><i>" + "-" + dailyDeathWithCommas + "</i></b>"));
|
||||
textView11.setText(Html.fromHtml("<b><i>" + "" + dailyDeathWithCommas + "</i></b>"));
|
||||
}
|
||||
|
||||
//blahahahahahahahah
|
||||
|
67
app/src/main/res/layout/fragment_send_feedback.xml
Normal file
67
app/src/main/res/layout/fragment_send_feedback.xml
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".SendFeedbackFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sendTo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="textEmailAddress"
|
||||
android:text="joshpatra12@protonmail.com"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.122"
|
||||
app:layout_constraintWidth_percent=".7" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/subject"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="Enter a subject for the email here"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.284"
|
||||
app:layout_constraintWidth_percent=".90" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EmailText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="start|top"
|
||||
android:hint="Please highlight what the bug was."
|
||||
android:inputType="textMultiLine"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.6"
|
||||
app:layout_constraintWidth_percent=".95" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/sendEmail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Send"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias=".9" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -5,10 +5,6 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.josh.trackcovid19v2.SettingsFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment" />
|
||||
|
||||
|
||||
</FrameLayout>
|
@@ -23,21 +23,22 @@
|
||||
android:icon="@drawable/stateiconfinal"
|
||||
android:title="@string/your_state" />
|
||||
</group>
|
||||
<!--
|
||||
|
||||
<group
|
||||
android:id="@+id/menu_bottom"
|
||||
android:checkableBehavior="none">
|
||||
|
||||
<!--
|
||||
<item
|
||||
android:id="@+id/nav_yoursettings"
|
||||
android:icon="@drawable/ic_action_name"
|
||||
android:title="@string/item" />
|
||||
-->
|
||||
<item
|
||||
android:id="@+id/nav_sendFeedback"
|
||||
android:icon="@drawable/ic_action_name2"
|
||||
android:title="@string/send_feedback"
|
||||
/>
|
||||
</group>
|
||||
-->
|
||||
|
||||
|
||||
</menu>
|
||||
|
@@ -30,4 +30,9 @@
|
||||
android:name="com.josh.trackcovid19v2.SettingsActivity$SettingsFragment"
|
||||
android:label="@string/menu_yoursettings"
|
||||
tools:layout="@layout/fragment_settings" />
|
||||
<fragment
|
||||
android:id="@+id/nav_sendFeedback"
|
||||
android:name="com.josh.trackcovid19v2.SendFeedbackFragment"
|
||||
android:label="@string/send_feedback"
|
||||
tools:layout="@layout/fragment_send_feedback" />
|
||||
</navigation>
|
@@ -16,7 +16,7 @@
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<!--
|
||||
<PreferenceCategory app:title="@string/sync_header">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
@@ -31,5 +31,6 @@
|
||||
app:title="@string/attachment_title" />
|
||||
|
||||
</PreferenceCategory>
|
||||
-->
|
||||
|
||||
</PreferenceScreen>
|
||||
|
Reference in New Issue
Block a user