WebView + Gears

by Evan Ruff » Mon, 29 Jun 2009 10:52:40 GMT


Sponsored Links
 Hey guys,

I was wondering if I can use the Gears Toolkit within WebView? I heard
a nasty rumor that it was not available in WebView.

If Gears is not available, what other storage mechanisms/paradigms are
recommended?

Thanks!

Evan
--~--~---------~--~----~------------~-------~--~----~



WebView + Gears

by Mark Murphy » Mon, 29 Jun 2009 19:04:02 GMT


 


At least as of Android 1.1, it was not available in WebView, and I am
not aware that situation has changed.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android App Developer Books:  http://commonsware.com/books.html 

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


WebView + Gears

by Evan Ruff » Mon, 29 Jun 2009 20:29:50 GMT


 Huh, that seems kind of like a curious decision.

So, in order to use WebView and have persistent storage, I have to use
the Javascript -> Android Interface specifically, then either expose
standard getDB, executeStatement, getResultSet in
WebView#addJavascriptInterface() ?

Also Mark, thanks for all your help. I really appreciate you answering
my questions so quickly! I have to say that without your help the
learning curve for Android Development would be insurmountable.

E





--~--~---------~--~----~------------~-------~--~----~



WebView + Gears

by Mark Murphy » Mon, 29 Jun 2009 20:40:46 GMT


 


Well, I'd wrap the APIs in my own business rules, for input validation
and such, rather than expose the raw Android APIs.

And once the Android edition of WebKit is up on HTML5, I imagine you'll
get much of Gearsy goodness without the need for the plugin.

As to why the plugin is not available for WebView, I have no idea.


You're very welcome!

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Development Wiki:  http://wiki.andmob.org 

--~--~---------~--~----~------------~-------~--~----~



WebView + Gears

by Evan Ruff » Mon, 29 Jun 2009 20:42:58 GMT


 Well, the whole point was kind of to be able to take my exisiting GWT/
Gears Application and fire it down into a WebView Component to gain
more control over the chrome, resource loading, etc.

It doesn't look like that's really going to work with this
implementation!

E





--~--~---------~--~----~------------~-------~--~----~



WebView + Gears

by Mark Murphy » Mon, 29 Jun 2009 21:22:39 GMT


 


Ah.


Yeah, probably not. Long-term, HTML5 will probably be the answer.
Short-term, you're looking at coding changes.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Need help for your Android OSS project?  http://wiki.andmob.org/hado 

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. MapView In Android

Hai,

I am Using a MapView in my application and showing the map according to the
longitude and latitude getting by the other part of the application. The
logintude and latitude may change according to the user input. The First
time map showing correctly but from the second time onwards it shows
"android.view.InfalteException". How to solve it . If needs i will put the
code also.

Please Help,
Thank you.

-- 

2. InputStream read on raw Resource leaks memory?

This stems from an issue I posted in the android-ndk group, but I
found recently that that's not really where the problem stems from.
Basically, I'm writing a game, for which I store all my
assets(textures, 3d models, level maps, etc) as raw resources(which I
load through my Activity into byte arrays which are then passed to the
ndk for processing). However, after 7 times of loading the activity,
it would crash saying either "Out of Memory" or "Bitmap exceeds VM
budget". After a bunch of work paring down what the issue could be, I
found that if I only load each byte array once, into static arrays,
the problem no longer occurs.

Clearly a memory leak is occurring here and I have reason to believe
that it's not in my actual storage of the byte arrays since even if
the arrays are made non-static, setting them to null and then
reloading them results in the same crash after 7 runs. I've tried
closing the input stream after each resource is loaded, but that
didn't help either. I'm wondering if there's a reason why reading raw
resources this way leaks memory and also if there's a way to stop this
from occurring.

Thanks for any help.

-- 

3. How to evenly spread the column width in the list activity?

4. File Pushing Problem on to the Emulator

5. New Developer

6. Hello Android app not working?

7. Trouble recording audio