Release Boxcars v1.1.1 for Android

This commit is contained in:
Trevor Slocum 2023-11-11 18:42:06 -08:00
parent 37ec3557ab
commit 7e58d665ea
3 changed files with 15 additions and 5 deletions

View file

@ -1,6 +1,5 @@
# boxcars (Android) - Graphical client for [bgammon.org](https://bgammon.org)
[![Donate via LiberaPay](https://img.shields.io/liberapay/receives/rocket9labs.com.svg?logo=liberapay)](https://liberapay.com/rocket9labs.com)
[![Donate via Patreon](https://img.shields.io/badge/dynamic/json?color=%23e85b46&label=Patreon&query=data.attributes.patron_count&suffix=%20patrons&url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F5252223)](https://www.patreon.com/rocketnine)
<a href="https://play.google.com/store/apps/details?id=com.rocket9labs.boxcars"><img width="121" height="36" alt="Google Play" border="0" src="https://rocket9labs.com/static/badge_google_36.png"></a>
&nbsp; <a href="https://f-droid.org/packages/com.rocket9labs.boxcars/"><img width="121" height="36" alt="F-Droid" border="0" src="https://rocket9labs.com/static/badge_fdroid_36.png"></a>

View file

@ -3,7 +3,7 @@ plugins {
}
project.ext {
boxcarsVersion = "v1.1.0" // https://code.rocket9labs.com/tslocum/boxcars/tags
boxcarsVersion = "v1.1.1" // https://code.rocket9labs.com/tslocum/boxcars/tags
}
android {
@ -17,8 +17,8 @@ android {
applicationId "com.rocket9labs.boxcars"
minSdkVersion 21
targetSdkVersion 34
versionCode 101000
versionName "1.1.0"
versionCode 101010
versionName "1.1.1"
}
buildTypes {

View file

@ -2,6 +2,7 @@ package com.rocket9labs.boxcars;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.widget.Toast;
import com.rocket9labs.boxcars.mobile.EbitenView;
@ -12,6 +13,14 @@ public class MainActivity extends Activity {
private static final int backButtonDoubleTapTime = 1000; // Milliseconds.
private long backButtonLastTapped;
Runnable exitRunnable = new Runnable() {
@Override
public void run() {
System.exit(0);
}
};
Handler handler = new Handler();
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -26,12 +35,14 @@ public class MainActivity extends Activity {
@Override
protected void onPause() {
super.onPause();
handler.postDelayed(exitRunnable, 10 * 60 * 1000);
this.getEbitenView().suspendGame();
super.onPause();
}
@Override
protected void onResume() {
handler.removeCallbacks(exitRunnable);
super.onResume();
this.getEbitenView().resumeGame();
}