Image / HTML return using custom URI on Android

I am wondering if it is possible to return web content using Android in order to register user URI protocols for launching applications, rather than launching the application itself, so that myapp: //images/logo.png returns the image logo. png for webview

I am working on a tool that allows a company to open document libraries in Android. Libraries are only zip files with HTML, images, XML, etc. The desktop version already uses its own URI protocol handler, therefore, as a result, all HTML files in the library are hard-coded for use.

Is there any way to implement this? I would prefer not to modify the DOM at boot by entering JavaScript, but from looking around it seems like the only way. I hope someone here can tell me otherwise.

Thanks Daniel

+3
source share
1 answer

I am wondering if it is possible to return web content using Android in order to register user URI protocols for launching applications, rather than launching the application itself, so that myapp: //images/logo.png returns the image logo. png for webview

Only if myappreplaced by content, and if imagesis an authority for ContentProvider.

0
source

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


All Articles