1

I'm looking for the path mentioned as below:

private static final String STOCK_BOOKMARKS_CONTENT = "content://browser/bookmarks";
private static final String CHROME_BOOKMARKS_CONTENT = "content://com.android.chrome.browser/bookmarks";

Where is the exact physical location of these paths on my Android mobile phone?

telcom
  • 145
  • 10

2 Answers2

2

Content URIs are not (necessarily) file system paths. They are a representation defined by the content providers to serve data to whoever requests it without revealing the actual source of data, in a way.

The Content URI's are generally in the following form :

content://authority/path/id

Where

content - the first part (here content) is the scheme of the URI. It could be anything like file for File Uri's.

authority - The name of the content provider , i.e. the content provider uses this part to identify content uri's meant for them and not for some other content provider.

path & id - these are defined by the content providers to (generally) identify the exact location of data in their data store (local database, some rest api etc)

Interestingly, Content providers provide a way to get a hold of an InputStream for the content represented by a ContentURI - using getContentResolver().openInputStream(uri)

Related

Community
  • 1
  • 1
Vinay W
  • 9,912
  • 8
  • 41
  • 47
0

It depends of Device and system, purpose of "content" is abstraction of files location

bongo
  • 733
  • 4
  • 12
  • The app is reading bookmarks from these locations. However, I'm not sure where are the bookmarks stored physically. I cannot find them. For the default browser of the mobile the path looks correct. For the Chrome it doesn't work. – telcom Dec 09 '15 at 11:13