phonegap life cycle

code