I have a problem implementing Disqus in an app created with sencha touch and phonegap. The web app developed by Sencha Touch Disqus is working fine, however when I make a build through phonegap to Android or iOS, the disqus comment doesn't show.
I implement the script in a Sencha x-Panel with HTML properties.
In order for the Disqus embed to load, it must come from a valid referrer - typically this referrer when on the phone is something like the file system path.
The ideal way to handle this is to host the Disqus embed on an external page and load that into your view. You can even load this on a static cdn using this example: https://github.com/disqus/DISQUS-API-Recipes/tree/master/mobile/js
Related
3 mobile app categories exist in my understanding
Native app - built using java for android and objective-c/swift for ios
Hybrid app - built using HTML, CSS, Javascript but wrapped for each platform using Cordova (Phonegap), Iconic, etc...
HTML5 app - built entirely using HTML, CSS, Javascript and can be opened in mobile web browsers
I have the following questions:
Is a web application converted into an android app using a Webview placed in the category of a native app? Please clarify.
When you build an HTML5 app (category 3 above), you write code in HTML, CSS and Javascript but do you use a Webview or do you just access the HTML pages using a mobile browser?
Can a hybrid app be opened in a web browser in addition to accessing it as a native app?
Can one upload an HTML5 app to the app store? I understand it needs no approval. Can it even be priced?
What kind of apps are predominantly developed in companies?
Should the HTML, CSS code be made responsive before it can be used in Cordova? If no, can Bootstrap be used before using it in Cordova?
Thank you for your help in advance!
Is a web application converted into an android app using a Webview placed in the category of a native app? Please clarify.
This is probably more in the second category - you download the app from the app store and it exists as a real app on your phone, but it just displays a webpage. It's similar to Phonegap or Cordova, but less evolved.
When you build an HTML5 app (category 3 above), you write code in HTML, CSS and Javascript but do you use a Webview or do you just access the HTML pages using a mobile browser?
You just access it normally in a web browser, and it's coded exactly like you would code your desktop website.
Can a hybrid app be opened in a web browser in addition to accessing it as a native app?
No, a hybrid app is really an app - you must launch it on your phone like you would launch any other app.
Can one upload an HTML5 app to the app store? I understand it needs no approval. Can it even be priced?
If by HTML5 app you mean something not made with Cordova or contained in a Webview, then no, it can't be submitted to the app store, since it's only a website. If it is wrapped in Cordova or even in a simple Webview, it can be uploaded normally to the app store and even be priced, as it's an app like any other one.
What kind of apps are predominantly developed in companies?
Most companies want to build native apps since the look and feel is much better. Some companies will settle for the second category because it's cheaper, and some other, like a local business, will just make sure their website looks good on mobile (third category) since an app would be overkill.
Should the HTML, CSS code be made responsive before it can be used in Cordova? If no, can Bootstrap be used before using it in Cordova?
If you want to use the same code in Cordova, you should design your HTML and CSS to be responsive - making a website responsive later takes longer and is harder than just coding mobile-first from the start. bootstrap, like you mentioned, is a good starting point.
I'm building a smartphone app with cordova. My goal is to display a remote web page within the app, providing an additional footer that allows the user to switch between the web page and other content (e.g. configuration).
Unfortunately iframes aren't an option because of https and different behavior on the platforms. Using InAppBrowser doesn't let me display the footer (see https://issues.apache.org/jira/browse/CB-3397).
The only possibility I see, is to build a completely native app for each platform and embed the webview by hand. Is there an alternative way using cordova or another cross-platform framework?
ChildBrowser will do the wonder.
https://github.com/alunny/ChildBrowser
We have a responsive web application for desktop users and it is working fine. My organization also has native android app. Now, the requirement is to integrate responsive web app with native android app (using webview). Same time, we are looking to access some native features of device like capture photo from web application.
We suggested to use phonegap but don't know how we can integrate phonegap javascript api with existing web application without creating phonegap/corodova application. Idea is that, user just hit the native app button and on listener it will invoke webview with webapp url. By checking user agent we will be able to load phonegap JS api and it will be able to access native features.
Issue is that, Don't know whether it is possible or not, if yes then how we can enable phonegap api in existing web app. Desktop and mobile user will get same experience.
Use WebView component of phonegap in your application, read documentation
http://docs.phonegap.com/en/3.5.0/guide_platforms_android_webview.md.html#Android%20WebViews
I am making a Hybrid Application using cordova-cli. My requirement is that the first page in my application must redirect to a website. The entire data required for the application will be loaded into this website from some other data-sources.
The requirement is to access device native features such as camera, accelerometer etc. from pages on this website.
I am using
location.href="http://www.example.com";
to open the pages. I need a unified cordova.js file with all the plugins embedded into it.
Currently I am putting the individual plugins into the lib\android\plugin\android and by using the grunt -f command from grunt-cli, the cordova.js file recieved for android does not seem to produce expected results.
Can't be done I am afraid - because of the way Cordova interacts with the device.
What happens if, using a non-mobile device, you accessed the same website from elsewhere? The website will not know what on earth Cordova is.
Cordova interacts with the native code on the device, so requires this to handle the passing of JS-to-native, and vice-versa.
I gather from this page that it's possible to use the WebView framework build an Android web app that can then be run on the device without using a web browser.
My question is: is the same possible for iOS, possibly through the UIWebView object?
Notice that the link talk about:
You can make your web content available to users in two ways: in a traditional web browser and in an Android application, by including a WebView in the layout.
With this you can implement a javascript bridge and catch javascript event in android java contest.
iOS allow the same. UIWebView can catch javascript event and work with it.
The most cross platform sdk for mobile development use this feauture to realize the application in javascript and work it in a selfcontained webView.
Use this to start