1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 10:50:51 +01:00

AndroidTarget: Add method to open a url in the default browser

This commit is contained in:
Marc Bonnici 2018-03-08 13:21:53 +00:00 committed by setrofim
parent 17d32a4d40
commit e22d278267

View File

@ -1390,6 +1390,10 @@ class AndroidTarget(Target):
cmd = 'settings put system user_rotation {}'
self.execute(cmd.format(rotation))
def open_url(self, url):
cmd = 'am start -a android.intent.action.VIEW -d "{}"'
self.execute(cmd.format(escape_double_quote(url)))
def homescreen(self):
self.execute('am start -a android.intent.action.MAIN -c android.intent.category.HOME')