Possible Duplicate:
Create Browser-Bookmark from app
I have tried to create a bookmark for the android web browser using the following code.
public static final void saveBookmark(Context c, String title, String url) {
Intent i = new Intent(Intent.ACTION_INSERT,
android.provider.Browser.BOOKMARKS_URI);
i.putExtra("title", title);
i.putExtra("url", url);
c.startActivity(i);
}
The problem is that the code doesn't directly save the bookmark, but alerts the user with a screen where they can cancel or save the bookmark. How can I create a bookmark without asking the user with an "alert screen"?