ashraf789 / Cake-VPN

Android VPN app based on OpenVPN library.
GNU General Public License v2.0
373 stars 141 forks source link

Clicking on notification doesn't open app #111

Closed javaddeveloper closed 2 years ago

javaddeveloper commented 2 years ago

Hello When i click on notification to open up main application , it doesn't work I want to open app when click on notification Could you review it

ashraf789 commented 2 years ago

It's working fine. please let me know more about your device.
https://play.google.com/store/apps/details?id=com.ashraf789.cakevpn

javaddeveloper commented 2 years ago

I have changed my main activity name and that problem happened and i solve it by rename MainActivity

Now i have another question

I want user could not disconnect VPN from notification when user click on disconnect on notification open main application and user disconnect VPN from MainActivity

ashraf789 commented 2 years ago
  1. to change MainActivity update here: https://github.com/ashraf789/Cake-VPN/blob/master/vpnLib/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java#L482

  2. to update disconnect to your main activity: https://github.com/ashraf789/Cake-VPN/blob/master/vpnLib/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java#L445

javaddeveloper commented 2 years ago

Thank you for response How can change this line to open main app when user click on disconnect ?

https://github.com/ashraf789/Cake-VPN/blob/master/vpnLib/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java#L445

ashraf789 commented 2 years ago

Replace DisconnectVPNActivity.class with your mainactivity so when click disconnect button, app will open your mainactivity

javaddeveloper commented 2 years ago

Hello could you say which number of line is for notification update states?

in the notification show text line to update states i want that text input to change it

ashraf789 commented 2 years ago

I can't remember. Please debug notification-related code. Thanks