SDL: New API SDL_ANDROID_OpenExternalWebBrowser() to open URL in Android web browser or relevant app such as Youtube

This commit is contained in:
pelya
2015-03-15 22:54:13 +02:00
parent bd2c959a17
commit e3082701a5
3 changed files with 19 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ import android.app.AlarmManager;
import android.content.Intent;
import android.view.View;
import android.view.Display;
import android.net.Uri;
class Mouse
@@ -914,6 +915,11 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
return ret;
}
public void openExternalWebBrowser(String url)
{
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
}
private int PowerOf2(int i)
{