Does The Famo.us web platform support phonegap? [closed] - android

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I would like to integrate notifications and bluetooth via phonegap to my web app built with famo.us. Is it possible?

Famo.us includes the Famo.us Toolbar which itself is a mod of Cordova (similar to Phonegap) and includes all of the plugins Cordova supports. It's driven from the command line.
I've emailed the CEO of Famo.us and his response was:
We are alpha testing the Famo.us Wrapper now. It's a mod of Cordova
with all of the plugins from Cordova. The difference is that it's
much more performant, especially on Android, than PhoneGap or Cordova.

To achieve better performance than the standard Android webview, you could try to wrap your application with the Crosswalk runtime, it works with famo.us:
download the Crosswalk archive, e.g. https://download.01.org/crosswalk/releases/crosswalk/android/stable/5.34.104.5/crosswalk-5.34.104.5.zip
unpack the downloaded archive
from the unpacked crosswalk folder, run ./make_apk.py --name="Your App" --package="com.example.app" --app-root=/your/app/root/folder --app-local-path=index.html
This will produce an .apk that you can install to the device.
More information: https://crosswalk-project.org

Yes,
Famo.us DOES support phoneGap. It's just HTML, CSS and javascript so it can be wrapped like anything else. The main difference is that PhoneGap and Cordova use an old version of Chromium which gives it bad performance on Android, which is why Famo.us's own wrapper will be more performant.
Specially on Android.

Right now The Famous Toolbelt has not been released publicly (only to a small subset of testers) but if you've used the Yeoman Generator you can quite easily wrap the compiled code into a normal Phonegap project. The only thing you should avoid doing is directly manipulating the DOM (i.e not using Famous to modify the layout & contents)
The rest is the same as writing any other Cordova app from a Javascript perspective. Just make sure to include and initialise Cordova and your plugins correctly beforehand.

I have tested famo.us with phonegap and it works. However the performance when starting up is terrible. Some reason phonegap takes a long time to load. But after that it works just fine. Basically these are the steps:
1. Install phonegap
2. Create the project
# phonegap create helloworld
# cd helloworld
3. Build the project
Then copy the famo.us project folder into www folder
# phonegap build ios
(or android)

Related

How to combine Cordova, Crosswalk and Ionic framework

