summaryrefslogtreecommitdiff
path: root/remoteExample/src/main/java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2024-12-04 19:21:06 +0100
committerArne Schwabe <arne@rfc2549.org>2024-12-04 19:36:03 +0100
commit77929094851d5b5c46c3ff37b227a3b7994797ab (patch)
tree78db5427c1e25629b430dafa7212acdf13606ac7 /remoteExample/src/main/java
parent4c500989a374bcac11b1ba14551eb95364374023 (diff)
Add toast when service connection cannot be established (closes #1757)
This is just an example app that should give an example of a happy path. It shouldn't require handle all the errors... Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Diffstat (limited to 'remoteExample/src/main/java')
-rw-r--r--remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java
index 14fa3887..d98fdedd 100644
--- a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java
+++ b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java
@@ -233,6 +233,10 @@ public class MainFragment extends Fragment implements View.OnClickListener, Hand
@Override
public void onClick(View v) {
+ if (mService == null) {
+ Toast.makeText(getActivity(), "No service connection to OpenVPN for Android. App not installed?", Toast.LENGTH_LONG).show();
+ return;
+ }
switch (v.getId()) {
case R.id.startVPN:
try {