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 11-03-2012, 08:26 PM   #1
dos1
20% cooler.
dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.
 
dos1's Avatar
 
Posts: 93
Karma: 364674
Join Date: Oct 2012
Location: Poznań, Poland
Device: Kindle Paperwhite 1
Question WAF on Paperwhite

I wanted to play with it, but I can't seem to find anything here related to WAF apps on Paperwhite.

wafapp is gone. But don't worry - it's there, just under different name. It now lives as "mesquite", and WAF apps like browser, store, adviewer etc. are located in /var/local/mesquite

Old instructions for getting your own WAF apps running are still working, they just need wafapp->mesquite name adjusting.

But there is one thing I can't manage to do - specifying content path of app. It looks like mesquite always looks for index.html and ignores <content src="" /> tag in config.xml. I guess that schema has been changed and does not reflect anymore what is available here: https://www.mobileread.com/forums/showpost.php?p=1941579

Could someone with proper RE knowledge investigate if this is the case?
dos1 is offline   Reply With Quote
Old 11-04-2012, 05:36 AM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by dos1 View Post
I wanted to play with it, but I can't seem to find anything here related to WAF apps on Paperwhite.

wafapp is gone. But don't worry - it's there, just under different name. It now lives as "mesquite", and WAF apps like browser, store, adviewer etc. are located in /var/local/mesquite

Old instructions for getting your own WAF apps running are still working, they just need wafapp->mesquite name adjusting.

But there is one thing I can't manage to do - specifying content path of app. It looks like mesquite always looks for index.html and ignores <content src="" /> tag in config.xml. I guess that schema has been changed and does not reflect anymore what is available here: https://www.mobileread.com/forums/showpost.php?p=1941579

Could someone with proper RE knowledge investigate if this is the case?
There isn't anything here on that yet, AFAIK this is the first.

Glad it is still there. When I get my hands on a PW I will happily have a dig. That may be a little while though. Nice find mate!!
twobob is offline   Reply With Quote
Old 11-05-2012, 11:49 AM   #3
dos1
20% cooler.
dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.dos1 ought to be getting tired of karma fortunes by now.
 
dos1's Avatar
 
Posts: 93
Karma: 364674
Join Date: Oct 2012
Location: Poznań, Poland
Device: Kindle Paperwhite 1
Quote:
Originally Posted by twobob View Post
There isn't anything here on that yet, AFAIK this is the first.

Glad it is still there. When I get my hands on a PW I will happily have a dig. That may be a little while though. Nice find mate!!
I haven't done any RE, but for me it looks like the ability to launch remote apps is removed.

As far as I found it over the Internet, on Touch store app was such an web application with specified remote content URL. Now it's JavaScript based and it launches remote location within an iframe.

It's sad, as I really wanted to test that offline caching of the apps (or have I misunderstood something?)
dos1 is offline   Reply With Quote
Old 11-05-2012, 11:56 AM   #4
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by dos1 View Post
As far as I found it over the Internet, on Touch store app was such an web application with specified remote content URL. Now it's JavaScript based and it launches remote location within an iframe.
Nope. Store on KT is a local WAF application (but with using of HTML5 Application Cache).

BTW, you can download KT's mmcblk0p1 (main parition) from http://ixtab.tk/kindle-touch-images.php and look into it. Though WAF apps are located in /var/local, in fact, they are copied there by initialization procedure from somewhere at /opt (PW does the same).
eureka is offline   Reply With Quote
Old 09-18-2013, 03:54 PM   #5
thatworkshop
hub
thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.
 
thatworkshop's Avatar
 
Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
Is it just me: web browsing in Kindle Touch 5.3.7 is way slower than previous firmware, say 5.2.0! Has anyone noticed mesquite is sluggish compared to WAF?

Also, I want to show the menubar in the mesquite application, e.g.. WebLauncher. How can it be enabled?

P.S. I know about https://www.mobileread.com/forums/sho...02710#poststop

