I’m developing an application that needs to open a web browser in order to show a web page. In addition, the user can open using my own application, so I need to display all the available web browsers and the then handle the option the user chose.
So far, I open the context menu, but I don’t know how to populate it with the items I need.
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
Log.d("WebOff","Creating ContextMenu");
menu.setHeaderTitle("MyTitle");
menu.setHeaderIcon(R.drawable.MyIcon);
menu.add("MyItem");
}
What I want to achieve looks something
like this, but with the browsers installed in the device and my application.
Thanks in advance.
Try this