Results 1 to 6 of 6
  1.    #1  
    Hi there again,

    I'm still working on my app for Wherigo and now I wanted to make magnetic compass working in Enyo. I saw some implementations in Mojo, but this is not useful, because in Enyo, there are no event listeners.

    So I have the question, if anyone does have any idea, how to do this or just idea what way to go. Now I'm completely helpless.

    Mojo implementation:
    https://github.com/patty21/gcgogo/bl...istant.js#L100

    In Enyo docs, there is mentioned only PDK Compass and only for webOS 3.0, but I still need it in Enyo and in Pre3.

    Any ideas?
  2. #2  
    eventListener isn't a function of Mojo or of Enyo, it's a part of Javascript.

    It looks like the getCurrentPosition call of com.palm.location returns the compass heading (using gps or compass, is my guess, whichever is available) I don't see anything that pumps events into a "compass" event in javascript .. so i'm not sure if that code you pointed to even works..

    also, i had no idea that the pre3 had a compass? does it?
    Author:
    Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
    Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
    (1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
    GO OPEN WEBOS!
    People asked me for a donate link for my non-catalog work, so here you are:
  3. #3  
    Enyo supports the compass on the Pre3 using Phonegap.

    WebOS versions supported by PhoneGap - Stack Overflow
  4. #4  
    yeah, my guess is that the webkit has been hooked to send those events, because they aren't getting pumped in from Luna. Pretty easy. Actually, easier than the official HTML compass API, it looks like.
    Author:
    Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
    Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
    (1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
    GO OPEN WEBOS!
    People asked me for a donate link for my non-catalog work, so here you are:
  5.    #5  
    Thank you for your fast replies. Code I mentioned of course works. This is the reason I posted it
    Handler, as posted above, works. I had no idea, that it is part of javascript

    Subscribing works, but I really don't want it when I switch to another pane. I use

    Code:
    document.removeEventListener('compass', enyo.bind(this.$.gDetail, this.$.gDetail.compassHandler), false);
    in my onSelectView event. It is invoked but it doesn't have any effect and events are still sending to this listener.

    Any Idea, where can be problem. removeEventListener does have same parameters as addEventListener.
  6.    #6  
    I made simple app, that demonstrates this problem. I tried to remove event listener many ways, but nothing worked for me. Can someone test it for me or give me any advice?

    As Attachement, there is app IPK app and sources to test.
    Attached Files Attached Files

Similar Threads

  1. Enyo apps on all your Enyo-enabled devices
    By rsanchez1 in forum webOS Discussion Lounge
    Replies: 14
    Last Post: 12/16/2011, 01:34 AM
  2. Compass app?
    By crowning73 in forum webOS Apps & Games
    Replies: 12
    Last Post: 09/28/2010, 01:46 AM
  3. compass and FM radio
    By kkhanmd in forum General News & Discussion
    Replies: 47
    Last Post: 09/13/2010, 01:56 PM
  4. Is there a compass for the Pre?
    By Finally Pre in forum Palm Pre and Pre Plus
    Replies: 14
    Last Post: 11/12/2009, 09:06 PM
  5. Compass
    By n0m0n in forum Palm OS Devices & Apps
    Replies: 6
    Last Post: 03/27/2007, 12:42 PM

Posting Permissions