attempt to add phonegap funtionality
Fixed phonegap integration