Chromium Based android Webview for HTML5 Caching

791 views
Skip to first unread message

Balram Pandey

unread,
Sep 9, 2015, 11:38:11 AM9/9/15
to Chromium-discuss
hello Group 

I'm a Android Developer and new in chromium please Help me for begin with chromium i have no idea how to do please help

thanks

PhistucK

unread,
Sep 9, 2015, 1:20:17 PM9/9/15
to balramp...@gmail.com, Chromium-discuss
Once we know the area in which you need help, we will gladly try to help. :)


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Balram Pandey

unread,
Sep 10, 2015, 3:04:07 AM9/10/15
to PhistucK, Chromium-discuss
thanks for Reply i'm CTO is a startup (Gamezop) that make app for html5 games user can play multiple game in single app 
in this we caching html5 data for offline game play.currently we are using crosswalk webview for game loading and caching but crosswalk is heavy in size so we decided to make own browser to load and cache HTML5 game but currently we have no working idea on chromium .

Torne (Richard Coles)

unread,
Sep 10, 2015, 3:39:09 AM9/10/15
to balramp...@gmail.com, PhistucK, Chromium-discuss

Crosswalk is big because it's based on chromium, which is big :) You're unlikely to be able to reduce your size significantly by including your own build of chromium instead, and it will be much harder to do and maintain.

Probably the only way to save significant size is to use the actual platform WebView instead of bundling your own.

Torne (Richard Coles)

unread,
Dec 8, 2015, 6:08:58 AM12/8/15
to Balram Pandey, PhistucK, Chromium-discuss
Please don't post the same thing multiple times (or email developers individually unsolicited).

The normal application cache events are fired in the page's DOM just as in a browser. If you want to relay this information to the Java code which is embedding the WebView, you can use any of the normal ways to communicate between the page and the app, such as WebView.evaluateJavascript and WebView.addJavascriptInterface.

On Tue, 8 Dec 2015 at 08:37 Balram Pandey <balramp...@gmail.com> wrote:
hi Trone 

now i'm using Chromium webview for html5 caching i want to track caching progress in webview so how track Chromium Application Cache Progress event  in android webview.

Torne (Richard Coles)

unread,
Dec 8, 2015, 9:16:16 AM12/8/15
to Balram Pandey, PhistucK, Chromium-discuss
You can evaluate arbitrary javascript using WebView.evaluateJavaScript - this includes the ability to attach your own DOM event handlers/etc that aren't part of the page, by just evaluating code that calls addEventListener or similar. You don't have to modify the page to be able to interact with its DOM.

On Tue, 8 Dec 2015 at 11:22 Balram Pandey <balramp...@gmail.com> wrote:
Hey Richard

Thanks for writing back. Apologies for writing in twice. That was by error.

The problem is that our app is a platform for game developers, more than a showcase of our own games. What I mean is that the games that are running in our app aren't written by us. Nor are they hosted on our servers. As a result, we cant modify the DOM / call JS functions from the DOM. However, we did notice while debugging the app that Chromium is tracking the contents of the manifest as they are cached. (Have attached a brief snippet below):

12-01 18:35:25.929 6630-6630/dev.gamezop I/chromium: [INFO:CONSOLE(0)] "Application Cache Progress event (43 of 76) http://sprintclubnitro.tresensa.com/1.0.3/assets/audio/music.m4a", source: http://sprintclubnitro.tresensa.com/index.html?dst=B0000 (0)
12-01 18:35:25.993 6630-6630/dev.gamezop I/chromium: [INFO:CONSOLE(0)] "Application Cache Progress event (44 of 76) http://sdk.tresensa.com/tgs/images/redirects/facebook.png", source: http://sprintclubnitro.tresensa.com/index.html?dst=B0000 (0)
12-01 18:35:25.993 6630-6630/dev.gamezop I/chromium: [INFO:CONSOLE(0)] "Application Cache Progress event (44 of 76) http://sdk.tresensa.com/tgs/images/redirects/facebook.png", source: http://sprintclubnitro.tresensa.com/index.html?dst=B0000 (0)

Is there a way for us to get the caching progress (44 of 77 etc.) so that we know the caching status even without having any calls being made from the DOM?

Thanks a ton

Balram

Torne (Richard Coles)

unread,
Dec 8, 2015, 9:16:55 AM12/8/15
to Balram Pandey, PhistucK, Chromium-discuss
Oh, also, chromium is not printing those messages - that's normal Javascript console.log output from the page's javascript code. Anything logged with tag CONSOLE is just a console.log message from the page.

Balram Pandey

unread,
Dec 24, 2015, 6:59:51 AM12/24/15
to Chromium-discuss, balramp...@gmail.com
hi

how chromium android webview clear cache.I want to clear cache for single url cache so it is posible . 

PhistucK

unread,
Dec 24, 2015, 7:03:29 AM12/24/15
to bal...@gamezop.co, Chromium-discuss, Balram Pandey
Did you search for "android webview clear cache"?


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.

Balram Pandey

unread,
Dec 24, 2015, 7:14:07 AM12/24/15
to Chromium-discuss, balramp...@gmail.com
thanks for reply. 
we are developing a app that is for multiple game in single app.when user play game,game will cached in memory.
i want to clear cache for single game.
i'm using webview.clearCache(true) for clear webview cache but this method clear all game cache so it is posible to clear only one game cache.


On Wednesday, September 9, 2015 at 9:08:11 PM UTC+5:30, Balram Pandey wrote:

Torne (Richard Coles)

unread,
Dec 24, 2015, 8:21:55 AM12/24/15
to bal...@gamezop.co, Chromium-discuss, balramp...@gmail.com

No, there is no way to remove specific things from the cache. You can only clear the entire cache.


--

Balram Pandey

unread,
Mar 7, 2016, 7:43:20 AM3/7/16
to Chromium-discuss, balramp...@gmail.com
hi

we have some issue regarding Chromium webview 

1-How to know all data is cashed ?

im using onPageFinished but this method always called when back press or net work error



On Wednesday, September 9, 2015 at 9:08:11 PM UTC+5:30, Balram Pandey wrote:
Reply all
Reply to author
Forward
0 new messages