package world.cryville.common.unity;

import android.content.Intent;
import android.net.Uri;
import com.unity3d.player.UnityPlayer;
import com.unity3d.player.UnityPlayerActivity;

public final class UrlOpener {
	private UrlOpener() { }
	
	static UnityPlayerActivity activity;

	public static void open(String url) {
		if (activity == null) activity = (UnityPlayerActivity)UnityPlayer.currentActivity;
		activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
	}
}