Load web page in PhoneGap app - url

I'm using PhoneGap with AngularJS framework.
I want to display a web page. I tried to use iframe but scroll isn't working.
I want to keep this page inside my app and not as a in app browser or external browser.
My app is running on iOS, Android and WP8 both.
Some help please :)
Thanks in advance

function loadWebView(pid)
{
var url = "http://dummysite.com/index.php/catalog/product/view/id/"+pid;
$("#div_load_page").html('<object data='+url+' class="webview"/>');
};
This is simple jQuery I've applied in my phonegap application which gives me the desired result. Scroll bars are visible and depend on site's responsiveness and size.
See Result.

Related

How do I display a web page in my app, in a way that it does not take the user out of the app itself?

I want to display a webpage in my app using dart. How would I do this, so that the user isn't directed out of the app but views it in a way similar to webview for android?
You can use webview plugin:
https://pub.dartlang.org/packages/flutter_webview_plugin
Or
URL luncher:
https://pub.dartlang.org/packages/url_launcher

angular link selection doesn't work on IOS safari

I'm doing a responsive app using meteor and angular, and i have a share link functionality. On desktop it is an input field on read only and the user can copy the link. On mobile I want to do display an link with tag. But on iOS safari doesn't react correctly when I long touch the link. Usually there is a menu of option that are displayed, but here just nothing happen.
my simple code : {{url}}
Thanks in advance to anybody that has an idea about this issue.
Update: I just tried wiht <a ng-href="{{url}}">{{url}}</a> on Firefox android and it work perfectly. The issue is really an iOs case
You should use ng-href={{url}} instead.
My guess is that iOS reads first the {{url}} as it is, and when angular updates it to whatever value is stored in the url variable, it does not pick up the new value.
And because the string {{url}} is not valid url, it does not know how to work with that, so it does nothing.
(I am not iOS developer, but still, you should use ng-href for this)
For long touch/press especially for mobile: Check this angular directive link

Auto refresh UIwebview issue in ios?

I have developed an app in which I load the data into webView. My webpage refresh in every 5 seconds through an ajax call. It is working fine in android. Rendering of page in android is very fast. It doesn't seem that url is reloaded in android but in iOS when page refreshing is very slow. Can anybody please tell me the solution?
Have you tried using WKWebView instead of UIWebView?
Please Refer to Is Safari on iOS 6 caching $.ajax results? link.
I think it will solve your problem if you do not allow cache data to load while refreshing UIWebView

Titanium Studio Webview not letting me interact with website

Part of an app I am working on needs to access an external website to answer a few questions.
When that is needed, I am opening a web view and the URL set to this site. The page loads fine, but there is no way to interact. The textfields cannot be edited and the buttons cannot be clicked. To make sure it was not my website (works from iOS safari fine) I pointed the web view to www.google.com and cannot click the search button there either. Basically:
var webView = Titanium.UI.createWebView({url: 'http://www.google.com'});
win.add(webView);
win.open();
Is there some trick to being able to interact with the website through a web view? At this time I cannot use a native app and web service and need to get the app working with the existing website to fill out this form.
Titanium Studio 2.1.2 and iOS6
Maybe are you putting some View (Ti.UI.View) after putting the WebView in the Window?

Titanium webview iframe doesnt seem to store cookies

I am developing an app using Appcelerators Titanium. The app consists of a webview. The webview shows i local page, iframe.html, and this iframe's src is pointed to a remote page.
However, this doesn't work out as i expected since it doesn't seem like the remote page can't store cookies when wrapped in an iframe. It works great on desktop and other devices. This seems to be an issue exclusive to iOS. I need the iframe, and i need cookies. What can i do to solve this?

Resources