[問題] 靜態activity不能連接uri?
我用一個靜態activity來存取this,
private static Activity act=null;
onCreate()
{
act = this;
}
然後用一個靜態方法來開啟瀏覽器
public static void linkToWeb()
{
Intent i = new Intent(Intent.ACTION_VIEW,Uri.parse("www.google.com"));
me.startActivity(i);
}
出現No Activity found to handle Intent....的訊息
該如何改寫?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.33.207.109
推
07/31 21:58, , 1F
07/31 21:58, 1F
→
07/31 22:48, , 2F
07/31 22:48, 2F