How to bookmark a webpage in an Android app?

I am developing a newspaper as an application. I am wondering how to save web pages with the click of a button and display it at a later point in time.

I searched in vain for this for this. If someone knows how to do this, and can provide some useful links, it would be very helpful.

+4
source share
1 answer

Perhaps you can just save the url in the database along with favicon or try to get a screenshot from the site to use it as an icon?

You can probably convert Webview to Drawable / Bitmap without much trouble.

Here are two tutorials on the / sql database for Android:

http://www.screaming-penguin.com/node/7742

http://developer.android.com/resources/tutorials/notepad/index.html

Website favicon: http://developer.android.com/reference/android/webkit/WebView.html#getFavicon ()

EDIT from comment: Here is the official database guide from the Android team. http://developer.android.com/resources/tutorials/notepad/index.html

He creates a notepad application that uses a database to save notes. You can use it as a base for your news application, and instead of storing notes in a database, you can store URL, title and any other information about the bookmark.

After you have saved the information in the database, you can use the getFavicon () method in Webview (if the web browser is what you are using) to get the bookmark icon if you want. http://developer.android.com/reference/android/webkit/WebView.html#getFavicon ()

+5
source

Source: https://habr.com/ru/post/1386265/


All Articles