Note that there are some explanatory texts on larger screens.

plurals
  1. POForce close in adding a new bookmark in the browser
    primarykey
    data
    text
    <p>I'm trying to add a new bookmark in my web browser, the bookmark is succefully added, but, the program throw an exception after adding the bookmark, I explain :</p> <p>When Browser.saveBookmark is called , I can fill url and title values and then select "save". The item is successfully added to the list. Then, The message displays: "Sorry! The application Browser (process com.android.browser) has stopped unexpectedly. Please try again."</p> <p>Here is my source code : </p> <pre><code>@Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == MENU_ADD) { Browser.saveBookmark(this, "New Bookmark", "http://"); return true; } else return false; } </code></pre> <p>The stack trace in Logcat is as follows : </p> <pre><code> 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): FATAL EXCEPTION: Thread-11 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): at android.os.Handler.&lt;init&gt;(Handler.java:121) 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): at android.webkit.WebIconDatabase$EventHandler.&lt;init&gt;(WebIconDatabase.java:46) 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): at android.webkit.WebIconDatabase$EventHandler.&lt;init&gt;(WebIconDatabase.java:46) 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): at android.webkit.WebIconDatabase.&lt;init&gt;(WebIconDatabase.java:43) 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): at android.webkit.WebIconDatabase.getInstance(WebIconDatabase.java:293) 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): at com.android.browser.Bookmarks.addBookmark(Bookmarks.java:136) 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): at com.android.browser.AddBookmarkPage$SaveBookmarkRunnable.run(AddBookmarkPage.java:136) 01-03 14:47:25.862: ERROR/AndroidRuntime(1720): at java.lang.Thread.run(Thread.java:1096) </code></pre> <p>I have already tried this way to add a bookmark (instead Browser.saveBookmark) :</p> <pre><code> Intent i = new Intent(Intent.ACTION_INSERT, android.provider.Browser.BOOKMARKS_URI); i.putExtra("title", title); i.putExtra("url", url); this.startActivity(i); </code></pre> <p>But, this gave me the same error!</p> <p>So, any workaround on this bug or any other solution to add a bookmark? Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload