버튼 클릭시 페이지 이동할려고 하는데요..
토스트는 잘 나오는데..
startActivity에서 자꾸 오류 내뿜네요..ㅡㅡ
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.ble_conn :
Toast.makeText(this, "~~~", Toast.LENGTH_SHORT).show();
break;
case R.id.buy_fdd :
Toast.makeText(this, "제품 구매 페이지로 이동합니다.", Toast.LENGTH_SHORT).show();
String url ="http://www.naver.com";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent);
break;
case R.id.info_fdd :
Uri uri2 = Uri.parse("https://www.naver.com");
Intent browser2 = new Intent(Intent.ACTION_VIEW, uri2);
startActivity(browser2);
break;
case R.id.whatsthat :
break;
}
}
에러로그는
07-19 16:36:25.177: E/AndroidRuntime(17991): FATAL EXCEPTION: main
07-19 16:36:25.177: E/AndroidRuntime(17991): Process: com.example.fdd_aeonaz.debak, PID: 17991
07-19 16:36:25.177: E/AndroidRuntime(17991): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://www.naver.com/... }
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.app.Activity.startActivityForResult(Activity.java:3930)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.app.Activity.startActivityForResult(Activity.java:3890)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.app.Activity.startActivity(Activity.java:4213)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.app.Activity.startActivity(Activity.java:4181)
07-19 16:36:25.177: E/AndroidRuntime(17991): at com.example.fdd_aeonaz.debak.bluetooth_Activity.onClick(bluetooth_Activity.java:52)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.view.View.performClick(View.java:5204)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.view.View$PerformClick.run(View.java:21153)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.os.Handler.handleCallback(Handler.java:739)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.os.Handler.dispatchMessage(Handler.java:95)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.os.Looper.loop(Looper.java:148)
07-19 16:36:25.177: E/AndroidRuntime(17991): at android.app.ActivityThread.main(ActivityThread.java:5417)
07-19 16:36:25.177: E/AndroidRuntime(17991): at java.lang.reflect.Method.invoke(Native Method)
07-19 16:36:25.177: E/AndroidRuntime(17991): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
07-19 16:36:25.177: E/AndroidRuntime(17991): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)