Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e474f3fce | ||
|
|
c40f6c0166 | ||
|
|
edb38612b5 | ||
|
|
38eda443dc | ||
|
|
51f8e67799 | ||
|
|
26bcc3e496 | ||
|
|
92173b1cae | ||
|
|
bb78aa0a9a | ||
|
|
e4ab9c91c8 | ||
|
|
fa7926ca6e | ||
|
|
deb6369f37 | ||
|
|
d6e952eae9 | ||
|
|
398f9d8729 | ||
|
|
ef0292bdd9 | ||
|
|
904aaba2b5 | ||
|
|
d4a5329bf6 | ||
|
|
251b3cdc0c | ||
|
|
cf1c40f5ce | ||
|
|
a4b69958e0 | ||
|
|
596b13c7fd | ||
|
|
6f7f85b90f | ||
|
|
b629473129 | ||
|
|
d36ceaa19f | ||
|
|
ab746003b8 | ||
|
|
27ed2afbf0 | ||
|
|
bd312edf83 | ||
|
|
b2167423db | ||
|
|
7e6c0b90e2 | ||
|
|
84c75f6be7 | ||
|
|
1b3ca8c8af | ||
|
|
f83a8b41e4 | ||
|
|
bc433b4185 | ||
|
|
34b13473c9 | ||
|
|
a642b51532 | ||
|
|
a5490b98c7 | ||
|
|
140350012b | ||
|
|
d610bfd40b | ||
|
|
b1c2dfaa6f | ||
|
|
e79ee82193 | ||
|
|
4f64ca49b7 | ||
|
|
25969dd6d6 | ||
|
|
1fe3035050 | ||
|
|
219ef6d64e | ||
|
|
854f5df595 | ||
|
|
dbb1af03c4 |
No files matched your search
@@ -33,3 +33,5 @@ google-services.json
|
|||||||
# Android Profiling
|
# Android Profiling
|
||||||
*.hprof
|
*.hprof
|
||||||
|
|
||||||
|
# Release Files
|
||||||
|
app/release/*
|
||||||
@@ -2,8 +2,14 @@
|
|||||||
|
|
||||||
Timer which loops over the specified interval, playing your default notification sound each time it hits 0.
|
Timer which loops over the specified interval, playing your default notification sound each time it hits 0.
|
||||||
|
|
||||||
## Update Notes
|
## Notes
|
||||||
|
|
||||||
### 2025-07-11
|
### 2025-07-11
|
||||||
(This article)[https://sijus.medium.com/resurrecting-a-5-year-old-android-app-a-developers-journey-59d8f5689e5b]
|
|
||||||
was very helpful in getting this app updated from SDK 25 to 36.
|
This article was very helpful in getting this app updated from SDK 25 to 36.
|
||||||
|
- https://sijus.medium.com/resurrecting-a-5-year-old-android-app-a-developers-journey-59d8f5689e5b
|
||||||
|
|
||||||
|
## Licenses
|
||||||
|
|
||||||
|
Chime sound byte came free from here:
|
||||||
|
- https://pixabay.com/sound-effects/chime-sound-7143/
|
||||||
@@ -2,19 +2,20 @@ apply plugin: 'com.android.application'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.hyperling.apps.infinitetimer"
|
namespace "com.hyperling.apps.infinitetimer"
|
||||||
compileSdkVersion 35
|
compileSdkVersion 36
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.hyperling.apps.infinitetimer"
|
applicationId "com.hyperling.apps.infinitetimer"
|
||||||
minSdkVersion 15
|
minSdkVersion 14
|
||||||
targetSdkVersion 35
|
targetSdkVersion 36
|
||||||
versionCode 8
|
versionCode 9
|
||||||
versionName "1.1.0"
|
versionName "1.1.2"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
shrinkResources true
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,7 +26,7 @@ dependencies {
|
|||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
})
|
||||||
// https://mvnrepository.com/artifact/com.android.support/appcompat-v7
|
// https://mvnrepository.com/artifact/com.android.support/appcompat-v7
|
||||||
implementation group: 'com.android.support', name: 'appcompat-v7', version: '28.0.0'
|
implementation "com.android.support:appcompat-v7:28.0.0"
|
||||||
|
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/icon_512"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/appName"
|
android:label="@string/appName"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/InfiniteTimer"
|
android:theme="@style/InfiniteTimer"
|
||||||
|
|||||||
|
After Width: | Height: | Size: 24 KiB |
@@ -1,22 +1,30 @@
|
|||||||
package com.hyperling.apps.infinitetimer;
|
package com.hyperling.apps.infinitetimer;
|
||||||
|
|
||||||
|
import android.app.NotificationManager;
|
||||||
|
import android.content.DialogInterface;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.media.AudioManager;
|
||||||
import android.media.MediaPlayer;
|
import android.media.MediaPlayer;
|
||||||
|
import android.media.Ringtone;
|
||||||
import android.media.RingtoneManager;
|
import android.media.RingtoneManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
import android.widget.SeekBar;
|
||||||
import android.widget.TableRow;
|
import android.widget.TableRow;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
@@ -46,6 +54,10 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
Uri ringtoneUri;
|
Uri ringtoneUri;
|
||||||
MediaPlayer mediaPlayer;
|
MediaPlayer mediaPlayer;
|
||||||
|
|
||||||
|
SeekBar seekBar;
|
||||||
|
AudioManager audioManager;
|
||||||
|
TextView tvSeekBar;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
String tag = "onCreate";
|
String tag = "onCreate";
|
||||||
@@ -68,17 +80,60 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
stringChronometerDefault = getString(R.string.chronometerDefault);
|
stringChronometerDefault = getString(R.string.chronometerDefault);
|
||||||
|
|
||||||
|
if (DEBUG) Log.d(tag, "Got strings.");
|
||||||
|
|
||||||
/***** Shared Preferences *****/
|
/***** Shared Preferences *****/
|
||||||
sharedPreferences = getSharedPreferences(keySharedPreferences, MODE_PRIVATE);
|
sharedPreferences = getSharedPreferences(keySharedPreferences, MODE_PRIVATE);
|
||||||
DEBUG = sharedPreferences.getBoolean(keyDebug, true);
|
DEBUG = sharedPreferences.getBoolean(keyDebug, true);
|
||||||
appOpen = sharedPreferences.getBoolean(keyAppOpen, false);
|
appOpen = sharedPreferences.getBoolean(keyAppOpen, false);
|
||||||
serviceRunning = sharedPreferences.getBoolean(keyServiceRunning, false);
|
serviceRunning = sharedPreferences.getBoolean(keyServiceRunning, false);
|
||||||
|
|
||||||
|
if (DEBUG) Log.d(tag, "Got preferences.");
|
||||||
|
|
||||||
// Sound
|
// Sound
|
||||||
ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
|
ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
|
||||||
|
if (DEBUG) Log.d(tag, "ringtoneUri=" + ringtoneUri.toString());
|
||||||
mediaPlayer = MediaPlayer.create(this, ringtoneUri);
|
mediaPlayer = MediaPlayer.create(this, ringtoneUri);
|
||||||
|
if (mediaPlayer == null) {
|
||||||
|
if (DEBUG) Log.d(tag, "Media Player is null, trying alarm");
|
||||||
|
ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
|
||||||
|
mediaPlayer = MediaPlayer.create(this, ringtoneUri);
|
||||||
|
}
|
||||||
|
if (mediaPlayer == null) {
|
||||||
|
if (DEBUG) Log.d(tag, "Media Player is null, trying ringtone");
|
||||||
|
ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
|
||||||
|
mediaPlayer = MediaPlayer.create(this, ringtoneUri);
|
||||||
|
}
|
||||||
|
if (mediaPlayer == null) {
|
||||||
|
if (DEBUG) Log.d(tag, "Media Player is null, trying all");
|
||||||
|
ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALL);
|
||||||
|
mediaPlayer = MediaPlayer.create(this, ringtoneUri);
|
||||||
|
}
|
||||||
|
if (mediaPlayer == null) {
|
||||||
|
if (DEBUG) Log.d(tag, "Media Player is null, trying local sound byte");
|
||||||
|
mediaPlayer = MediaPlayer.create(this, R.raw.chime_sound_7143);
|
||||||
|
}
|
||||||
|
if (mediaPlayer == null) {
|
||||||
|
String message = "Could not find a notification, alarm, or ringtone to play.";
|
||||||
|
message += " App will not be able to function without one of these.";
|
||||||
|
message += " Please exit and install a system notification sound.";
|
||||||
|
|
||||||
if (DEBUG) Log.d(tag, "Got strings.");
|
new AlertDialog.Builder(MainActivity.this)
|
||||||
|
.setTitle("Error")
|
||||||
|
.setMessage(message)
|
||||||
|
.setPositiveButton("Exit", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
dialog.dismiss();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setCancelable(false)
|
||||||
|
.show()
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
if (DEBUG) Log.d(tag, "mediaPlayer=" + mediaPlayer.toString());
|
||||||
|
}
|
||||||
|
|
||||||
if (DEBUG){
|
if (DEBUG){
|
||||||
// Print all preferences
|
// Print all preferences
|
||||||
@@ -93,9 +148,14 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (DEBUG) Log.d(tag, "Shutting off improper START value");
|
if (DEBUG) Log.d(tag, "Shutting off improper START value");
|
||||||
|
|
||||||
// Ensure START is always off if we are creating (not resuming).
|
// Ensure START is always off if we are creating (not resuming).
|
||||||
sharedPreferences.edit().putBoolean(keyStartStop, false).apply();
|
int count = 0;
|
||||||
|
while (!sharedPreferences.edit().putBoolean(keyStartStop, false).commit() && count < 50) {
|
||||||
|
if (DEBUG) Log.d(tag, "Commit failed, trying again. count=" + count);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
Log.d(tag, "key=" + key + " value=" + sharedPreferencesAll.get(key));
|
boolean checkStartStop = sharedPreferences.getBoolean(keyStartStop, false);;
|
||||||
|
Log.d(tag, "key=" + key + " value=" + checkStartStop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,8 +210,32 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
etMillis.setVisibility(View.GONE);
|
etMillis.setVisibility(View.GONE);
|
||||||
//(ViewManager) etMillis.getParent().remove
|
//(ViewManager) etMillis.getParent().remove
|
||||||
|
|
||||||
//sharedPreferences.edit().putBoolean(keyStartStop, false).apply();
|
seekBar = findViewById(R.id.seekBar);
|
||||||
recoverScreen();
|
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
||||||
|
|
||||||
|
audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
|
||||||
|
int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
|
||||||
|
seekBar.setMax(maxVolume);
|
||||||
|
|
||||||
|
tvSeekBar = findViewById(R.id.tvSeekbar);
|
||||||
|
|
||||||
|
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
|
||||||
|
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, i, AudioManager.FLAG_SHOW_UI);
|
||||||
|
syncVolume();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||||
|
syncVolume();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||||
|
syncVolume();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (DEBUG) Log.d(tag, "Finished");
|
if (DEBUG) Log.d(tag, "Finished");
|
||||||
}
|
}
|
||||||
@@ -202,39 +286,39 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
int hours = 0, minutes = 0, seconds = 0;
|
int hours = 0, minutes = 0, seconds = 0;
|
||||||
try {
|
try {
|
||||||
hours = Integer.parseInt("0" + etHours.getText().toString());
|
hours = Integer.parseInt("0" + etHours.getText().toString());
|
||||||
} catch (NumberFormatException e) {
|
} catch (Exception e) {
|
||||||
etHours.setText("");
|
if (DEBUG) Log.d(tag, "Hours had an exception, using highest value");
|
||||||
|
hours = 99;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
minutes = Integer.parseInt("0" + etMinutes.getText().toString());
|
minutes = Integer.parseInt("0" + etMinutes.getText().toString());
|
||||||
} catch (NumberFormatException e) {
|
} catch (Exception e) {
|
||||||
etMinutes.setText("");
|
if (DEBUG) Log.d(tag, "Minutes had an exception, using highest value");
|
||||||
|
minutes = 59;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
seconds = Integer.parseInt("0" + etSeconds.getText().toString());
|
seconds = Integer.parseInt("0" + etSeconds.getText().toString());
|
||||||
} catch (NumberFormatException e) {
|
} catch (Exception e) {
|
||||||
etSeconds.setText("");
|
if (DEBUG) Log.d(tag, "Seconds had an exception, using highest value");
|
||||||
|
seconds = 59;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Properly handle hours being set to 999, which casues a negative.
|
if ((hours + (minutes/60) + (seconds/60/60)) > 99) {
|
||||||
// TODO: Properly handle time being greater than current time, such as
|
if (DEBUG) Log.d(tag, "Sum is over 99 hours, setting to 99:59:59");
|
||||||
longLoopInterval = (long) (((hours*60*60) + (minutes*60) + seconds) * 1000);
|
hours = 99;
|
||||||
if (longLoopInterval > System.currentTimeMillis() || longLoopInterval < 0) {
|
minutes = 59;
|
||||||
if (DEBUG) Log.d(tag, "Got a number larger than current time");
|
seconds = 59;
|
||||||
if (DEBUG) Log.d(tag, "Setting to current time value");
|
|
||||||
longLoopInterval = System.currentTimeMillis();
|
|
||||||
|
|
||||||
/* Not quite doing what we want yet.
|
|
||||||
String sHours = "" + longLoopInterval/1000;
|
|
||||||
String sMinutes = "" + longLoopInterval/1000/60 % 60;
|
|
||||||
String sSeconds = "" + longLoopInterval/1000/60/60 % 60;
|
|
||||||
|
|
||||||
etHours.setText(sHours);
|
|
||||||
etMinutes.setText(sMinutes);
|
|
||||||
etSeconds.setText(sSeconds);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DEBUG) Log.d(tag, "hours=" + hours);
|
||||||
|
if (DEBUG) Log.d(tag, "minutes=" + minutes);
|
||||||
|
if (DEBUG) Log.d(tag, "seconds=" + seconds);
|
||||||
|
|
||||||
|
if (hours > 0) etHours.setText("" + hours);
|
||||||
|
if (minutes > 0) etMinutes.setText("" + minutes);
|
||||||
|
if (seconds > 0) etSeconds.setText("" + seconds);
|
||||||
|
|
||||||
|
longLoopInterval = (((hours*60*60) + (minutes*60) + seconds) * 1000);
|
||||||
if (DEBUG) Log.d(tag, "longLoopInterval=" + longLoopInterval);
|
if (DEBUG) Log.d(tag, "longLoopInterval=" + longLoopInterval);
|
||||||
|
|
||||||
setChronometer(longLoopInterval);
|
setChronometer(longLoopInterval);
|
||||||
@@ -532,13 +616,47 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
String tag = TAG + "playSound";
|
String tag = TAG + "playSound";
|
||||||
if (DEBUG) Log.d(tag, "Starting");
|
if (DEBUG) Log.d(tag, "Starting");
|
||||||
|
|
||||||
/* Original code, did not work on Nexus 7 with CM 12.1-20151117 (Android 5.1.1)
|
/* Original code, did not work on Nexus 7 with CM 12.1-20151117 (Android 5.1.1) * /
|
||||||
Ringtone ringtone = RingtoneManager.getRingtone(getApplicationContext(), ringtoneUri);
|
Uri uri = Uri.parse("android.resource://" + getPackageName() + "/raw/chime_sound_7143");
|
||||||
|
//Ringtone ringtone = RingtoneManager.getRingtone(getApplicationContext(), ringtoneUri);
|
||||||
|
Ringtone ringtone = RingtoneManager.getRingtone(getApplicationContext(), uri);
|
||||||
ringtone.play();
|
ringtone.play();
|
||||||
*/
|
/**/
|
||||||
|
|
||||||
//mediaPlayer.reset();
|
try {
|
||||||
mediaPlayer.start();
|
mediaPlayer.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
sharedPreferences.edit().putBoolean(keyStartStop, false).apply();
|
||||||
|
|
||||||
|
String message = "Failed to play a notification sound.";
|
||||||
|
message += " Please screenshot this error and send it to me@hyperling.com:\n\n";
|
||||||
|
message += e.toString();
|
||||||
|
|
||||||
|
new AlertDialog.Builder(MainActivity.this)
|
||||||
|
.setTitle("Error")
|
||||||
|
.setMessage(message)
|
||||||
|
.setPositiveButton("Exit", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
dialog.dismiss();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setCancelable(false)
|
||||||
|
.show()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DEBUG) Log.d(tag, "Finished");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void flipInputTexts() {
|
||||||
|
String tag = TAG + "flipInputTexts";
|
||||||
|
if (DEBUG) Log.d(tag, "Starting");
|
||||||
|
|
||||||
|
etHours.setEnabled(!start);
|
||||||
|
etMinutes.setEnabled(!start);
|
||||||
|
etSeconds.setEnabled(!start);
|
||||||
|
|
||||||
if (DEBUG) Log.d(tag, "Finished");
|
if (DEBUG) Log.d(tag, "Finished");
|
||||||
}
|
}
|
||||||
@@ -569,6 +687,21 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (DEBUG) Log.d(tag, "Finished");
|
if (DEBUG) Log.d(tag, "Finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void syncVolume() {
|
||||||
|
String tag = TAG + "syncVolume";
|
||||||
|
if (DEBUG) Log.d(tag, "Starting");
|
||||||
|
|
||||||
|
int currVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
|
||||||
|
if (currVolume != seekBar.getProgress()) {
|
||||||
|
seekBar.setProgress(currVolume);
|
||||||
|
}
|
||||||
|
|
||||||
|
String volume = getString(R.string.tvSeekBar) + " " + seekBar.getProgress() + "/" + seekBar.getMax();
|
||||||
|
tvSeekBar.setText(volume);
|
||||||
|
|
||||||
|
if (DEBUG) Log.d(tag, "Finished");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
String tag = TAG + "onPause";
|
String tag = TAG + "onPause";
|
||||||
@@ -602,6 +735,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
sharedPreferences.edit().putBoolean(keyServiceRunning, false).apply();
|
sharedPreferences.edit().putBoolean(keyServiceRunning, false).apply();
|
||||||
|
|
||||||
recoverScreen();
|
recoverScreen();
|
||||||
|
syncVolume();
|
||||||
|
|
||||||
if (DEBUG) Log.d(tag, "Finished");
|
if (DEBUG) Log.d(tag, "Finished");
|
||||||
}
|
}
|
||||||
@@ -620,15 +754,14 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (DEBUG) Log.d(tag, "Finished");
|
if (DEBUG) Log.d(tag, "Finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void flipInputTexts() {
|
// TODO: This is somehow always 1 action behind the actual volume when pressing volume buttons.
|
||||||
String tag = TAG + "flipInputTexts";
|
// Like when doing down+up+down, the bar does nothing+down+up.
|
||||||
if (DEBUG) Log.d(tag, "Starting");
|
@Override
|
||||||
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
etHours.setEnabled(!start);
|
if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
|
||||||
etMinutes.setEnabled(!start);
|
boolean bool = super.onKeyDown(keyCode, event);
|
||||||
etSeconds.setEnabled(!start);
|
syncVolume();
|
||||||
|
return bool;
|
||||||
if (DEBUG) Log.d(tag, "Finished");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
return super.onKeyDown(keyCode, event);
|
||||||
|
}}
|
||||||
|
After Width: | Height: | Size: 546 B |
|
After Width: | Height: | Size: 396 B |
|
After Width: | Height: | Size: 674 B |
|
After Width: | Height: | Size: 951 B |
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector
|
||||||
|
android:height="108dp"
|
||||||
|
android:width="108dp"
|
||||||
|
android:viewportHeight="108"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
</vector>
|
||||||
@@ -158,4 +158,27 @@
|
|||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tblButtons"
|
||||||
|
android:layout_alignParentBottom="true">
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/seekBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginVertical="@dimen/activity_vertical_margin"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:indeterminate="false"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvSeekbar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/seekBar"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:text="@string/tvSeekBar"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
|
||||||
|
</adaptive-icon>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
|
||||||
|
</adaptive-icon>
|
||||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
<resources>
|
||||||
|
<!-- App details -->
|
||||||
|
<string name="appName">Infinite Timer</string>
|
||||||
|
<string name="appVersion">v20250711</string>
|
||||||
|
<string name="TAG">com.hyperling.apps.infinitetimer</string>
|
||||||
|
|
||||||
|
<!-- Keys -->
|
||||||
|
<string name="keySharedPreferences">InfiniteTimer</string>
|
||||||
|
<string name="keyDebug">DEBUG</string>
|
||||||
|
<string name="keyChronometerTime">ChronometerTime</string>
|
||||||
|
<string name="keyLoopInterval">LoopInterval</string>
|
||||||
|
<string name="keyStartStop">StartStop</string>
|
||||||
|
<string name="keyAppOpen">AppOpen</string>
|
||||||
|
<string name="keyServiceRunning">ServiceRunning</string>
|
||||||
|
|
||||||
|
<!-- UI Text -->
|
||||||
|
<string name="btnStart">Empezar</string>
|
||||||
|
<string name="btnStop">Terminar</string>
|
||||||
|
<string name="btnChooseTime">Elige un Tiempo</string>
|
||||||
|
<string name="btnReset">Reiniciar</string>
|
||||||
|
<string name="btnPause">Pausa</string>
|
||||||
|
<string name="btnResume">Seguir</string>
|
||||||
|
|
||||||
|
<string name="chronometerDefault">00:00:00</string>
|
||||||
|
|
||||||
|
<string name="tvHoursHint">Horas</string>
|
||||||
|
<string name="tvMinutesHint">Minutos</string>
|
||||||
|
<string name="tvSecondsHint">Segundos</string>
|
||||||
|
<string name="tvMillisHint">Millis</string>
|
||||||
|
<string name="tvDot">.</string>
|
||||||
|
|
||||||
|
<string name="tvUpperLabel"><b>Tiempo entre notificaciones:</b></string>
|
||||||
|
<string name="tvLowerLabel"><b>Cuenta regresiva hasta notificación:</b></string>
|
||||||
|
|
||||||
|
<string name="action_millis">Enable Millisecs</string>
|
||||||
|
<string name="action_enable_ads">Enable Ads</string>
|
||||||
|
<string name="action_exit">Exit</string>
|
||||||
|
|
||||||
|
<string name="tvSeekBar">Volumen: </string>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#FFFFFF</color>
|
||||||
|
</resources>
|
||||||
@@ -35,4 +35,6 @@
|
|||||||
<string name="action_millis">Enable Millisecs</string>
|
<string name="action_millis">Enable Millisecs</string>
|
||||||
<string name="action_enable_ads">Enable Ads</string>
|
<string name="action_enable_ads">Enable Ads</string>
|
||||||
<string name="action_exit">Exit</string>
|
<string name="action_exit">Exit</string>
|
||||||
|
|
||||||
|
<string name="tvSeekBar">Media Volume:</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -13,7 +13,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.11.1'
|
classpath 'com.android.tools.build:gradle:9.4.1'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
@@ -27,6 +27,6 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register('clean', Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
AuthorName: 'Chad Michael "Hyperling" Greenwood'
|
||||||
|
AuthorEmail: 'me+infinite@hyperling.com'
|
||||||
|
AuthorWebSite: 'https://hyperling.com/about/'
|
||||||
|
Donate: 'https://hyperling.com/donate/'
|
||||||
|
Liberapay: 'HyperVegan'
|
||||||
|
Bitcoin: 'bc1qsfe8dkvry3d34kztz449gkq67wq8fu2nkgfkh0'
|
||||||
|
Litecoin: 'ltc1qavmpu5d6ljntxsd6jj548m4yys83zwscl0dzkx'
|
||||||
|
IssueTracker: 'https://hyperling.com/contact/'
|
||||||
|
Categories:
|
||||||
|
- fdroid
|
||||||
|
- hyperling
|
||||||
|
- utilities
|
||||||
|
Name: Infinite Timer
|
||||||
|
Summary: 'Play a notification at your chosen interval.'
|
||||||
|
SourceCode: 'https://git.hyperling.com/me/android-infinite-timer/'
|
||||||
|
WebSite: 'https://hyperling.com/apps/#timer'
|
||||||
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 22 KiB |
@@ -9,6 +9,17 @@
|
|||||||
|
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
android.builtInKotlin=false
|
||||||
|
android.defaults.buildfeatures.resvalues=true
|
||||||
|
android.dependency.useConstraints=true
|
||||||
|
android.enableAppCompileTimeRClass=false
|
||||||
|
android.newDsl=false
|
||||||
|
android.r8.optimizedResourceShrinking=false
|
||||||
|
android.r8.strictFullModeForKeepRules=false
|
||||||
|
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
|
||||||
|
android.uniquePackageNames=false
|
||||||
|
android.useAndroidX=false
|
||||||
|
android.usesSdkInManifest.disallowed=false
|
||||||
org.gradle.jvmargs=-Xmx1536m
|
org.gradle.jvmargs=-Xmx1536m
|
||||||
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#This file is generated by updateDaemonJvm
|
||||||
|
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/491f83666ae7f4d6ebb28fee72ebb035/redirect
|
||||||
|
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/0d1a1acdc708062093673f65aa9aba4b/redirect
|
||||||
|
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/491f83666ae7f4d6ebb28fee72ebb035/redirect
|
||||||
|
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/0d1a1acdc708062093673f65aa9aba4b/redirect
|
||||||
|
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7083b89563e7ce20943037b8cd2b8cc2/redirect
|
||||||
|
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/060bbb778a1f55ea705fdebd2ccfeab9/redirect
|
||||||
|
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/491f83666ae7f4d6ebb28fee72ebb035/redirect
|
||||||
|
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/0d1a1acdc708062093673f65aa9aba4b/redirect
|
||||||
|
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d09679dc60fe5aa05ef7d03efdefac20/redirect
|
||||||
|
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/ed4e3bf2f5e7c5d9aabc4cbd8acd555e/redirect
|
||||||
|
toolchainVendor=JETBRAINS
|
||||||
|
toolchainVersion=21
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#Fri Jul 11 12:55:34 MST 2025
|
#Fri Jul 11 12:55:34 MST 2025
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
@@ -1 +1,4 @@
|
|||||||
|
plugins {
|
||||||
|
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
|
||||||
|
}
|
||||||
include ':app'
|
include ':app'
|
||||||