Last edited by thatworkshop; 09-18-2013 at 04:31 PM.
thatworkshop is offline   Reply With Quote
Old 09-18-2013, 05:50 PM   #6
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
You can set the visibility of the menu bar in the config.xml file of the WAF. I don't remember the exact option but it's easy to understand.
Anyway, if you just would like to use it without having it always displayed, you can tap on the black status bar (it's a bit tricky) to open it (well, in my Touch it works...).
After using it, it will be hidden again!
silver18 is offline   Reply With Quote
Old 09-18-2013, 06:37 PM   #7
thatworkshop
hub
thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.
 
thatworkshop's Avatar
 
Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
Quote:
Originally Posted by silver18 View Post
Anyway, if you just would like to use it without having it always displayed, you can tap on the black status bar (it's a bit tricky) to open it (well, in my Touch it works...).
After using it, it will be hidden again!
I see. Thanks!

Code:
hideStatusbar: false
That suffices. But, I'd like to add some options to the menu as right now in the Mesquite app that I am in (WebLaunch), menu is empty. I want it to be like the default web browser, so I can bookmark a page. Do you know a work around?

P.S. Holy crap, there are so many things in /var/local/mesquite/shared/js

Last edited by thatworkshop; 09-18-2013 at 06:55 PM.
thatworkshop is offline   Reply With Quote
Old 09-19-2013, 07:34 AM   #8
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Well, I'm not on my kindle now.
Anyway, menu can be handled either by the waf o by the system.
I can produce a piece of script to code to show how to customize the menu and the rest of the bar.
In t4d meanwhile, you can take a look at the shared folder inside /var/local.
If I recall correctly, there is a enum file with all the strings used and, somewhere, there is also the rest of the code.
Look for sendMessage...
silver18 is offline   Reply With Quote
Old 09-19-2013, 07:37 AM   #9
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I forgot to mention that I suggest to handle the menu inside the WAF even if you'll have to write the code yourself!
(But you still need to write code also if you want the kindle to handle it)
silver18 is offline   Reply With Quote
Old 09-19-2013, 08:08 AM   #10
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I think my favourite thing about WAF is the level of voodoo.
It's like the ultimate cthulhu programming environment.
twobob is offline   Reply With Quote
Old 09-19-2013, 09:45 AM   #11
thatworkshop
hub
thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.
 
thatworkshop's Avatar
 
Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
Quote:
Originally Posted by silver18 View Post
I forgot to mention that I suggest to handle the menu inside the WAF even if you'll have to write the code yourself!
(But you still need to write code also if you want the kindle to handle it)
Thanks silver18. I was looking at your Komic, wondering why you decided to use a button as menu and not the conventional menu on top!

Last edited by thatworkshop; 09-19-2013 at 09:58 AM.
thatworkshop is offline   Reply With Quote
Old 09-19-2013, 10:19 AM   #12
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I decided to use a button instead of using the stock menu button because the latter is placed in the menu bar and I don't want to display it.
Anyway, before I started to think about a complete rework of the home page (yep, I'm thinking about it), I placed some bits of code to take control of the menu bar.
It is, actually, very easy to do...just a json and a sendMessage.
I'll copy here the code asap.
Maybe, it is also possible to let the kindle handle it and have the menu filled with stock options (wifi, store...)!

What I like about WAFs is that I'm lazy and I don't want to port Komic to a kindlet!!
silver18 is offline   Reply With Quote
Old 09-22-2013, 05:08 PM   #13
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Oops, here's the code!

Place these to receive messages from searchbar and from the menu:
Code:
kindle.messaging.receiveMessage('searchBarButtonSelected', callbackFunction);
kindle.messaging.receiveMessage('systemMenuItemSelected', callbackFunction);
Use this to setup searchbar and menu (add and set any button you want for the searchbar and any item in the menu. Just replicate the structure...)
Code:
function setupChrome () {
    var json = {
        "appId": "yourAppId",            
        "searchBar": {
            "clientParams": {
                "profile": {
                    "name": "yourProfile",
                    "buttons": [
                        { 
                            "id": "buttonID",
                            "state": "buttonState",
                            "handling":"buttonHandling"
                        }
                    ]
                }
            } 
        }, 
        "systemMenu": {
            "clientParams": {
                "profile": {
                    "name": "default",
                    "items": [
                        { 
                            "id": "store",
                            "state": "hidden",
                            "handling":"system",
                            "label":"The damn store",
                            "position":0
                        },
			{ 
                            "id": "yourFirstMenuItem",
                            "state": "buttonState",
                            "handling":"buttonHandling",
	                    "label":"yourFirstMenuItem",
                            "position":1
                        },
			{ 
                            "id": "yourSecondMenuItem",
                            "state": "buttonState",
                            "handling":"buttonHandling",
                            "label":"yourSecondMenuItem",
                            "position":2
                        }
                    ],
                    "selectionMode": "none",
                    "closeOnUse": true 
                }
            } 
        } 
    };    
    kindle.messaging.sendMessage('com.lab126.pillow', 'configureChrome', json);
}
I found that the Kindle loves to show the store in menu.
So, adding it in first position and hiding it is useful...


This is the callbackFunction:
Code:
function callbackFunction (property, json){
    if ((property == 'searchBarButtonSelected') && (json == 'yourFirstSearchbarItem')){	
    }
    if ((property == 'searchBarButtonSelected') && (json == 'yourSecondSearchbarItem')){
    }
    if ((property == 'systemMenuItemSelected') && (json == 'yourFirstMenuItem')){
    }
    if ((property == 'systemMenuItemSelected') && (json == 'yourSecondMenuItem')){
    }	
}
Searchbar items can be (depending on the layout you choosed before):
Code:
buttons: {
    back: 'back',
    store: 'store',
    home: 'home',
    forward: 'forward',
    menu: 'menu',
    refresh: 'refresh',
cancel: 'cancel'
},
States can be:
Code:
buttonStates: {
    enabled: 'enabled',
    disabled: 'disabled',
    hidden: false
},
while you can choose either to handle it yourself or not:
Code:
buttonHandling: {
    system: 'system',
    notifyApp: 'notifyapp'
}
MenuItems are referenced using their Id.
silver18 is offline   Reply With Quote
Old 09-24-2013, 12:58 AM   #14
thatworkshop
hub
thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.
 
thatworkshop's Avatar
 
Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
Thanks silver18 for all this. I'm just starting with WAF programming... Which files each of the codes you posted should go into? index.html, config.xml, etc.
thatworkshop is offline   Reply With Quote
Old 09-24-2013, 06:23 PM   #15
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I think I forgot something placed in config.xml...it could be the lipc messaging part...
I'll add it asap.

BTW, the config.xml is a configuration file with everything needed by the kindle to setup the application environment.
You can place all the code in a javascript file linked with the html.
I suggest you to write your WAF with a landing page (index.html) and using content windows to show contents.
It's a PITA to rewrite everything later...
silver18 is offline   Reply With Quote
Reply

Tags
kindle, mesquite, paperwhite, waf

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/local/waf Semir Kindle Developer's Corner 0 08-25-2012 03:53 PM
WAF and select menu silver18 Kindle Developer's Corner 4 05-06-2012 12:19 PM
WAF Website aditya3098 Kindle Developer's Corner 3 03-07-2012 11:53 AM
WAF Kalc for kindle touch aditya3098 Kindle Developer's Corner 8 02-28-2012 11:10 PM


All times are GMT -4. The time now is 02:17 PM.


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