Sam Sk
Sam Sk

Reputation: 43

How to make Python Kivy webview app with navigation button and open external link in browser?

I am trying to make an android app for a website with Python Kivy. I am using 2nd code from here. 1) I want all external links to open in device browser and 2) Back button minimizes the app instead of exiting. Please suggest the changes I should make. Thanks

For 1st problem, there are some solutions of using if_else with INTENT, but all are in Java and not Python

Upvotes: 3

Views: 2196

Answers (1)

noEmbryo
noEmbryo

Reputation: 2231

  1. To open a link with the device's browser you should use:

    import webbrowser    
    webbrowser.open(link)
    
  2. To pause the app instead of exit it, you should add this method to your App Class:

    def on_pause(self):
        return True
    

Upvotes: 2

Related Questions