No tick call when using phonegap + hammerjs + angularjs or zonejs + android - angularjs

I have an app built in angular2 that works fine in browser and when phonegap-bundled for iOS. It uses hammerjs to handle touch events like pan and pinch.
However, when I bundle it for Android, things go haywire.
*update: isolated case on github: https://github.com/daedeloth/phonegap-hammer-zone-angular-issue *
After some debugging I managed to isolate the problem to "tick" not being called as often as it should. On iOS and in browser (any browser really, even IE), during any drag action the tick method is called on even the slightest move. When bundled for android, it is only called at the end of the drag, and even then not always.
I've added a console.log in core.umd.js to monitor the tick method calls, so I'm pretty sure the problem originates here.
Anyone else noticed similar behaviour?

Related

How to get the current state of the tablet

Is there a way to get the current state of the tablet - if it is in sleep mode, in screen saver mode or if a picture is loaded - to get the name of the loaded picture for example. I didn't find anything in ALTabletService API, but judging on ALTabletService::resetTablet() - Reset the tablet as if no one used it before, i.e. clean the stack of activities, the web browser content, and the web browser cache. there is a stack of tablet activities and perhaps there is what I am looking for.
I don't think you can actually do that. You have to assume it's doing the right thing. If you need to check if your webview is loaded properly, why not raising an Event every 15s from the javascript and subscribe to it from Python? then as soon as Python does not receive this event for 15s, it can reload the page !

How can I call Waze App from codename in IOS devices

I wrote a CodeNameOne Mobile App that launches "Waze App" and starts a visual navigation that helps our users (health professionals) reach at houses of their respective patients.
This App works fine in Android devices.
I simply call "Display.getInstance().execute(url)" method and all done. (Great!!!).
But , in iOS devices, this feature doesn't work.
I expected the same code should work on all platforms.
For iOS devices do I need to do some specific code or configuration?
Any help will be appreciated.
Thanks
I suggest trying this URL:
waze://?q=123%20main%20st%20San%20Jose%20California
Found it on the Waze developer website.
Display.execute should work if you want to explicitly invoke Waze but you should probably use canExecute to make sure it's available (notice that canExecute returns Boolean and NOT boolean as it has 3 modes).
Assuming you just want to navigate somewhere you can just call openNativeNavigationApp.

AngularJS app is not loading on Safari (iOS 5.1.1) back button. Any suggestions?

I've ran into an issue with Safari on iOS 5.1.1 and Angular where I am doing paginated results. After I decide to leave the page that is hosting the app, and then come back to the page by using the browser's history back button.
The application is not initialized so as I scroll again, the pagination functionality is not triggered.
Since 5.1.1 doesn't provide a web inspector, I had to rely on console.log to print events that I want to see that it's executing. On initial load, I see everything ok, but when I am back through the back button nothing fires.
My usual ways of fixing this are not working. Here are the things I've tried:
Used manual bootstrapping of Angular app
Made the page not support caching and expire the page as soon as it's rendered.
Neither of these helped, which is why I am here asking for some suggestions. Unfortunately it's not a very easy thing to replicate through a Fiddle or a hosted HTML file so I am unable to provide one. Hoping that some of you may have experienced this before.
Thanks in advance for any help.
Answer is quite late and I hope you found a solution already but it might be useful for others.
Unfortunately I won't be able to answer why the app is not initialized (due to the lack of code) but I can give you some tools/tips to ease the debugging (assuming you have the iOS simulator).
Debuging on mobile safari can be done either :
with weinre and get the features of the web concole,
or by enabling remote debugging in Mobile Safari itself, see here
Yea, same problem here with iOS 7. It must send the DOM structure over before running any javascript. Kinda pointless...
Since the problem is with mobile safari and since it supports popstate event, you can use this event to detect when the user is back in combination with $location.path(), for example:
$(window).bind("popstate", function () {
alert(location.pathname + $location.path());
});

Sencha touch - Launch not invoked

I'm developing an app with Sencha Touch and i'm using phonegap to wrap it into native app and to use native APIs.
My app was working great, but suddenly after some hours changing some things, I built it to test it on my tablet. But it does not launch (it only shows the loading indicator), in spite of launching perfectly on desktop browser.
I've put some alert() in my code and I discovered that the launch function on app.js is not being invoked...
My index.html is being executed perfectly.
Everything was working great but now I dont know whats happening...
Can anybody save me?

Is it possible to catch F5 in a Silverlight application

I have a feature request to catch the F5 key and refresh content within a Silverlight application instead of having the browser refresh the entire application. In a simple app, I tried hooking the KeyDown event and it never gets there with F5.
Is this something that is possible to do in Silverlight?
The browser gets all key pressed first and determines whether it will pass them to the hosted content (Silverlight) or not. AFAIK there is no way of stopping a refresh when F5 is pressed, since it will always be handled by the browser.
You may be able to use javascript to detect the keypress and pass it to SL, but I'm pretty sure that won't stop the browser from refreshing.
I found this post that shows how to do it in javascript. I tested it and it works (IE9)... unless you have the focus in the Silverlight application :-).
This SO post is similar, but doesn't have a solution yet either.
After trying that out, I agree with #Phil, that stopping the refresh probably isn't possible, at least for IE.
If the client is happy to let your code to that to their browser then perhaps you can persuade them to install the app out-of-browser where you can have much greater navigational control

Resources