I already have working iPhone & Android application. We are planning to add more features/pages and we're also planing to extend the application with PhoneGap to support multiple mobile platform.
How I can utilize PhoneGap with my existing iPhone application? Whether PhoneGap is plugable, is there any other idea otherthan rewriting the entire Application with PhoneGap?
I don't think this is possible. Your best bet is to re-write the application using PhoneGap.
You could use PhoneGap with a webView, in your existing project.
See this link.
I've never personally used phonegap, but couldnt you just add in the phonegap sdk, and just use a webview in any activities/view controllers that you add? That way you can keep all your old ones the same, but add new ones that will be the same for ios and android.
As per my knowledge, what you're asking for is not possible or at least -- not reasonable.
If I'm getting you right, you have written a native mobile applications for iOS (in ObjC) and Android (in Java) whereas Phonegap applications are HTML5-based applications embed in their own container.
These are two completely different worlds with no (useful or profitable) way of mixing them.
You can consider some tricks (with webview, as mentioned in other answers) to include new code, written in Phonegap in your existing native applications. But, there is no chance, you can reuse native code (i.e. current functionality) inside Phonegap.
The only thing, I can think of is, that you can consider proting existing applications as native plugins and using inside Phonegap. But, you will require a lot of work to change existing code to fit plugins' standards and I'm not sure, if rewriting entire application from scratch in Phonegap wouldn't be better solution, as in terms of time and money spent on this process.
Related
I wanted to get a more experienced opinion on something I recently found out. A couple of months ago I set a goal to build myself a mobile app, and the first thing I did was go to developer.android.com and begin reading documentation on how to go about doing this.
I've invested a lot of time in understanding Android Studio and how to make simple apps (and I'm just now getting the hang of it all), but I just recently read about frameworks like PhoneGap(which let web devs who know HTML,CSS, and Javascript make apps too).
Before learning Android, I taught myself web dev through the Odin Project, which taught me a fair amount of HTML, CSS, and Javascript (little iffy on this language, but I'm sure it's something I could pick up easily since I already have a bit of experience).
I'm wondering what you guys feel are the limitations of using these frameworks and whether I should switch over to them, as opposed to continuing with Android since things are beginning to click for me.
Thanks!
I have developed apps for both Android and Phonegap. Phonegap takes advantage of your web development experience and lets you build mobile apps with ease. But it's not a replacement for Android API itself. A good phonegap application requires knowledge about web development and Android API.
However if your aim is to develop an android application, and you are comfortable with web development and Android, I would advice to take Android API.
Phonegap as wonderful as it is for web developers, and startups who can't afford to have dedicated resources for Android, iOS separately, has its limitations.
Performance : Phonegap app's performance is not at par with a native
android application.
Functionality : As one would expect you can't have all the functionality support a native android application has.
Look : You could easily tell apart a phonegap application from a native one. Given phonegap renders all the content in a webview, the look of native ui elements is lost
I think you will always need access to the native API to make good apps.
At least the navigation should be native, so that your app has the look and feel that the user expects, and so that stuff like the back button get correctly handled for you.
Even if there is some plugin that does that for you in a perfect way, I believe it's beneficial to know how Android works.
In the end, frameworks like PhoneGap add a layer inside your app rather than removing one, and it's always better to understand what goes on inside your app.
So the time that you've spent learning native Android won't be lost.
However, it makes sense to use HTML/JS if you want to share code between different platforms.
I think this article from Basecamp shows a very compelling example: https://signalvnoise.com/posts/3743-hybrid-sweet-spot-native-navigation-web-content.
I want to create a Android Application.
Altough I want to use HTML5 for creating that application.
Later on I even want to get the application to multiple platforms like for Apple.
I have tried Eclipse but couldn't get it to work.
When I create a new "Project > Web > Dynamic Web Project" I can't export this into a Android Application.
PhoneGap looks interesting.
Although I'm not sure how you can create a .apk (for android) there.
Or should this work together with Eclipse?
Could anybody give me a headstart?
What Application should I use to make a HTML application?
How do I create a .apk file?
Thanks in advance.
If you really want to dive right into developing with Phonegap, you can try out Telerik's AppBuilder (http://www.telerik.com/appbuilder). The demo project uses KendoUI Mobile (which I can also recommend) is comprehensive enough for anyone. As far as I recall you can use it for free for up to 2 projects.
There is also Intel's XDK (http://xdk-software.intel.com/), which is completely free - but the simulator and deployment features aren't as far developed as Telerik AppBuilder's are.
I strongly recommend AGAINST doing it the "real way" with eclipse/xcode if you have no prior experience with developing native android/iOS apps.
Start with the following project:
http://code.google.com/p/html5webview/
This will give you a good start. You can download it and import it into eclipse.
Phonegap does create an APK.
Essentially what Phonegap does is present a WebView and a simple API for calling native methods on the respective platforms. This allows you to write the same app and deploy it on multiple platforms with minimal or no changes. The majority of what you would do in Phonegap is set up the projects to pull in the cross-platform libraries.
The major limitations come from lack of access to native UI components. As you progress in app development you may find that it's a significant limitation. I rarely build HTML5-based UIs anymore, and instead go with native apps.
There are other cross-platform frameworks out there as well. Here's an article describing some pros and cons of each:
http://www.developereconomics.com/pros-cons-top-5-cross-platform-tools/
I am an app developer and I use Xcode to develop all my apps, but seeing in today's market a lot of people now have non apple devices. So I guess I'm wondering if there's an easy way to take my code for my apple apps and convert it to android format so I can submit to both markets?
Also does Android have their own version of "iAds"?
I agree with Ben, I was in the same boat a few months ago since the only mobile development I had done was on Xcode and I was trying to find ways to convert my existing project but instead I opted to just build a new version using Android Studio. As Ben said, even if you convert the iOS app, some of the UI and design patterns are different when comparing an iOS App to an Android App (for example iOS uses tableviews and the cells can have disclosure indicators while on Android you would need to use a list view and not use a disclosure indicator since it goes against the design patterns for Android). I would suggest taking a look at the Android documentation, specifically the recommended design patterns as that will help give you an idea of how much you would need to change to make your code work for Android.
You can use your iOS app's code as a guide to your Android app since even though the language is different, the overall structure would be pretty close.
You could share some parts of your android application with iOs using j2objc which converts java to objective-c. However anything that relies on the android framework will not work (the same would apply if you found something to convert it obj-c to java).
You could use something like Phonegap or Appcelerator. You would write code in javascript, HTML, CSS and then it would create iOS and android applications for you.
However there is some things that cannot be done using these technologies. I know that to get around this appcelerator allows you to create native modules.
You will never get an app on both platforms for 'free' there is always a cost involved whether it requires more work or you loose some features on one or both the platforms.
You need to work out how complex your application is going to be and what parts could be separated into a shared module/library. You would also need to consider how you are going to visually represent your app, it would be easier to come up with some middle ground between android and iOS than it would be to create iOS visuals on android or vice-versa.
If your making a game take a look at unity
I am new to PhoneGap, and I have several questions:
I need a way to develop an application that will have iOS, Android, and other platform compatibility. In other words, I want to write 1 app and get compatibility versions for different platforms.
By reading the "Get Started" guide linked by the PhoneGap website, I found there are different procedures for different platforms. So to have compatibility versions across platforms, do I have to go one-by-one and change all of them if I make a modification to my app?
Also, what exactly is PhoneGap Build? It seems like I can avoid all that hassle mentioned previously and toss my app into the PhoneGap Build? Do I really not have to do anything besides writing the app? What if I need to make changes?
And finally, I've read that PhoneGap works with HTML, CSS, and Javascript, but not PHP. What if my app needs to contact a server? Can PhoneGap handle that?
Thank you for bearing with all these questions!
PhoneGap achieves platform compatibility by embedding a webview within your application. Therefore you can apply your knowledge in HTML, CSS, JavaScript and it additionally provides ways to interact with native features (e.g. camera, gps, ...).
With PhoneGap you write one general web app, tweak parts for the specific platform (sometimes you do not have to this at all) and build it for that platform. The latter can be handled with PhoneGap Build service: It takes your webapp and bundles it for the mobile operating systems out there (Embeds it within a Java app on Android, an Objective-C app on iOs)
PhoneGap is able to communicate with a server hosting a PHP script just as every other web application. Trying to dynamically load resources from remote sites can be quite a hassle but this is another question.
traumalles is correct. All your HTML/Javascript/CSS is running from within a webview on the device. Your code is, therefore, all "client-side." You can communicate with a server just like with any other page. When they say PhoneGap isn't compatible with PHP, they mean only that PhoneGap can't execute PHP code like it's a server, because it's not. It's just loading your webapp in, basically, a browser.
One other important question is what exactly do you mean with "other platforms" phonegap does provide many functionality for nearly every platform but the different webbrowser of the mobile devices have their problems and limitations.
For example are there many problems if you want to provide your application on a WindowsPhone Device because the Webbrowser has a few limitations which will cause your app to not look and behave like a native app.
Just look a bit through the phonegap API you will see that some functions are just available for IOS or for Android and there are a few only Blackberry methods and so on.
So you really have to be careful when a framework tells you it will work on all devices.
So i really don't have a problem with phonegap i worked with it very great but there will be limitations you have to deal with.
If you primarily want to develop for IOS and Android you can really achieve great native like results !
For an look and feel of IOS or Android app we have to write the native plugins.
For example, if i developed an application in IOS and i have to port that to Android say i have used 6 plugins(calender,air print,Email composer,photo editing,facebook,twitter ). Then probably i have to develop that plugins in android also.
.
Apart from this, if we have to create custom plugin, it is also time consuming.
Now my question is that if we are developing simple listing application from website then phonegap is very useful since there is no need for changing any of the code.There Phonegap is cross platform .
Also when the project is heavy (more activities sorry more pages), can phonegap cause performance issues due to multiple ajax request and javascript loading?
So my question is that is phonegap reliable for an heavy and more plugins needed app?
You can only use html and javascript for programming. So there is no chance to use ios user controls in android.