Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By Preemptive
  1.    #1  
    Since last summer I use a little app to get informed about all goals scored in german soccer "Bundesliga". I decided to build an app without stage and use the notification area for showing the new match results and play an alert tone. There is only a stage for changing the settings of the app.

    The app is working very good for my needs. But there is one thing that is a little annoying. When I start the app there is a stage with my icon blinking shown which will never maximize. Because I don't need the stage I can wipe it out.
    On my Touchpad wiping out this stage leads to a crash (sudden Luna restart). On the emulator with and on all other devices there is no problem so I can't find out what is going wrong.

    The only workaround on the touchpad is to call my settings-stage and close it with the cancel-button which closes the stage. Then it is gone without problems.

    I think it would be best if the stage wouldn't show up while starting the app but I don't know what makes the stage starting.

    Is there an error in my app-assistant.jsjsjs $handle$-$launch$?

    function AppAssistant() { }
    AppAssistant.prototype.pauseUpdates = false;
    AppAssistant.prototype.dashboardText = "<b>Ticker wird geladen...</b>";
    AppAssistant.prototype.isOffline = false;
    AppAssistant.prototype.handleLaunch = function() {
      var activeStage = this.controller.getStageController("dashboardStage");
      if (activeStage) {
        { name : "dashboardStage", clickableWhenLocked : true }, 
        function(inStageController) {
            { name : "main", sceneTemplate : "main/main-scene" },
            { }
        }, "dashboard"
    The second problem:

    I want to tap through all running games of the matchday (or round) without unlocking my phone or touchpad. Sometimes this is working and sometimes not. So sometimes I'm tapping about 5 or 6 times on several places of the notification banner and when I find the right spot it sometimes works for most or all of the games of the matchday.
    When the device is unlocked every tap is successful. As you can see in the code above the clickableWhenLocked is set to true, but this doesn't seem to be enough for proper working.
    It seems, it's not so reliable on a locked screen like it is with the music player.
  2.    #2  
    Ok - I'm not absolutely sure yet, but maybe I found out the reason why my app isn't exactly working as expected.

    I learned how to build an app without a stage from Frank W. Zammetti's book "Practical Palm Pre webOS Projects". He explained the code with his app Twitter Montor. For comparison I installed this app on both of my devices and found out that a stage is loading too while starting the app. When wiping the stage off the screen on my TouchPad there was no crash. But I recognized that the stage which was shown on the TouchPad had the well known 320x480 px frame.

    So I deleted the uiRevision:2 out of my appinfo.json. The first tests of my app were successful now: There was no crash on my TouchPad and on the locked screen the taps seemed to be more reliable. But since not every tap was successful, it will need some more testing when german "Bundesliga" starts again in a few weeks
  3.    #3  
    Seems like I started the party too early. Though my TouchPad isn't crashing any more when wiping off the stage after starting the app it now crashes when opening the settings page a few seconds later - which is absolutely no improvement. On my TouchPad even the latest version of Twitter Monitor loaded from Preware is crashing on this way. So maybe this could be a problem for several Mojo apps without stage used on the TouchPad.

    In the meantime I noticed on my Veer that the Music-App isn't as reliable on a locked screen as I thought I would remember. If I tap sveral times on the play/pause-buttons there seem to be some missing taps, too. Sometimes it seems that you have 100% success. A few minutes later you find out that there are only 60% success (good to see if you are not always tapping on exactly the same spot and letting your device sleep some time between the tries). Yesterday evening I had almost 100% success on my app - this morning it's definitely less.

    But no matter - I'm using my app on my Veer most of the time and know what to do if it behaves a little buggy. I would have liked to get the bugs out of my app just in case someone else could use it. But maybe there is no way to get the bugs out...
  4.    #4  

    did some further testings to improve TorAlarm and hope someone can give a hint. The exact situation with the luna reboot problem is this:
    • If I start debugging my app with eclipse and emulator I see in the console that the app begins to run. On the emulator the app isn't actually running at this moment. If I tap on the app icon the app starts on the emulator without a stage (this is the way it should be) only in the notification area. The console in eclipse writes normal debug information as long as the app is running. There is no problem whatever I do. I can do this several times always with same behavior.
    • If I start the app only at the emulator (without debugging command on eclipse), then the app is starting with an empty stage and with the notification in the notification bar. If I wipe the empty stage out of the screen there is not problem yet. But if I open the settings scene by tapping the icon in the notification bar and the settings-scene is expected to open then luna makes a reboot. This is the same behavior I have on a real Touchpad.

    For me the main question seems to be: What is causing the app to start with an empty stage when I'm not in debugging mode? Why isn't the app starting completely without stage as it is while I'm debugging?
    There might be something wrong in my app settings. Maybe in the framework_config.json?
    Does anybody know, what the property timingEnabled means? I really have problems to understand the documentation about this point. Some documents refer to the point Timing ("For more information, see Timing"). But I don't find anything about this...
  5. #6  
    I have had similar experiences. I have made phones Luna restart with infinite loops before, and more recently (and I can't remember how anymore - I think I was tweaking the google sync service to debug the recent login issue, which cleared up and has been back a couple times since then) actually trashed my emulator image to the point it wouldn't start and I had to delete and reinstall it!

    I have written an app that has a dashboard scene, but it launches initially with a regular scene and only changes to the dashboard when you throw away the card. It's not quite the same, but I'd be happy to take a look at yourself if you can share the code with me.
    Last edited by Grabber5.0; 07/01/2015 at 12:20 PM.
  6. #7  
    I believe the timing thing is for measuring performance of rendering and opening scenes, if I recall correctly.
  7.    #8  
    Quote Originally Posted by Preemptive View Post
    Sorry, I tried!
    Cool. Thank you very much

    Quote Originally Posted by Grabber5.0 View Post
    I have written an app that has a dashboard scene, but it launches initially with a regular scene and only changes to the dashboard when you throw away the card. It's not quite the same, but I'd be happy to take a look at yourself if you can share the code with me.
    Of course. You can find the source code (or the ipk) as attachment on the TorAlarm-Topic. Or if you like more professional and structurized code you can take Frank Zammetti's TwitterMonitor. The behavior on the Touchpad is exact the same (not crashing while debugging and crashing when not debugging)

Similar Threads

  1. [Mojo] Problem with creating app helpers/lib
    By a-crowder in forum webOS Development
    Replies: 2
    Last Post: 01/21/2012, 10:11 PM
  2. Why can't I create a stage with an exist stage-assistant.js?
    By mayagamer in forum webOS Development
    Replies: 0
    Last Post: 12/03/2011, 03:21 PM
  3. Replies: 1
    Last Post: 08/26/2011, 01:13 AM
  4. Mojo SDK Eclipse Plugin Installation Problem
    By number1pete in forum webOS Development
    Replies: 1
    Last Post: 03/08/2010, 12:17 PM

Posting Permissions