Skip to content

Commit 3389eb5

Browse files
committed
2.0.7 adds GitHub as homepage and updates readme
1 parent 260490b commit 3389eb5

File tree

5 files changed

+56
-21
lines changed

5 files changed

+56
-21
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
11
# PSO2-Alert Android
2-
PSO2 Alert is a free application (with no ads) designed to display upcoming Emergency/Urgent quest notifications for PSO2 Classic/NGS Global and Japan.
2+
The original PSO2 Alert by Arks-Layer, now for your Android device!
33

4-
*Please note that whilst the application is open-source the APIs it uses are not. Please seek permission from AIDA/Arks-Layer if you wish to use it.*
4+
PSO2 Alert is designed to announce upcoming Emergency/Urgent Quests for both Japanese and Global versions of PSO2 New Genesis and Classic as well as Field Events (e.g. Gigantix) for both servers.
5+
6+
###Features
7+
- Announcements for upcoming events.
8+
- Choose which events to be notified for.
9+
- Supports one or more server choices such as NGS Global, Global Classic, Global Field Events, NGS JP, JP Classic and/or JP Field Events.
10+
- Announcement times in the device's timezone.
11+
- Always ad-free with no in-app purchases or notifications not related to PSO2.
12+
13+
###Please note:
14+
- Alerts are community driven and may be missed or incorrect. Contact our [Discord](https://discord.gg/pso2) if you would like to help.
15+
- A persistent notification is required to stop the app from being killed by Android. You can long press the notification, tap on the settings icon and then uncheck "PSO2 Alert Service" to hide it. You can also set it to "Silent" if you just want to remove the icon.
16+
- The app uses Android's Alarm Manager to perform the alert checks. This allows Android to group tasks from other apps together and thus should not cause any extra battery drain.
17+
- Most of the features of this app are done server-side and thus it may seem like this application is rarely updated. Install it and you'll see that it works.
18+
- Whilst the application is open-source the APIs it uses are not. Please seek permission from AIDA/Arks-Layer if you wish to use them.
19+
20+
###Download
21+
You can download the latest version of the Application from the [releases](https://github.com/acffordyce973/PSO2-Alert-Android/releases) page.
522

623
## Contributions
724
Pull requests with new features or bug fixes are most welcomed.
825

926
Please use the Issues tab for bug reports or feature requests.
1027

11-
## Building
28+
### Building
1229
Built using Android Studio.
13-
TODO.
30+
31+
Release builds are signed with a private keystore but debug builds are unsigned.
1432

1533
## Credits
1634
- AIDA - For the original desktop application and the APIs.

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ android {
2727
applicationId = "com.arks_layer.pso2_alert"
2828
minSdk = 26
2929
targetSdk = 34
30-
versionCode = 2060
31-
versionName = "2.0.6"
30+
versionCode = 2070
31+
versionName = "2.0.7"
3232

3333
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3434
signingConfig = signingConfigs.getByName("release")

app/src/main/java/com/arks_layer/pso2_alert/MainActivity.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import android.app.PendingIntent;
99
import android.content.ComponentName;
1010
import android.content.Context;
11-
import android.content.DialogInterface;
1211
import android.content.Intent;
1312
import android.content.IntentFilter;
1413
import android.content.pm.PackageManager;
@@ -22,13 +21,11 @@
2221
import android.os.Handler;
2322
import android.os.Looper;
2423
import android.os.PowerManager;
25-
import android.text.Editable;
26-
import android.text.TextWatcher;
24+
import android.text.method.LinkMovementMethod;
2725
import android.util.Log;
2826
import android.view.View;
2927
import android.widget.AdapterView;
3028
import android.widget.ArrayAdapter;
31-
import android.widget.EditText;
3229
import android.widget.Spinner;
3330
import android.widget.TextView;
3431
import android.widget.Toast;
@@ -69,9 +66,7 @@ public void showToast(Context context, String message, int duration)
6966
{
7067
try {
7168
Handler mainHandler = new Handler(Looper.getMainLooper());
72-
mainHandler.post(() -> {
73-
Toast.makeText(context, message, duration).show();
74-
});
69+
mainHandler.post(() -> Toast.makeText(context, message, duration).show());
7570
}
7671
catch (Exception e) {
7772
Log.e("MainActivity", "Show Toast: " + e.getMessage());
@@ -350,6 +345,12 @@ private void getAppMessage()
350345
String serverURL = getString(R.string.uri_main) + "/PSO2-Alert/android_message.php";
351346
Log.d("MainActivity", "Using the following message URL at " + serverURL);
352347

348+
Handler homepageHandler = new Handler(Looper.getMainLooper());
349+
homepageHandler.post(() -> {
350+
TextView lblHomepage = findViewById(R.id.lblHomepage);
351+
lblHomepage.setMovementMethod(LinkMovementMethod.getInstance());
352+
});
353+
353354
//Download data from server
354355
String apiData = null;
355356
try {
@@ -363,10 +364,11 @@ private void getAppMessage()
363364
//Dunno why it needs to be final but it does
364365
String finalApiData = apiData;
365366

366-
Handler mainHandler = new Handler(Looper.getMainLooper());
367-
mainHandler.post(() -> {
367+
Handler messageHandler = new Handler(Looper.getMainLooper());
368+
messageHandler.post(() -> {
368369
TextView lblMessage = findViewById(R.id.lblMessage);
369370
lblMessage.setText(finalApiData);
371+
lblMessage.setMovementMethod(LinkMovementMethod.getInstance());
370372
});
371373
}
372374

@@ -492,9 +494,7 @@ protected void onCreate(Bundle savedInstanceState) {
492494
showToast(context, getString(R.string.toast_message_exit), Toast.LENGTH_LONG);
493495
triggerKill(context);
494496
});
495-
alert.setNegativeButton("Cancel", (dialog, whichButton) -> {
496-
dialog.cancel();
497-
});
497+
alert.setNegativeButton("Cancel", (dialog, whichButton) -> dialog.cancel());
498498

499499
alert.show();
500500
});

app/src/main/res/layout/activity_main.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,22 @@
4343
android:text="@string/label_disclaimer"
4444
android:textColor="@color/general_text"
4545
android:textSize="20sp"
46+
app:layout_constraintBottom_toTopOf="@id/lblHomepage"
47+
app:layout_constraintEnd_toEndOf="@id/lblHomepage"
48+
app:layout_constraintStart_toStartOf="@id/lblHomepage"
49+
app:layout_constraintTop_toBottomOf="@id/materialToolbar" />
50+
51+
<TextView
52+
android:id="@+id/lblHomepage"
53+
android:layout_width="0dp"
54+
android:layout_height="wrap_content"
55+
android:text="@string/label_home_page"
56+
android:textColor="@color/general_text"
57+
android:textSize="20sp"
4658
app:layout_constraintBottom_toTopOf="@id/lblSettings"
4759
app:layout_constraintEnd_toEndOf="@id/lblSettings"
4860
app:layout_constraintStart_toStartOf="@id/lblSettings"
49-
app:layout_constraintTop_toBottomOf="@id/materialToolbar" />
61+
app:layout_constraintTop_toBottomOf="@id/lblMessage" />
5062

5163
<TextView
5264
android:id="@+id/lblSettings"
@@ -62,7 +74,7 @@
6274
android:textStyle="normal"
6375
app:layout_constraintEnd_toEndOf="@id/materialToolbar"
6476
app:layout_constraintStart_toStartOf="@id/materialToolbar"
65-
app:layout_constraintTop_toBottomOf="@id/lblMessage" />
77+
app:layout_constraintTop_toBottomOf="@id/lblHomepage" />
6678

6779
<ScrollView
6880
android:id="@+id/scrollView2"

app/src/main/res/values/strings.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
<!DOCTYPE resources [
33
<!ENTITY appname "PSO2 Alert">
44
<!ENTITY author "ARKS-Layer">
5+
<!ENTITY apppage "https://github.com/acffordyce973/PSO2-Alert-Android">
6+
<!ENTITY discord "https://discord.gg/pso2">
57
]>
68
<resources>
79
<string name="app_name">&appname;</string>
810
<string name="author">&author;</string>
911

1012
<string name="uri_main">https://pso2.acf.me.uk/Projects</string>
13+
<string name="uri_github">&apppage;</string>
1114

1215
<string name="title_glb">Global</string>
1316
<string name="title_jpn">Japan</string>
@@ -40,7 +43,9 @@
4043
<string name="channel_japan_ngs_field_description">Japanese NGS Field Notifications.</string>
4144

4245
<string name="label_no_connection">No Internet Connection</string>
43-
<string name="label_disclaimer">Please note that Alerts are community driven and may be missed or incorrect. Contact our Discord if you would like to help.</string>
46+
<string name="label_disclaimer">Please note that Alerts are community driven and may be missed or incorrect.</string>
47+
<string name="label_home_page">Updates, issues, and feature requests can be found at the <a href="&apppage;">PSO2 Alert Homepage</a>.</string>
48+
<string name="label_interval">Check Interval:</string>
4449
<string name="label_notification_service_sub">Running</string>
4550
<string name="label_notification_service_content">Next Check at %1$s…</string>
4651

0 commit comments

Comments
 (0)