Skip to content

Commit

Permalink
Add Check for update menu
Browse files Browse the repository at this point in the history
Canceled Auto Check Updates

Signed-off-by: GauthamAsir <[email protected]>
  • Loading branch information
GauthamAsir committed Jan 3, 2021
1 parent 21f03f8 commit 11fe869
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
case R.id.menu_aboutUs:
startActivity(new Intent(getApplicationContext(), AboutUs.class));
return true;
case R.id.menu_checkUpdate:
GetLatestAppVersion getLatestAppVersion = new GetLatestAppVersion();
getLatestAppVersion.execute();
return true;
default:
return super.onOptionsItemSelected(item);

Expand Down Expand Up @@ -161,9 +165,6 @@ protected void onResume() {
Common.APP_DIR = Environment.getExternalStorageDirectory().getPath() +
File.separator + "StatusDownloader";

GetLatestAppVersion getLatestAppVersion = new GetLatestAppVersion();
getLatestAppVersion.execute();

}

@Override
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_baseline_update.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:textColorPrimary"
android:pathData="M21,10.12h-6.78l2.74,-2.82c-2.73,-2.7 -7.15,-2.8 -9.88,-0.1c-2.73,2.71 -2.73,7.08 0,9.79s7.15,2.71 9.88,0C18.32,15.65 19,14.08 19,12.1h2c0,1.98 -0.88,4.55 -2.64,6.29c-3.51,3.48 -9.21,3.48 -12.72,0c-3.5,-3.47 -3.53,-9.11 -0.02,-12.58s9.14,-3.47 12.65,0L21,3V10.12zM12.5,8v4.25l3.5,2.08l-0.72,1.21L11,13V8H12.5z" />
</vector>
17 changes: 13 additions & 4 deletions app/src/main/res/menu/main_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<item android:id="@+id/menu_rateUs"
<item
android:id="@+id/menu_checkUpdate"
android:checked="false"
android:icon="@drawable/ic_baseline_update"
android:title="@string/check_for_update"
app:showAsAction="never" />

<item
android:id="@+id/menu_rateUs"
android:title="@string/rate_us"
android:icon="@drawable/ic_star_border"
app:showAsAction="never"/>
app:showAsAction="never" />

<item android:id="@+id/menu_share"
<item
android:id="@+id/menu_share"
android:title="@string/share_app"
android:icon="@drawable/ic_share"
app:showAsAction="never"/>
app:showAsAction="never" />

<item android:id="@+id/menu_privacyPolicy"
android:title="@string/privacy_policy"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
<string name="contact">Contact</string>
<string name="telegram_link">https://t.me/Mellow04</string>
<string name="developer">Developer</string>
<string name="check_for_update">Check for update</string>

</resources>

0 comments on commit 11fe869

Please sign in to comment.