Phonegap is not ready yet.

This may sound like not true, but actually Phonegap(Cordova) is not ready yet for the prime-time. The point is something or the other will always get in your way if you try to do a little more than basic UI.
It’s a pity to see that Phonegap has reached a version number of 3.3, still feels uncomfortable to work with.
While for a basic static page navigation it may be a solution to go for, for mobile, but think twice if the UI is becoming even a little more than basic.

A simple childbrowser (inAppBrowser) is failing in the current version and I found people are finding workarounds or solutions to fix this. So the point is not that its fixable but its not dependable.
Again, from version 3.0.0 on-wards, one need to have an internet connection to start building! Well, its NPM and NodeJS, I know, but its not comfortable at all rather confusing.

The best Phonegap version as I know is 2.8.0. Its the stable of all.
If at all you are trying to develop on Phonegap, stick to this version(2.8.0) until they release a stable version again.

Happy coding.

My first Tizen store approved game

Its a pleasing experience to get something on the stores, which are more stricter or unknown. Being said that, it is exciting when something is out of the doors from those stores. It was the same feeling for me when my first Apple store approval has happened.
So the game which was written for iOS devices is modified to fit in all the platforms and released. The original “catch them all” game is ported to all the platforms with the help of OpenFL and HAXE. The name has been changed to “Catch Them All E”, “E” is for everywhere.
First, it was for the Tizen App Store and the wait. Its not much but have to wait for 3 days and finally its approved and available in the Store. Thats such a nice experience and could not have been possible without Joshua.

Well, then I did some modifications and ported it to HTML5. Though, OpenFL directly provides conversion, there are still things to consider while developing for different platforms. This version is available here.

Not too far behind, I ported it to iOS and submitted Apple store. Well it took 7 days and its on the Apple App store too.

I must say, without OpenFL and HAXE I could not have achieved all this.

Social plugin for Phonegap 2.6 and up

In my search to have the iOS 6 default social sharing plugin, I landed up at this page. While everything seems right for this plugin, I somehow faced some problems in the UX. Thought would look a little deeper into it and found that this plugin relies upon the old plugin architecture of Phonegap. It still works, but then if it does not, you know know why.
Now to implement social sharing in my project, I have done a quick round of update to the plugin. Its working in my phonegap version 2.6. And that should work on Phonegap 3 as well, as the new plugin implementation has not changed after version 2.0.
Here is the github link for the new plugin.
While currently this plugin only shares the link and the message, you have to send a third parameter as an empty string for the image parameter. I will do the code cleanup and fix as I get some time to look into it. For the time being, its ready to use in new Phonegap versions.

Happy coding :)

OpenFL is here

The NME or haxenme project is taking a mature shape. The library is now known as OpenFL, which can be assumed as the successor of NME. Actully, OpenFL does use NME behind the scenes.
So, if you are working on NME projects for sometime now, its time to shift to OpenFL.
A true cross-platform library over a true cross-platform language ie; HAXE.
The new site is up at http://www.openfl.org
The other links are as below
Download home
API documentation

The main difference one would see, by coming from NME is most of the packages are now in “flash” not the default “nme”. This is to make it consistent with flash API and at the same time, the add-on APIs are on “openfl” or in the respective packages.

Happy HAXE ing

A Record is now on Play store

Continuing with my Cordova ( Phonegap ) exploration, I pushed a new Android application to Google Play store.
splash
The application is to record audio. Start the application, press the record to start and press again to stop. You are done with recording and audio file is stored in your local file system.
The application is again a standalone application and does not require to connect to internet. So its private, secure, offline and yours.

As usual, its open-source and the source code is in github. Would love to listen back your take on the application.

Phonegap ( cordova ) and iOS longtap

This is perhaps the most significant effect of using a webview for iOS development. When working with Phonegap(cordova) which uses WebView, the user gets a longtap event as it use to on a web browser. All sort of long tap menus will come up in an application using Phonegap (ex : select, copy etc).
To suppress these unwanted menus on a native application, which uses Phonegap(Cordova), there are a number of options found throughout the internet, but the one which worked for me is a style declaration as below.

/* Disabling the default iOS bevaviour of copy-paste on long tap */
*:not(input):not(textarea) {
	-webkit-user-select: none; /* disable selection/Copy of UIWebView */
    -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */

}

Happy coding :)

My first Android application on Play store, The Address.

theAddress
This is exciting to get my first Google Play store application. Previously I worked on some Android applications, but nothing was up there in the Play Store. For me its really a different experience pushing it to the Play store. Unlike pushing to Apple App store, the Play Store push feels like no brainer.
Now, talking about the application, its a personal note taking application for an absolute necessary address. This application does not require internet connection at all. Its a pure standalone application on its own. Its private to the user.
Open up the application, fill out the form to add an address and save it. Thats all it does. Once you come back to get the address, it shows upfront the saved address. Incase you are done with the currently stored address, update the form with a new address and save it. It does not store history of your previous addresses.
Now the implementation is done with Cordova (phonegap) 2.7 , jQuery 2.0 , jQuery Mobile 1.3 , lawnchair and GASP JS(GreenSock Animation Platform for Javascript). Its completely opensource and the code can be found at Github.

Looking forward to listen from you all.

Cordova(Phonegap), jQueryMobile and making a popup

This may seem obvious to make a pop-up with jQuerymobile with its popup API, but its a little more than just calling the api.
The problem is closing the popup. When working in a single page application in jQuerymobile and phonegap, the closing of the popup will take you to different jQueryMobile pages depending upon your setup.
The solution is to make the popup ready to be open just at the current page and while closing it should not make the application go to different pages. The trick is to while initialising the popup widget, initialise it with “{history: false}”, and thats all.
Here is a popup created with jQueryMobile API.

My PopUp

Title

Save Cancel

Here is the javascript code to initialise the widget and open it.

//making a popup which will not take you back to the previous page.
$('#popupDialog').popup({history: false});//awesomeness
$('#popupDialog').popup('open');

Happy coding :)

Settings Check for Apple Push Notification

While developing an iOS application with Push Notification, there might be a time, one comes across the following error message.

- no valid 'aps-environment' entitlement string found for application

Well, that means the APN (Apple Push Notification) server is denying to register your application. This situation arises when the signing certificate for the application differs from the one you generated for Push Notification.

The fix is to select the proper certificate in the settings for the project.
codeSigningCert

Happy coding.

Cordova (Phonegap) , alert message.

This might seem, very easy task. But then while making a customisable alert message, one need to think as to how to do it. While working on Cordova(phonegap), one can easily assume and which is true is the javascript alert script.

alert("Hello!");

The javascript alert will work. Then we do not have a customisation option except for the message. The solution Cordova provides is a function with the name as alert. The syntax is as below.

navigator.notification.alert(message, alertCallback, [title], [buttonName]);

In the very basic form, where one need to have a specific title, message and button name, the code I use is

navigator.notification.alert("My message", undefined,"My Alert", "ok");

Thats the simplest kind and if one need more generic, wrap the whole thing inside one of your own custom function as example below.

function showAlertWithTitle(title,message){
	navigator.notification.alert(message, undefined,title, "ok");
}

Hope coding.