Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-26-2012, 08:35 AM   #1
iPocketBook
Member
iPocketBook doesn't litteriPocketBook doesn't litter
 
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" />
does this app work for any of you? when started in the browser and/or as a 'waf' app?
iPocketBook is offline   Reply With Quote
Old 01-26-2012, 06:46 PM   #2
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677559
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.
Attached Files
File Type: txt config-schema.xml.txt (5.9 KB, 411 views)

Last edited by ixtab; 01-26-2012 at 07:24 PM. Reason: typo
ixtab is offline   Reply With Quote
Old 01-27-2012, 01:36 AM   #3
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by iPocketBook View Post
...
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" />
does this app work for any of you? when started in the browser and/or as a 'waf' app?
The drawing app is installed as part of yifanlu's launcher menu. You can run it from here:

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 01:39 AM.
geekmaster is offline   Reply With Quote
Old 01-27-2012, 07:03 AM   #4
miguelos
Enthusiast
miguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toysmiguelos shares his or her toys
 
Posts: 44
Karma: 5666
Join Date: Dec 2011
Device: K3-3G, KT SO
Quote:
Originally Posted by geekmaster View Post
The drawing app is installed as part of yifanlu's launcher menu. You can run it from here:

Home / Menu / Launcher / Launch Apps / Draw Tool
eeeee
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"
miguelos is offline   Reply With Quote
Old 01-27-2012, 07:03 AM   #5
iPocketBook
Member
iPocketBook doesn't litteriPocketBook doesn't litter
 
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...
iPocketBook is offline   Reply With Quote
Old 01-27-2012, 04:16 PM   #6
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by geekmaster View Post
The drawing app is installed as part of yifanlu's launcher menu. You can run it from here:

Home / Menu / Launcher / Launch Apps / Draw Tool
...
Hmm... I see now that the "Launch Apps" menu selection is not in the "public" version of the launcher. I have it from a early version of this launcher published in a developer thread.

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.
Attached Files
File Type: zip hiddenfeatures.zip (948 Bytes, 269 views)
geekmaster is offline   Reply With Quote
Old 01-28-2012, 12:21 AM   #7
dasmoover
Connoisseur
dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.
 
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
dasmoover is offline   Reply With Quote
Old 01-28-2012, 02:39 AM   #8
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by dasmoover View Post
Here's a beta of what I've been working on regarding homebrew hacks with the browser.

Included is link to google voice without search bar, html5 checklist and wafbrew placeholder.


http://www.gitbrew.org/~dasmoover/ki...afbrew-1.0.zip
It looks like you have a name mismatch.

/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 02:46 AM.
geekmaster is offline   Reply With Quote
Old 01-28-2012, 02:57 AM   #9
dasmoover
Connoisseur
dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.
 
Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
Yes, sorry, folder was not changed on devbox.
dasmoover is offline   Reply With Quote
Old 01-29-2012, 03:22 AM   #10
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
Posts: 312
Karma: 1028382
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*
dgatwood is offline   Reply With Quote
Old 01-29-2012, 09:10 AM   #11
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677559
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 11:28 AM.
ixtab is offline   Reply With Quote
Old 01-30-2012, 09:27 AM   #12
iPocketBook
Member
iPocketBook doesn't litteriPocketBook doesn't litter
 
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.
iPocketBook is offline   Reply With Quote
Old 02-03-2012, 05:15 PM   #13
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
Posts: 312
Karma: 1028382
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by ixtab View Post
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?
First, it's not outside the original scope of the device. They advertise it has having a web browser. This isn't some easter egg that you have to type a URL into a search bar to find. This is an actual, advertised feature, and the Kindle Touch came with that feature from day one, AFAIK. Therefore, it is within the original scope of the Kindle Touch.

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.
dgatwood is offline   Reply With Quote
Old 01-03-2013, 08:22 AM   #14
felixwbi
Junior Member
felixwbi began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2012
Device: Kindle Touch
Question

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 08:26 AM.
felixwbi is offline   Reply With Quote
Old 01-03-2013, 10:10 AM   #15
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,998
Karma: 6314536
Join Date: Feb 2012
Device: Too many.
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.
knc1 is offline   Reply With Quote
Reply

Tags
html5, javascript, kindle touch

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript shell for the Kindle hjalfi Kindle Developer's Corner 2 03-17-2012 06:31 PM
PRS-900 web browser capabilities sammy12 Sony Reader 8 08-11-2010 02:23 PM
Javascript support in PB302 browser ? aruangra PocketBook 8 05-25-2010 08:11 PM
browser capabilities sniffingratty Amazon Kindle 7 04-24-2010 05:08 AM
iLiad Is there an Iliad browser that supports javascript? Maike13 iRex Developer's Corner 0 12-09-2009 02:56 PM


All times are GMT -4. The time now is 10:04 AM.


MobileRead.com is a privately owned, operated and funded community.