Skip to content

Commit

Permalink
New release 217: racketlon
Browse files Browse the repository at this point in the history
  • Loading branch information
obbimi committed Jul 10, 2019
1 parent b69662a commit d22ada5
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 26 deletions.
4 changes: 2 additions & 2 deletions AndroidManifestRacketlon.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.doubleyellow.racketlon"
android:versionCode="215"
android:versionName="4.19">
android:versionCode="217"
android:versionName="4.20">
<!--
<uses-feature android:name="android.permission.SEND_SMS" android:required="false" />
<uses-feature android:name="android.permission.INTERNET" android:required="true" />
Expand Down
41 changes: 18 additions & 23 deletions change.R.package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,51 @@ fi

cd src
if [[ "$tobranded" = "ASB" ]]; then
echo "Change to '${tobranded}'"
printf "Change to '${tobranded}'\n"
for f in $(egrep -irl 'com.doubleyellow.scoreboard.R[^a-z]' *); do
echo "File $f"
printf "File %-72s to %s \n" $f $tobranded
sed -i 's~com.doubleyellow.scoreboard.R\([^a-z]\)~com.doubleyellow.asbsquore.R\1~' ${f}
#exit 1
done
elif [[ "$tobranded" = "Racketlon" ]]; then
echo "Change to '${tobranded}'"
printf "Change to '${tobranded}'\n"
for f in $(egrep -irl 'com.doubleyellow.scoreboard.R[^a-z]' *); do
echo "File $f"
printf "File %-72s to %s \n" $f $tobranded
sed -i 's~com.doubleyellow.scoreboard.R\([^a-z]\)~com.doubleyellow.racketlon.R\1~' ${f}
#exit 1
done
elif [[ "$tobranded" = "Tabletennis" ]]; then
echo "Change to '${tobranded}'"
printf "Change to '${tobranded}'\n"
for f in $(egrep -irl 'com.doubleyellow.scoreboard.R[^a-z]' *); do
echo "File $f"
printf "File %-72s to %s \n" $f $tobranded
sed -i 's~com.doubleyellow.scoreboard.R\([^a-z]\)~com.doubleyellow.tabletennis.R\1~' ${f}
#exit 1
done
elif [[ "$tobranded" = "Badminton" ]]; then
echo "Change to '${tobranded}'"
printf "Change to '${tobranded}'\n"
for f in $(egrep -irl 'com.doubleyellow.scoreboard.R[^a-z]' *); do
echo "File $f"
printf "File %-72s to %s \n" $f $tobranded
sed -i 's~com.doubleyellow.scoreboard.R\([^a-z]\)~com.doubleyellow.badminton.R\1~' ${f}
#exit 1
done
elif [[ "$tobranded" = "CourtCare" ]]; then
echo "Change to '${tobranded}'"
printf "Change to '${tobranded}'\n"
for f in $(egrep -irl 'com.doubleyellow.scoreboard.R[^a-z]' *); do
echo "File $f"
printf "File %-72s to %s \n" $f $tobranded
sed -i 's~com.doubleyellow.scoreboard.R\([^a-z]\)~com.doubleyellow.courtcaresquore.R\1~' ${f}
#exit 1
done
elif [[ "$tobranded" = "UniOfNotthingham" ]]; then
echo "Change to '${tobranded}'"
printf "Change to '${tobranded}'\n"
for f in $(egrep -irl 'com.doubleyellow.scoreboard.R[^a-z]' *); do
echo "File $f"
printf "File %-72s to %s \n" $f $tobranded
sed -i 's~com.doubleyellow.scoreboard.R\([^a-z]\)~com.doubleyellow.courtscore_uon.R\1~' ${f}
#exit 1
done
elif [[ "$tobranded" = "Squore" ]]; then
echo "Change to '${tobranded}'"
printf "Change to '${tobranded}'\n"
for f in $(egrep -irl "com.doubleyellow.(asbsquore|courtcaresquore|courtscore_uon|racketlon|tabletennis|badminton).R" *); do
echo "File $f back to normal"
printf "File %-72s back to %s normal\n" $f $tobranded
sed -i 's~com.doubleyellow.\(asbsquore\|courtcaresquore\|courtscore_uon\|racketlon\|tabletennis\|badminton\).R\([^a-z]\)~com.doubleyellow.scoreboard.R\2~' ${f}
#exit 1
done
Expand All @@ -85,22 +85,22 @@ sed -i "s~^\(\s\+\)//\(${tobranded}.\+R.string.app_name\)~\1\2~" com/doubleyello
cd ../res
if [[ "$tobranded" = "Racketlon" ]]; then
for f in $(egrep -rl '@string.*_(Squash|Tabletennis)"'); do
echo "File $f to Racketlon strings"
printf "File %-30s to %s strings\n" $f $tobranded
sed -i 's~_\(Squash\|Tabletennis\|Badminton\)"~_Racketlon"~' ${f}
done
elif [[ "$tobranded" = "Tabletennis" ]]; then
for f in $(egrep -rl '@string.*_(Squash|Racketlon)"'); do
echo "File $f to Tabletennis strings"
printf "File %-30s to %s strings\n" $f $tobranded
sed -i 's~_\(Squash\|Racketlon\|Badminton\)"~_Tabletennis"~' ${f}
done
elif [[ "$tobranded" = "Badminton" ]]; then
for f in $(egrep -rl '@string.*_(Squash|Racketlon)"'); do
echo "File $f to Badminton strings"
printf "File %-30s to %s strings\n" $f $tobranded
sed -i 's~_\(Squash\|Racketlon\|Tabletennis\)"~_Badminton"~' ${f}
done
else
for f in $(egrep -rl '@string.*_(Racketlon|Tabletennis|Badminton)"'); do
echo "File $f back to Squash strings"
printf "File %-30s to %s strings\n" $f $tobranded
sed -i 's~_\(Racketlon\|Tabletennis\|Badminton\)"~_Squash"~' ${f}
done
fi
Expand All @@ -111,8 +111,3 @@ sed -i 's~^\(\s\+\)srcFile~\1//srcFile~' build.gradle
sed -i "s~^\(\s\+\)//\(srcFile\s\+'AndroidManifest${tobranded}\)~\1\2~" build.gradle
#vi +/Manifest${tobranded} build.gradle

