01-26-2012, 07:35 AM | #1 |
Member
Posts: 14
Karma: 162
Join Date: Jun 2010
Device: pb 302, KT
|
Kindle touch browser javascript capabilities
Hi,
does anyone know what kind of javascript events are supported in the webkit browser of kindle touch? (touchstart, touchmove etc, or mousemove etc) I need it for a html5 drawing app. the wiki mentions a proof-of-concept drawing app that is 'installed' in the /var/local/waf directory on the KT: Code:
com.lab126.draw - <content src="http://mrdoob.com/projects/harmony/#simple" /> |
01-26-2012, 05:46 PM | #2 |
(offline)
Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Works for me when started as a WAF app.
I'm attaching something I did a while ago, but didn't see any use for until now. This is what could be called a "pseudo-schema" for waf config.xml files, reverse-engineered from the waf libs. No guarantees, but maybe it can prove useful for this or other WAF projects. Last edited by ixtab; 01-26-2012 at 06:24 PM. Reason: typo |
01-27-2012, 12:36 AM | #3 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Home / Menu / Launcher / Launch Apps / Draw Tool In the Draw Tool, tap the menu button (initially labelled SIMPLE) and click the Down Arrow, then select SQUARES. I like the SQUARES tool because it draws black boxes that vary in size depending on how fast you slide your finger across the screen. You can make some nice "screen savers" by moving your finger in swirls of varying speeds while moving it all around the screen. You can even save the images that you create (screen snapshot). For your own javascript apps, although disabled in the K3, the K4NT (and perhaps the Touch), you can run .js files from .html files stored on /mnt/us (using a file:/// URL). Last edited by geekmaster; 01-27-2012 at 12:39 AM. |
|
01-27-2012, 06:03 AM | #4 | |
Enthusiast
Posts: 44
Karma: 5666
Join Date: Dec 2011
Device: K3-3G, KT SO
|
Quote:
Do you have other version of this laucher ? I installed the only one that is on yifanlu's page - and there's only "orientation" and "usbnetwork" |
|
01-27-2012, 06:03 AM | #5 |
Member
Posts: 14
Karma: 162
Join Date: Jun 2010
Device: pb 302, KT
|
great, thanks for the answers.
AFAIK the browser app itself is just a WAF-app itself, and it probably consumes the touchmove events for scrolling, which is why the mentioned drawing webapp does not work when viewed in the browser... |
01-27-2012, 03:16 PM | #6 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Attached is the missing folder. Just unzip it and copy the "hiddenfeatures" folder into your launcher "extensions" folder on the kindle USB Drive, after installing the launcher. Then you should be able to run the Draw Tool as described in my previous post. |
|
01-27-2012, 11:21 PM | #7 |
Connoisseur
Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
|
Here's a beta of what I've been working on regarding homebrew hacks with the browser.
Enter WAFbrew WAFbrew - v1.0 dasmoover@gitbrew.org Requirements: Kindle Touch Jailbreak GUI Launcher Place waf in /mnt/us and extensions in /mnt/us ##Description - mounts local /mnt/us/waf to /var/local/waf -- Launch Wafapp via Launcher, build html/html5 apps for kindle. Included is link to google voice without search bar, html5 checklist and wafbrew placeholder. http://www.gitbrew.org/~dasmoover/ki...afbrew-1.0.zip |
01-28-2012, 01:39 AM | #8 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
/mnt/us/extensions/wabrew/menu.json: {"name": "GVoice", "priority": 1, "action": "bin/wafbrew.sh", "params": "gvoice"} /mnt/us/extensions/wabrew/bin/wafbrew.sh: mount --bind /mnt/us/waf/$WAF /var/local/waf/sample Potential correction: cd /mnt/us/waf mv voice gvoice Or you could change the menu params to "voice". The param value and directory name should match, right? Last edited by geekmaster; 01-28-2012 at 01:46 AM. |
|
01-28-2012, 01:57 AM | #9 |
Connoisseur
Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
|
Yes, sorry, folder was not changed on devbox.
|
01-29-2012, 02:22 AM | #10 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
By a curious coincidence, I'm about to return a Kindle Touch because of the answer to your initial question about JavaScript events....
As far as I can tell, Kindle's experimental browser does not support any touch events. It also does not support mouseup/mousedown correctly. If you tap something, it sends mousedown, mouseup, and click. If you touch and hold, it doesn't send any events at all. I doubt it supports mousemove, but even if it did, it wouldn't be particularly useful without a working mousedown/mouseup or touchstart/touchend. Also, it has about a two second click latency. When you click a link, it takes about two seconds for JavaScript to start running or for the new page to start loading. This applies to even the simplest content, e.g. <div onclick="alert('Yo.');">Click me</div>. Also, it does not support the viewport meta tag. Combine that with the lack of touch events, and there's no way to prevent double-tap scrolling. There's also no way to scroll the browser chrome off the screen, which is only problematic because it takes up about 13% of the screen real estate (most of which is the location bar). Finally, CSS transforms are a little buggy; scaling in particular tends to result in content disappearing rather than getting lighter, presumably because of poor anti-aliasing support in their display code. In short, although the browser does a fairly good job at rendering (I think it is based on WebKit), it does a terrible job at doing just about anything with the slightest bit of interaction. Kindle Touch results from my test tool (http://www.gatwood.net/runtests.html): onclick: pass onmousedown: fail ontouchstart: fail latency: 2.4 seconds *shivers* |
01-29-2012, 08:10 AM | #11 |
(offline)
Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Sorry, but this is something that I don't get.
You're about to return an E-book reader because a feature that is completely out of the original scope of the device, and is clearly labeled as experimental, does not allow you to do "advanced" things? Dude... you might know that desktop browsers took almost 20 years to get where they are today, and still not everything is working 100%. I don't get it. Last edited by ixtab; 01-29-2012 at 10:28 AM. |
01-30-2012, 08:27 AM | #12 |
Member
Posts: 14
Karma: 162
Join Date: Jun 2010
Device: pb 302, KT
|
@dgatwood: I also bought the touch partly because of its html/javascript capabilities.
As mentioned earlier in this thread, all the functionality you want is basically there, but only when interactive web-apps are launched as waf-apps rather than in the browser. So I guess if you are able and willing to do a little hacking, it should be possible to write either custom config.xml for the websites you want to visit on the kindle, or to write a some kind of generic webapp launcher without the restrictions of the built-in broswer. |
02-03-2012, 04:15 PM | #13 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
Second, touch event and click event support is not advanced. Touch support for a touch-based browser is considered very basic functionality these days. Having some form of either touch support or mousedown/mouseup support is the absolute minimum requirement for writing any usable interactive JavaScript code. This device lacks working versions of both of those. Every other touch-based mobile browser on the planet has supported touch events for at least two or three years, and iOS has supported them for almost four. Mousedown and mouseup events have been supported by nearly every browser written since Netscape 2.0 (1996). Features that have been in common use for more than 15 years simply don't qualify as "advanced" in any sane universe. I'd expect an experimental browser to have bugs that cause crashes. I'd expect it to lack what are currently considered advanced features—scalable vector graphics support, WebGL, and so on. I would tolerate a limited set of fonts or a limited range of UTF-8 glyphs. I would even accept some rendering quirks that would require slightly different CSS or HTML to accommodate it. To me, experimental means that it is basically working, but that it still has some quirks. By contrast, this browser is not "basically working". I've never seen a browser that takes nearly two full seconds just to start handling a click—not even when I was using NCSA Mosaic 0.9 betas on 68k Macs in the mid 1990s. That's just not acceptable performance even if my only need for the browser were occasionally looking something up in WikiPedia. This browser made my circa-1999 Palm III look like a speed demon by comparison. I can't imagine how anyone could consider that to be acceptable performance, even for an experimental browser. Further, the fact that web browsers took twenty years to reach the performance they have today is irrelevant. Amazon started with WebKit, a fully functioning browser core that got them about 98% of the way for free. Instead of spending a few months integrating it correctly with their OS's touch support, they left the thing in a borderline unusable state. Since I have no way of knowing if they will ever fix that, I'd have to be crazy to keep the device. I bought the Kindle Touch because I needed an E-Ink device with a built-in browser. It was one of only two E-Ink tablets that has a browser without having to root the device. Amazon advertised that it came with a browser, but provided no details about what was and was not supported. The only way to find out was to buy it and try it. I concluded that it lacked critical basic functionality, so I returned it. Simple as that. If Amazon wants to avoid such returns in the future, they can feel free to publish a document outlining what is and is not supported in their experimental browser. Otherwise, they can safely expect that people who actually hope to use the browser will be seriously disappointed. I'm now happily running a rooted Nook Simple Touch with Opera Mobile. It supports my needs almost flawlessly. For such a trivial web app, anything less than almost flawless is a shock, because what I'm doing really is that basic.... And even the basic Android WebKit browser worked much better than what Kindle provided—you know, the built-in Nook browser that's so unofficial that they don't even advertise it as a feature. For something advertised as a feature—even an experimental feature—I expected far better than what I got. |
|
01-03-2013, 07:22 AM | #14 |
Junior Member
Posts: 3
Karma: 10
Join Date: Nov 2012
Device: Kindle Touch
|
The jailbreak is fine but isn't there a way without jailbreak, so the Kindle Touch developers have jailbreak in order to develop more?
I just don't understand it, but as far as I know there are some special plugs in the internal Kindle Touch, so probably that is the port to connect to a Linux systems and change the system codes. Actually I tried the code in the above code but it doesn't work I typed it everywhere e.g. the browser, the search bar, but there is just no way to get it without Jailbreak. Have any of you tried this without the Jailbreak and succeed? I just obviously don't really like to use jailbreak because I don't like to use some special software to get into the root system, I just like to go into the system myself. It's just more fun to unlock but I don't really know how to get started. Last edited by felixwbi; 01-03-2013 at 07:26 AM. |
01-03-2013, 09:10 AM | #15 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
The "jailbreak" on a Kindle that you find on this forum is not a "special software".
It is just the addition of our (Mobileread) developer certificate for the checking of package signatures by the Kindle's native (Amazon) installer. "Getting into" the root file system requires something in addition to the Jailbreak. And yes, you can use the operator's console serial port without a "Jailbreak". It is indexed for each Kindle model in our index system. |
Tags |
html5, javascript, kindle touch |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Javascript shell for the Kindle | hjalfi | Kindle Developer's Corner | 2 | 03-17-2012 05:31 PM |
PRS-900 web browser capabilities | sammy12 | Sony Reader | 8 | 08-11-2010 01:23 PM |
Javascript support in PB302 browser ? | aruangra | PocketBook | 8 | 05-25-2010 07:11 PM |
browser capabilities | sniffingratty | Amazon Kindle | 7 | 04-24-2010 04:08 AM |
iLiad Is there an Iliad browser that supports javascript? | Maike13 | iRex Developer's Corner | 0 | 12-09-2009 01:56 PM |