My Workflow for Developing PhoneGap Applications

Andrew Trice wrote; I am asked all the time “How do I get started developing PhoneGap applications?”. My normal answer is to advise people to check out the PhoneGap Getting Started Guides, which provide a great starting point for every platform. However after further thought, I’m not sure this is always what people are asking. Rather than “how do I get started?”, I think people are often looking for insight into the workflow for developing PhoneGap applications. Everything from tools to developer flow, to getting the app on devices. The Getting Started Guides are essential for setting up the initial project structure, but once you get that setup, you might be wondering “what do I do next?”. In this post, I’ll try to shed some light on the workflow and tools that I use when developing PhoneGap applications.

via  ANDREW TRICE.

How to Get the Device’s Phone Number Using PhoneGap Android

I was a bit surprised when three people asked me how to do this in one day. I figured if there was enough interest in it then maybe it deserved a post of it’s own. Basically you want to know the primary phone number of the device your app is running on. In order to do that in PhoneGap you will need to write a plugin to access the TelephonyManager service on Android.

As always the code for this plugin is is GitHub at myTelephoneNumberPlugin repo. If you’d rather have a more detailed walk through please read on.
First up let’s code our JavaScript interface which we will use to get the telephone number. We’ll setup a new interface at”cordova/plugin/telephonenumber” to avoid name collisions. Then the rest is fairly boiler plate code where we declare and error object that we won’t even use and finally provide a get method. When you call the get method you should provide a success callback. The success callback will be invoked with a string that will contain the devices phone number. If something goes wrong the failure callback will be invoked.

Full source at Simon Mac Donald

MadComponents AMF Service Test Drive for Mobile

Daniel Freeman writes; In this final MadComponents tutorial we’re going to look at the third and final Flash Builder 4.5 tutorial (from here), and do it the MadComponents way.  Adobe’s Flex Test Drive for Mobile: Build a mobile application in an hour, takes you through building an AMF web service, and then building a mobile client application that connects to that service.  We’re going to build the same application using MadComponents.

AMF is a binary format used to serialise ActionScript objects.  A binary AMF packet is usually significantly smaller than REST XML or SOAP packet.  Hence AMF services are typically much faster.

This tutorial assumes that you have some expertise in building web services, using PHP, Coldfusion, or Java.  But if you’d rather do a tutorial where the web service already exists, then have a go at building a twitter client.

We recommend that you first take a look at the first six parts of this tutorial series, which will bring you up-to-speed with using MadComponents.

Read the entire tutorial at  MadComponents AMF Service Test Drive for Mobile « MobileAppDev.

Flex mobile in the browser

Flex mobile in the browserSince Flex 4.5, you have had the ability to develop and export your projects as Android, iOS and PlayBook mobile applications that behave as native ones.

You can also export your Flex mobile project as AIR desktop apps. Just open Flash builder, open your project and choose Project >  Export release build. You can then export a “Signed AIR package for installation on desktop”, which means a classic .air file. Yesterday, a customer wanted to know how to run a Flex mobile application in a desktop web browser. Of course, I answered “Why would you do this ?”, and he gave me some good reasons.

His mobile application is connected to a CMS on the backend. Administrators of the application will be able to edit the content of the mobiles apps in a web application. Wouldn’t it be nice to get a live preview in the browser ? When you think of it, a Flex mobile project exports a SWF, so we should be able to run it as a web app. Of course, all the AIR APIs such as the accelerometer, or the SQLite access would be disabled, but we could have a live preview.

And it’s always a challenge for a mobile developer to demonstrate their work. Usually, they just record and publish a video of their app.

We’ll see in this tutorial how to create a Flex mobile project with Flash Builder 4.5.1, and how to publish it as a classic web application. Just follow these steps:

via Flex mobile in the browser | RIAgora.