exit
rm AndroidManifest.xml
ln -s AndroidManifest${tobranded}.xml AndroidManifest.xml
exit

7 changes: 7 additions & 0 deletions res/raw/changelog_racketlon.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 4.20 (july 2019)

- improvement for Android 9
- minor improvements
- for player buttons for long names
- for bluetooth mirroring

## 4.19 (feb 2019)

- allow bluetooth-connection between two (already paired) devices each running the scoreboard
Expand Down
1 change: 1 addition & 0 deletions src/com/doubleyellow/scoreboard/cast/CastHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public class CastHelper implements ICastHelper

@Override public void onActivityStart_Cast() {
if (NOT_SUPPORTED_IN_SDK) { return; }
if (mediaRouter == null) { return; }

mediaRouter.addCallback(mediaRouteSelector, mediaRouterCallback, MediaRouter.CALLBACK_FLAG_PERFORM_ACTIVE_SCAN);
}
Expand Down
6 changes: 5 additions & 1 deletion src/com/doubleyellow/scoreboard/main/ScoreBoard.java
Original file line number Diff line number Diff line change
Expand Up @@ -5383,7 +5383,11 @@ private void stopBlueTooth() {
if ( mBluetoothControlService != null ) {
//mBluetoothControlService.stop();
}
unregisterReceiver(mBTStateChangeReceiver);
try {
unregisterReceiver(mBTStateChangeReceiver);
} catch (Exception e) { //have seen java.lang.IllegalArgumentException: Receiver not registered: com.doubleyellow.scoreboard.main.ScoreBoard$13@7a3594b
e.printStackTrace();
}
}
//----------------------------------------------------
// WRAPPER methods to be able to intercept method call to model and communicate it to connected BT device
Expand Down
1 change: 1 addition & 0 deletions src/com/doubleyellow/scoreboard/model/RacketlonModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class RacketlonModel extends Model {
super();
setTiebreakFormat(TieBreakFormat.TwoClearPoints);
setEnglishScoring(false);
setNrOfPointsToWinGame(21);
//setNrOfGamesToWinMatch(3);
}

Expand Down

0 comments on commit d22ada5

Please sign in to comment.