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 04-09-2013, 01:39 PM   #1
PaulFreund
*
PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.
 
PaulFreund's Avatar
 
Posts: 32
Karma: 145852
Join Date: Apr 2013
Device: Kindle Touch
Catching system events from mesqute

EDIT:

This code is now included in pillowHelper and should not be used without removing the callback default_status_bar before closing!

Old Statement:

This code ueses the pillowHelper library to communicate with the pillow app default_status_bar. It enables you to receive system events as a message. I'm pretty sure it is able to catch DBUS events, see description why.


PHP Code:
    // Get system events from Mesquite. I am pretty sure these are actually DBUS events!
    // For example I can subscribe to org.freedesktop.DBus - NameOwnerChanged
    // runAsPillow in pillowHelper.js which is located here at: 
    // http://www.mobileread.com/forums/showthread.php?p=2476587#post2476587

    // Hook callback
    
kindle.messaging.receiveMessage('persistantCallback', function(messagevalue
    {
        
document.write(value);
    });

    
// Hooking into statusBar event list - Method 1
    
runAsPillow(
        
'default_status_bar',
        
'com.PaulFreund.WebLaunch',
        function()
        {
            
// Create a persistant callback
            
document.body.persistantCallback = function(a
            {
                
// Call the default eventCallback as it will be overwriten
                
StatusBar.eventsCallback(a);
                
                
// Notify myself about the data
                
nativeBridge.setLipcProperty(
                    
'com.PaulFreund.WebLaunch',
                    
'persistantCallback'
                    
JSON.stringify(a)
                );
            };
                
            
// Subscribe to additional events
            
nativeBridge.subscribeToEvent('com.lab126.powerd''testMsg');
                
            
// Overwrite the default eventHandler callback
            
nativeBridge.registerEventsWatchCallback(document.body.persistantCallback);
        }
    );

    
// Hooking into statusBar event list - Method 2
    // Method 2 is building upon the SubscribedEvents object and its
    // SubscribedEvents.sources array of handlers, but it would require
    // more function proxying if the desired messages already have a handler
    // for more information see: 
    // /usr/share/webkit-1.0/pillow/javascripts/default_status_bar.js 
PS: I think we should rename the WAF tag in the board to Mesquite

Last edited by PaulFreund; 04-09-2013 at 03:27 PM. Reason: Added reference to implementation in pillowHelper
PaulFreund is offline   Reply With Quote
Old 04-09-2013, 05:08 PM   #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,491
Karma: 5977000
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
PS: I think we should rename the WAF tag in the board to Mesquite

Hmm... But the old ones ARE Wafs.... Perhaps a NEW Tag?

Would that do?
twobob is offline   Reply With Quote
Old 04-09-2013, 05:13 PM   #3
PaulFreund
*
PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.
 
PaulFreund's Avatar
 
Posts: 32
Karma: 145852
Join Date: Apr 2013
Device: Kindle Touch
Quote:
Originally Posted by twobob View Post
PS: I think we should rename the WAF tag in the board to Mesquite

Hmm... But the old ones ARE Wafs.... Perhaps a NEW Tag?

Would that do?
I sometimes forget that vendors don't upgrade their old devices, of course a new tag would be awesome
PaulFreund is offline   Reply With Quote
Old 04-09-2013, 05:15 PM   #4
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,491
Karma: 5977000
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 have requested the works be undertaken in due course.

I'll happily amend your tags to the correct ones at that time.
twobob is offline   Reply With Quote
Old 04-09-2013, 05:22 PM   #5
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: 704
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Mesquite subsystem is essentially the same old WAF. No changes except renaming. Furthermore, WAF is a general term for Web Application Formats, covering W3C Widgets specification, and Kindle's WAF/Mesquite application is the simple plain W3C widget. So new tag isn't required, IMHO.
eureka is offline   Reply With Quote
Old 04-09-2013, 05:38 PM   #6
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,491
Karma: 5977000
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
Right... But one type references a different set of named instances in the sqlite database.

The WAF ones don't work on the later models and vice versa.

So technical ideals aside, any thoughts on that practical aspect of "It Don't Work on My Device!"... This is more what I was attempting to outline with the new tag.
twobob is offline   Reply With Quote
Old 04-09-2013, 05:38 PM   #7
PaulFreund
*
PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.PaulFreund understands the importance of being earnest.
 
PaulFreund's Avatar
 
Posts: 32
Karma: 145852
Join Date: Apr 2013
Device: Kindle Touch
Quote:
Originally Posted by eureka View Post
Mesquite subsystem is essentially the same old WAF. No changes except renaming. Furthermore, WAF is a general term for Web Application Formats, covering W3C Widgets specification, and Kindle's WAF/Mesquite application is the simple plain W3C widget. So new tag isn't required, IMHO.
Unfortunately the term WAF is not very wide-spread and as it seems the W3C stopped using it too (old workgroup closed, new one is called WebApps Working Group). Also when there is no reference to WAF on the Kindle ( and old Kindles will die out over the years ) so nobody will know what the term means.
PaulFreund is offline   Reply With Quote
Old 04-09-2013, 05:42 PM   #8
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,491
Karma: 5977000
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
For my money WAF says "Older models supporting WAF naming convention" and MESQUITE says "Newer models supporting MESQUITE naming convention".

The average user won't care that they are the "same" if one doesn't work on the other.

I am taking this from an application end-user viewpoint obviously.
We are already lumbered with a pile of older apps that "Don't Work" for the sake of a simple naming convention alteration...

resisting urge to Amazon bash...

Last edited by twobob; 04-09-2013 at 05:44 PM.
twobob is offline   Reply With Quote
Reply

Tags
mesquite system events

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Oops 2.....must be catching.... carpetmojo News 1 10-18-2011 12:25 PM
Maybe Australia is catching up ? :p kennyc News 39 01-01-2011 05:23 AM
how to clean more disk space in root file system to upgrade system chinaet iRex 1 12-18-2006 03:54 PM


All times are GMT -4. The time now is 09:14 PM.


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