[FIXED] phone gap simple application


I am new to Android and Phonegap.

I want to make a very simple application in Phonegap, in which in one page allows a user to enter their name in a text box, after pressing submit button the application should print the name on screen.

This print function must be in a second activity, which means I want to use value of that name which is entered by this user into another activity.


Your Question is not very specific, but still since you have decided to use phonegap
you can use jquery and html ( assume you know ).

1.) create a html file in your asserts and name it eg : index.html

2.) now you should load this html when the app starts , inside your oncreate method
in the main java file call this html.

public void onCreate(Bundle savedInstanceState) {

3.) Now this html page will load when the app starts. You can simply use jquery and html.
Create a form and get the name. Store it inside a variable using jquery , you can either display it in a separate page or you can use jquery append to simply append the value display the name inside a div.

Since your value (name) is stored in a variable you can use it for your second activity

I am not sure what you meant by printing the name. If you want to print the value you can take a look at print

These are some of the few examples you can take a look as reference onsubmit

This winki has several useful code snippets and tutorials.I would suggest you
to do some self learning about HTML Jquery and Javascript and then read the
this winki documentations. Once you read this create a simple application
like the HELLO WORLD go get a hang of how the applications are created using
phonegap. This link will help you get started Click here. Then from there you
can go one making sophisticated applications.

This has a complete set of documentation available Link. Go through this cover to cover and read everything.

This is another Example

Answered By – yesh

Answer Checked By – Mildred Charles (FixeMe Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *