Im creating an app (rather big one) with Worklight. When im testing the app in an android phone and press the backbutton it closes the app.. now i want it to go back one page. Right now the page navigation is with dojox mobile implemented system. this way:
<button data-dojo-type="dojox.mobile.ToolBarButton" data-dojo-props="transition:'fade',dir:'1',moveTo:'Contact'" class="buttonHem" style="color:black; font-size:1em;">Kontakta Oss</button>
is there a way to use the android backbutton without having to redo everything?
we have deadline in 2 weeks so there is really no time to redo the app with jquery mobile..
Answers will be appreciated.
If you're talking about a hardware Android back button you have a WL API to override it's behaviour.
WL.App.overrideBackButton(function() { doSomething });
and WL.App.resetBackButton();
The back button functionality should work in Dojo Mobile. Looking at the documentation for ToolBarButton I think what you need to do is use a # in front of your next view for the moveTo attribute. In your example it would be moveTo:'#Contact' Take a look at the moveTo attribute in the doc below for more info.
http://dojotoolkit.org/reference-guide/1.8/dojox/mobile/ToolBarButton.html
Related
I am building a Universal App using Prism framework. In my Windows Phone app, I have a scenario that I navigate from Page 1 to Page 2, and from Page 2 to Page 3. On click of the Back button on Page 3, I want to go back to Page 1.
I figured that only way I can do is by removing the previous entry from the back stack. But, unfortunately, the NavigationService provided by Prism doesn't have such a method. There is ClearHistroy, but that is not what I want.
Is there a way?
Appreciate your help.
Naweed
For the moment the current implementation of PRISM has stopped ( there is a team working on a newer version - so let's hope they extend this for Win10 ).
So you need to do this the 'old' way, get hold of the Frame in the app and remove an entry from the BackStack. You could use a PRISM event to notify the page and in the code behind of that page run
if(this.Frame.CanGoBack)
{
this.Frame.BackStack.RemoveAt(0);
}
I have managed to integrate a donate paypal button in a Cordova app:
<form action='https://www.paypal.com/cgi-bin/webscr' method='post' target='_top'>
...
</form>
All works fine except that when the button is pressed, a new window appears and completly covers the app webview making it impossible for the user to go back to the app (the only way is killing the app process), which I think is a very bad user experience.
Things that I've tried:
target='_blank': same result
target='myIFrameName': Cross-domain problem
Post the form via ajax and put result in a div: Form must be calculated on the fly error (with $http.put in ionic, haven't tried with jQuery)
Please, any solution?
The best one would be to have the paypal window inside the current webview not covering header, as I could place a back button there (something like iframe solution that could work with cross domain) but also could be with placing a link to go back in the paypal donate page. I haven't investigated deeper enought the paypal plugin at this location: https://github.com/paypal/PayPal-Cordova-Plugin. anyone knows if it could do the work? (I've already opened an issue there asking for this feature)
Why not use a inApp browser ? Cordova InAppBrowser
And call cordova.InAppBrowser.open( url, '_blank', 'location=yes'); on a button click function, or whatever suits you.
_blank = inside the app
_system = system's browser( will redirect you from app )
In iOS, one doesn't need to add a close icon for an app. In the rare event that one wants to kill an app they can do it via the OS.
When looking at the cocos2d-x project that is created by default when using the console (v3.1.1), the sample HelloWorld scene places a button on screen to "close" the app.
Is this actually required in ANY platform ? Does it make sense to add this button at all ?
Apple usually rejects on this and Google and Microsoft don't like it.
You can, however, have close buttons on menus or popovers (say, like a pause screen).
I've made a simple page as a Sign In form to test mobile devices access.
Live test is at:
http://jsbin.com/inumud/1/
outside jsbin:
http://balexandre.com/gk2
If you try to open that URL from a mobile device, there is no way one can get into the account and password forms.
I'm using a very simple form using Twitter Bootstrap (v.2.0.4) and works fine in any desktop, but why can't I access the form input's from a mobile device?
(iPhone does not get into the form, Android does not bring keyboard up)
What do I have to do more just to make it work on a mobile device without redo the hole site in a Mobile framework?
I'm keep trying and trying, but no success so far and it's been several days now, I'm probably miss-seeing something simple and I hope the community could help clear my eyes :)
found the "bugger"
it's the Modal that is on top and block access to everything else in back... adding hide to the modal class solves the problem.
In my iphone web based application i want to add backword,Forward,Refresh and Action button like the native Webview,How i implement this in my app.
Thanks,
Arun
Use what HTML gives you to draw this navigation. Or look for ready code for that.