Android - Web Browser

  • #1, z darren-beckettFriday, 24. March 2017, 11:58 hodinky 8 years ago
    Hi,

    I'm trying (and failing) to to open a web browser from within the Android App.

    None of these work:
    startDefaultBrowser(url)
    
    
    os.execute("start " .. url) 
    
    os.execute("open " .. url) 
    
    os.execute('start "" "' .. url .. '"') 
    
    os.execute('open "" "' .. url .. '"') 
    
    os.execute("am start -n com.android.browser/com.android.browser.BrowserActivity ".. url)

    Is there something you guys need to do within the Android APK?

    Čestný člen

    384 Posts


  • #2, z sebastianFriday, 24. March 2017, 13:12 hodinky 8 years ago
    Try this for Android :

    os.execute("am start -n com.android.browser/com.android.browser.BrowserActivity "..url)

    Kapitán

    2346 Posts

  • #3, z darren-beckettFriday, 24. March 2017, 13:26 hodinky 8 years ago
    That's something i've tried, it does nthing either.

    I don't think the App has Internet settings/permissions.

    Čestný člen

    384 Posts

  • #4, z sebastianFriday, 24. March 2017, 14:15 hodinky 8 years ago
    what does os.execute return when you print it? 

    Kapitán

    2346 Posts

  • #5, z darren-beckettFriday, 24. March 2017, 15:14 hodinky 8 years ago
    what does os.execute return when you print it? 

    The last part of the script is output to the log and it shows how many milliseconds it took.

    Each of the options i tried took a different amount of time.

    No errors though.

    Čestný člen

    384 Posts

  • #6, z darren-beckettMonday, 27. March 2017, 21:04 hodinky 8 years ago
    Any solutions?

    Čestný člen

    384 Posts

  • #7, z darren-beckettMonday, 27. March 2017, 21:05 hodinky 8 years ago
    Any solutions?

    Čestný člen

    384 Posts

  • #8, z sebastianMonday, 27. March 2017, 21:11 hodinky 8 years ago
    sorry, never exported something (to android) yet. 

    Kapitán

    2346 Posts

  • #9, z darren-beckettMonday, 27. March 2017, 23:42 hodinky 8 years ago
    No worries Seb, we need the devs to get involved.

    Čestný člen

    384 Posts

  • #10, z darren-beckettTuesday, 28. March 2017, 12:03 hodinky 8 years ago
    Simon?

    Čestný člen

    384 Posts

  • #11, z SimonSTuesday, 28. March 2017, 12:14 hodinky 8 years ago
    This cannot yet be done, I will add this to startDefaultBrowser for vis 5.

    Kapitán

    1582 Posts