openUrl added

This commit is contained in:
Vladimir Enchev
2015-09-09 10:34:21 +03:00
parent 0e61d1a120
commit cd313eb6d2
3 changed files with 22 additions and 2 deletions

View File

@ -130,4 +130,11 @@ export module ad {
export function GC() {
gc();
}
export function openUrl(url: string): void {
var context = ad.getApplicationContext();
if (context) {
context.startActivity(new android.content.Intent(android.content.Intent.ACTION_VIEW, android.net.Uri.parse(url)));
}
}