Posts

Showing posts with the label Bookmark

Open webpage using Android app and mark URL as Bookmark

Few of fellow developer friends drop me a query about an app which open a browser with predefined URL & mark that URL as bookmark. The solution is as follows:- To open a browser with in a app, you have to create a browser Intent.         private void browseURL(String url) {             Intent browseIntent = new Intent(Intent.ACTION_VIEW);             browseIntent.setData(Uri.parse(url));             startActivity(browseIntent);         } Now before saving this URL as a bookmark, you need to check whether it's already exist or not. So to read bookmarks we need to access Android's Browser content provider using ContentResolver object. You can then use the ContentResolver's methods to interact with whatever content providers you're interested in. private boolean isBookmarked() {             boolean isBookema...