making a php app a phonegap app - php

Is there a way of making this app: www.benjaminpotter.org/myarden
which uses php, mysql, html, css, javascript and jquery into a phonegap app?
Otherwise how would you make this an ipad app?

As far as I know, phonegap can not run PHP, cause it needs a server, it can use only HTML and JS which runs on the client.
You could make an empty iPad app with a Web Container for this URL, or make the provided site an WebApp (specific meta tags for the iOS).

Related

Can PHP be used in Android app development?

I've got a book I bought online - O'Reilly's Building Android Apps with HTML, CSS and JavaScript. The idea is that you can use these 3 to create a website that can be converted to an Android app by using a Java conversion tool.
Hopefully someone will be familiar with this, and hopefully this is possible - if I have a website that is already created that also includes PHP, could this be used for the app?
I've created PHP sites before, and the one I'm specifically looking at is referencing a MySQL database, hence my need to use PHP for the app. The website is heavily based on PHP.
No you can't (Unless you created your own framework which runs a local php server inside of the device which can be accessed by a webview). Php is a server side language. Html and JavaScript are client side. These html app creation frameworks use the webview to run apps. Be careful as there are performance issues when running through webview as it is not a native app (projects like crosswalk help but still many issues). Popular frameworks include ionic (Angularjs), titanium (is mostly native but from my experience limiting), and appgyver (Angularjs).
Yes you can! If by "converting" the website to app you mean displaying the website in a chromeless view mode (without address bar).
If you wan't to use phonegap / cordova you can still use the existing PHP code as backend for the database (Maybe rewrite it into a Restful API).
If you want your app to run natively and without internet connection, then you are out of luck though.

Detect inAppBrowser in Jquery/PHP

I am using an Phonegap Application which will open webapp link inside the browser.
I need to detect whether the webapp is accessed from Mobile app or from inappbrowser in PhoneGap Application.
Much Appreciated,

Will iphone app retrieve the pages from the server or from the app itself?

I'm new to iPhone app development. I'm building app using phonegap by importing my all html css and javascript.
My doubt is if I'm using php at the backend can i make request similar to web from the iphone app. Will iPhone app retrieve the pages that is processed from the server?
PhoneGap can access web sites listed in the WhiteList and obtain responses from them, e.g. web pages.
But such an application possibly will not pass AppStore approvement, because of it can get malicious dynamic content. (This is just my personal assumption.)

PHP CodeIgniter to PhoneGap android app

I have heard about PhoneGap that can convert Web based app into a mobile app. I was wondering if PhoneGap can "convert" php codeigniter web based app into a mobile one..? I've also heard about Titanium software that does something similar... I wouldn't want to rewrite whole app to make it usable on android devices.. Any advice would be appreciated
Thanks
Phonegap just make use of web tech, such as js, css, html. It 'convert' it to mobile apps. You can interact with server side which is use php, asp, jsp or other server side script use ajax.
hopely useful: http://www.indiageeks.in/phonegap-jquery-ajax-example-jsonjavascript-object-notation-response/

I want to create a mobile website in addition to native apps using phonegap. Is it sensible to use the same codebase?

I want to have a mobile-friendly website, in addition to a native app for iphone/android using phonegap. I'm currently using PHP (specifically CodeIgniter but that's not as important) and jQuery for the mobile website.
I'm thinking that the website and the phonegap codebase can use the same PHP back-end for server requests but the front-end must be somewhat different since phonegap has proprietary javascript to access native functionality (camera, accelerometer, etc) that a browser couldn't access. For this reason, I think the front-end must be developed separately for the mobile site vs. for phonegap.
Does this make sense? Am I missing something that would allow me to use the same phonegap codebase as the mobile site?
Where I work, we developed our mobile website and Android App with the same codebase except for the views and UI. Everything on the web side is in pure JS and HTML. We have a sever side API that we request data from and then template it using Mustache.
We used Titanium for the Android App, but found that framework to have more cons than pros to use. So for the iPhone app upgrade we're using PhoneGap. It took us a few hours but the mobile site ported over exactly the way it works in browser, to the native iPhone app created by PhoneGap. In short, It's absolutely possible but you have to develop the site in JS, all the logic, to have it port over easily to PhoneGap.
Also, just a recommendation, you should try using Zepto.js instead of jQuery. It's aerogel weight, has the majority of jQuery functionality without all the IE bull and it uses the familiar $ symbol as a namespace. Much more suitable for mobile development.
Specifically, PhoneGap has plugins that you write. There's two sides to this, one JS file which will match the plugin that you write for the native Obj C or Android file. The plugins are modular, so you can plug them in for the native apps and out for the site.

Categories