I am writing a code to open Browser. But when i m running the program it shows Activity not found . Is It necessary to declare activity in Mainfest file , when i use Intent.Action_VIEW,Uri Code in my Program?
I have dont lot of R & D on google but not able to find the solution. Please help. The code is following. What i should do to recover this problem.
private void openBrowser() {
Uri uri = Uri.parse(urlText.getText().toString());
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
}
It depends on what you type in the textbox. Try with http://www.google.com. It worked for me. From your comment it seems you typed google.com instead of http://www.google.com. Try this!!!