I'm trying to create a mobile application which combine the above projects and I'm not sure how should I do it.
Here are 2 options which I found:
Use https://github.com/MobileChromeApps/mobile-chrome-apps - My problem with it is that it seems that it's not production ready. (I was told that it is but I can't find any support for that).
Create a new ionic project, then add Cordova to it followed by empting the platforms/android/CordovaLib/ folder and moving into it files from Crosswalk (as explained at https://www.thepolyglotdeveloper.com/2014/10/use-crosswalk-ionic-framework-android-apps/) - This solution is quite simple but seems a little hackish for me...
Which option should I use? are there any other options?
Cheers,
---- Update ----
Ionic have incorporated the ability to combine Crosswalk in their own CLI, check it out at http://ionicframework.com/blog/crosswalk-comes-to-ionic/
Regarding Crosswalk
Crosswalk support is something that we hope will be available to vanilla cordova by default before the end of the year. You can start experimenting with this today by following the work on the cordova-android 4.0 development branch. It should be possible to add this platform (and the required plugins) directly to a new ionic project.
Chrome Apps for Mobile are cordova-cli compatible and do indeed already bundle Crosswalk by default. The primary difference with vanilla cordova is that applications must follow the Chrome Packaged App structure (have a manifest and background script), but gain the benefit of running on Desktop Chrome. See longer answer here. (I wouldn't read too much into the developer preview label.. we just like calling everything beta ;)
The current crosswalk-project.org provided cordova workflow does not use a cordova multi-platform application structure. It uses the cordova-android native app template directly. This means you will not be able to use the cordova cli, nor downstreams like cca or ionic. You will also obviously not be able to add other platforms, will have a tougher time upgrading, and managing plugins is a bit more complicated (you have to use the plugman tool directly).
There is currently no option for developing using cordova+crosswalk that is not without some tradeoff.
Regarding compatibility between Cordova, Ionic, Chrome Apps for Mobile (etc) projects
Most cordova downstream projects are "mostly" cli compatible. E.g. The cca cli (used by Chrome Apps for Mobile) supports commands like create, plugin add and platform add -- so it will work to install ionic plugins. Vice versa is also true, Chrome Api's for Mobile are developed as cordova plugins which can be added to an Ionic or cordova project using their respective cli's.
Most downstreams also use the same project directory structure (plugins/, platforms/, www/, hooks/, etc), so you can usually mix usage of the various cli's within one project to some degree.
That said, the reason cca needed a custom cli is because we do a few non standard modifications to your cordova project that aren't directly supported by vanilla cordova (yet). Ionic does the same.
I've suggested at various cordova meetups that downstream projects like Ionic, PhoneGap, and CCA, should play better together -- so your question is right on the money. We are mostly-compatible but finding out the differences is currently left as an exercise to the developer.
Using XDK HTML5 Cross platform Development IDE is probably the best way of integrating Crosswalk, Cordova and Ionic. It has built in support for Crosswalk. I have recently used it and its totally awesome. It will make our work a lot easier.
From Crosswalk site:
If you prefer to use a graphical integrated development environment (IDE), the free Intel XDK provides an alternative way to package applications for Crosswalk Android. See the Intel XDK website for more details.
This guy on youtube produced a nice, straight-forward tutorial that worked for me: https://www.youtube.com/watch?v=0I1OjJLVLMo
The results are fantastic, worth the struggle to get it working.
The guy says CrossWalk makes a big difference on anything running less than Android 4.4 (when Chromium was added).
Good luck.

Converting ios project to android using phonegap

I have created an ios app using Xcode .Now I have to make it run on android also.So I downloaded phonegap 2.0 and create an xcode project using commandLine(./create ~/Desktop/newfolder com.companyname.projectname projectname).After that I added all the required classes and storyboard file of allready created ios project to this new one(created by using Phonegap utilities).
And now I can run this project.What I want to know is ,
Is this the correct way to make my ios app cross platform?
Is there any rule that only app created using CSS html5 and
javascript can be made crossplatform using Phonegap?
If my steps are wrong do I need to create the same project using CSS html5 and javascript again for making it cross platform.
You can't achieve such functionality using PhoneGap, here is the wikipage for PhoneGap
It says that it enables software programmers to build applications for mobile devices using JavaScript, HTML5, and CSS.
PhoneGap has different builds for different architectures, so once you've written your entire app using HTML5, CSS and JavaScript you can make build for every different platform available.
If you want to port iOS project into android it is not possible but if you want to port a HTML5 application you can do it using PhoneGap.
Create a PhoneGap project for android using command-line interface. Have a look at the Cordova Command-Line Interface.
Add the CSS, Javascript, HTML, image files inside respective folders. Also, add plugins required for the application using the command-line interface.
Hope it helps you.
First off the bat, if you're looking to port an existing Objective-C based iOS project then it is not possible to do so with PhoneGap.
PhoneGap or Apache Cordova as it is known now is not the only framework that can be used to write cross platform apps. I personally think it is one of the more well supported ones (being an open platform) and yes it is based on familiar web technologies i.e. HTML + CSS + Javascript and you are limited to using only this combination but then web frameworks are good enough for most development requirements these days. This is a good place to start off with Cordova development.
Cordova 3.x.x onward has matured well as a framework and post creation of a project one can add platforms using the command line interface (CLI). This is the common structure of a Cordova project :
/hooks /merges /platforms /plugins /www config.xml
The /www folder contains the web app that you're developing, typically :
/img /css /js index.html
The /platforms folder contains the projects for the various platforms that you've requested, typically :
/android /ios
It is these folders that contain the projects that need to be imported by the IDE that you're using. Say, for Android, import the contents of the android folder as an Existing Android Code Into WorkSpace and build it normally as an Android project. That is all.
Nonetheless, it has many limitations like the lack of support for in app billing, 3D graphics etc. I would like to suggest that you consider making native apps for all platforms you intend to support.

What is the role of phonegap build in phonegap app development

Being a newbie to phonegap development I have question for which i have not been able to find the answer yet. I have developed an using Xcode and phonegap. I used the IOS simulator and my iphone as a test device. After getting the development certificate, I could install the app using Xcode on my phone to test the app. I also submitted the app to the app store via Xcode.
I obviously want to deploy my app on other platforms like the android and windows. I know I can submit the app to phonegap build and it returns me all the executable files for different platforms.
But, instead of developing the app for IOS, if I had developed the app for android, I assume that phonegap build will give me a .ipa file.
How can I submit the app developed for android using phonegap submitted to the apple store for distribution.
Thanks for your help in advance.
Great question. I think the heart of this question lies at the differences between PhoneGap and Cordova. Cordova is sometimes thought of as the Open Source version of PhoneGap, but in reality, Cordova is the Open Source core of PhoneGap.
What does this have to do with PhoneGap Build? I'm getting there. When Adobe wanted to Open Source PhoneGap, they wanted to keep the branding for a few value added features that they could monetize. The Apache foundation had them rebrand the open source version, which is now known as Cordova, and Adobe retained the rights to use PhoneGap for their value added features, one of which is PhoneGap build. The PhoneGap Build FAQ might be useful info.
But, instead of developing the app for IOS, if I had developed the app for android, I assume that phonegap build will give me a .ipa file.
Actually, no. When you're developing with XCode for iOS, XCode itself produces the .ipa based on the Cordova (PhoneGap) template project. If you were to build for Android for instance, you would produce a .apk, which is, more or less, the Android equivalent of a .ipa. If you were to develop for Windows phone, you would produce a .xap file. The one problem with you doing this yourself is that you would need to have a template project for each of the different ecosystems that you then set the configuration, and add your resources to the www folder (or equivalent). This could be tedious, and a little time consuming. To make this process a little easier for developers, in comes PhoneGap Build, designed to take care of this step for you. You give them your universal PhoneGap app, based on your HTML, CSS and JavaScript (and possibly a little money, depending on your price plan), and they return you the signed apps, ready to be submitted. Awesome!
So in reality, there is nothing in PhoneGap Build that you couldn't do yourself (given enough time and effort), but they just make it easier for you to focus on the important thing, solving your original problems, and not spending time dealing with builds.
So to answer your final question, you have two choices: Use PhoneGap build to have it generate (pretty much) everything you need for both Android and iOS (As well as others), or set up new Template Projects for each, and drop in your resources in the associated www folder, and build it yourself. Check out the PhoneGap Download and the projects for the different platforms.
If you have any questions, comment on this answer, and I'll try to update as needed.
Update 1
Yes, PhoneGap Build provides app-store ready builds (See second advantage).
Get app-store ready apps without the headache of maintaining native SDKs. We do the work for you in the cloud and your app will always be built with the most up-to-date SDK for the platform you are targeting.

Which IDE for Phonegap? Is Eclipse enough? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am about to jump into Phonegap and realize that it doesn't have an IDE of its own. I know that I could use Eclipse to create Android-centric Phonegap apps, but what about the iOS and perhaps Windows Phone and perhaps Blackberry "versions" - can Eclipse be used for all of it? What do most Phonegappers use as an IDE?
Does PhoneGap Build make it possible to do it all in Eclipse, and then throw it up to the cloud for the iOS, etc., builds?
I'm currently using intel-xdk and it's been great so far. It has the ripple emulator embedded which is great to test your app quickly.
Yes, Eclipse is more than enough to target all the platforms.
Using PhoneGap Build, you could write the entire app using any text editor - no IDE required - and upload to their service. Their service handles the compilation in all the target mobile environments for you, and then provides the final files to download for each platform.
From their FAQ:
How do I get started with PhoneGap Build?
Simply upload your web assets - a ZIP file of HTML, CSS and
JavaScript, or a single index.html file - to PhoneGap Build, point us
to your Git or SVN repository. Then we’ll undertake the compilation
and packaging for you. In minutes, you’ll receive the download URLs
for all mobile platforms.
For ease of development I'd recommend installing one of the IDEs (probably whatever matches the physical devices you have for testing or prefer). This way you get IDE assistance like Intellisense, but as I said it's not strictly required to have one.
Your alternative if you want to compile for all those platforms locally is pretty ridiculous:
iOS - install Xcode
Android/BlackBerry - install Eclipse
Windows Phone - install Visual Studio
Even if all you have is a web browser you could edit your code in its repository directly through GitHub.com's web interface, and then tell PhoneGap Build to clone the repo and build, then download the builds for each device.
It seems Visual Studio would be better for someone more familiar with that:
1) http://kencenerelli.wordpress.com/2012/08/10/extending-phonegap-for-visual-studio-to-android-devices/
Excerpt:
"PhoneGap:Build. The online service can take your HTML, CSS and JavaScript files (everything the PhoneGap templates create using Visual Studio) and compile them into apps that are ready for a vendor’s app marketplace."
2) http://anindita9.wordpress.com/tag/visual-studio-phonegap/
3) - you can use Visual Studio Lightswitch and Nomad, too:
https://www.facebook.com/vslightswitch/posts/658678164147712
https://groups.google.com/forum/#!topic/phonegap/_eNL6viCFhs
4) Also, tip on Android/Eclipse:
https://groups.google.com/forum/#!topic/phonegap/-wYLoYWwp-I
5) PhoneGap tutorials:
http://vsnomad.com/documentation/learning-phonegap.html
http://pieterderycke.wordpress.com/2012/03/26/developing-mobile-applications-with-phonegap-and-jquery-mobile/
6) PhoneGap/Cordova vs. Nomad:
http://brantleclercq.com/2012/12/15/vs-nomad-vs-phonegap-build/
UPDATE
But, for somebody more conversant/fluent with Eclipse, perhaps Aptana Studio, an open source IDE based on Eclipse but web-centric:
http://en.wikipedia.org/wiki/Aptana_Studio
I develop apps plus web-service backends (mostly in PHP). Some of my "apps" are designed to run as apps on phones/tablets and as Chrome plugins (or just webpages) on desktop/laptop systems.
I currently use JetBrains PHPStorm (buggy, and service isn't great, but it hassome cool IDE features and reasonably priced) and Eclipse together. In Eclipse, I have Aptana plus web tools platform, and of course the Android ADT plugins installed.
I've got another guy who does builds/plugins for iOS using a Mac/Xcode/etc.
We try to do as much debugging in browsers as we possibly can and just use the simulator/emulator (and devices) for testing plugins and other device-specific stuff.
We're just moving to PhoneGap 3 and are evaluating PhoneGap build as an alternative. (We're particularly interested in the debug capabilities. It's not clear how much they really add over what's already out there.)
It certainly sounds good on paper, but we'll have to see.
If you're doing plugin development, you'll need the appropriate system for development (PC or Mac) and testing.

Use of phonegap for the development of apps on several patforms

just wanted to clear a confusion concerning phonegap,
My area of interest is mainly Android and Iphone. What I really understand about phonegap is that the phonegap app is platform independant when no native libs are ysed and thus run both on iphone and android. Thus if i build an android app on eclipse using phonegap without using any native libs, will it run on iphone as well??
Nope, this is not exactly the case.
Phonegap enables you to write cross-platform code (HTML, JS, CSS), but when it comes to building, you have to compile this code to a specific environment for each OS. For example you can build the Android version using eclipse, and the iOS version using Xcode.
Hope this helps!
No, you will still need to build for iPhone as well.
You can use the same source code for all systems.

Categories

Resources