schwabe / ics-openvpn

OpenVPN for Android
3.31k stars 1.2k forks source link

Disconnect intent brings app foreground #1608

Closed psychowood closed 1 year ago

psychowood commented 1 year ago

General information

  1. Android Version 13
  2. Android Vendor/Custom ROM Samsung OneUI 5
  3. Device S23 Ultra
  4. Version of the app 0.7.43

Description of the issue

Hi, I'm trying to call the disconnect intent from Tasker, and I always end up with having ics-openvp on the foreground if the app was previously open. If the app was dismissed/closed, or the VPN was started via quick setting, it does not happen.

You can see in the attached video that when ics-openvpn opens, the key icon (top right) disappears, correctly.

Is this behaviour expected?

For reference, the tasker activity is

Intent;action=android.intent.action.MAIN;component=de.blinkt.openvpn/.api.DisconnectVPN;end

https://user-images.githubusercontent.com/115389/233488903-119b60ac-dd3d-4f26-acda-d381c72affef.mp4

eingemaischt commented 1 year ago

I do have a similar problem with the Connect-Intent.

How would it be possible to start a Connection without bringing the OpenVPN app into the foreground? (Or with Auto-Close it after a successfull connection?)