Skip to content

Commit

Permalink
Start VPN automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
vertexodessa committed Feb 23, 2025
1 parent 5061715 commit 91953cc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/src/main/java/com/openipc/pixelpilot/VideoActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,15 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten
startDvr(dvrUri);
}
}
} else if (requestCode == 100) { // VPN_REQUEST_CODE is 100
if (resultCode == RESULT_OK) {
// VPN permission granted, start the VPN service
Intent serviceIntent = new Intent(this, WfbNgVpnService.class);
startService(serviceIntent);
} else {
// VPN permission not granted
Log.e(TAG, "VPN permission was not granted by the user.");
}
}
}

Expand Down

0 comments on commit 91953cc

Please sign in to comment.