Now we have to download the javascript that we have used in the program,so go to jquerymobile.com you will be navigated to the following window :

Select the required minified version of javascript and you will get the code as shown below :

Now press ctrl + u and you will get the view-source code of it .

Now select all the view-source code copy and paste it in a text file say jquery.mobile-1.3.2.min.js .

10. Now in your ReadDirectory folder create new folder called as js and save this jquery.mobile-1.3.2.min.js file in it.

Similarly create another file say jquery-1.10.2.min.js and download the code for it and paste this file in js folder .

Thus now in js folder you will be having your two files as shown below :

Similarly create a css folder in your ReadDirectory folder and download the css code for the required version and copy and paste the code in the file and save it with css extension as shown below :

Thus in your ReadDirectory folder you will have following contents :

Now to push your application on github follow the given steps .

Hence after writing the code save your document and now sign in into your Github account by visiting github.com :

So now enter a username ,your email id and password in the respective tabs and click on the Sign up for GitHub button .

After you click on the signup button you will get the following window :

Now click on the ‘+’ icon on the right hand side as indicated by the red arrow and then click on the “ New repository ” as indicated by the blue arrow .

After clicking on the New repository you will be navigated to the next window ,specify a Repository name ,select a public radio button and click on the Create repository button as shown in the image below :

So after clicking on the Create repository button you have the following window :

Go to xampp -> htdocs .

In htdocs you have your ReadDirectory folder created .

Now go to your start menu -> GitBash -> right click on it -> Send To -> Desktop (create a shortcut) of GitBash on Desktop as shown below :

So now on Desktop you will have a GitBash icon .

Now Right Click on the GitBash icon on the desktop and go to properties and in the Start in edit box set the path as : c:xampphtdocs as shown in the image.

Now Click on Apply and OK button .

Now start the GitBash application from the desktop and you will have the following screen :

Now insert the following command as shown below in the gitbash command prompt window..

Gitbash cmd

XHTML

1

2

3

ls

cdReadDirectory(thatisyourfoldernameinhtdocsfolder)

ls

Thus after inserting the commands you will have the following view of your window :

After you get this , insert further commands in the same command prompt window as given below :

XHTML

1

2

3

4

5

gitconfig--globaluser.name“usernameofyourgithubaccount”

gitconfig--globaluser.email“emailofyourgithubaccount”

gitconfig--list

After inserting this command your gitbash command prompt window will have the following look , check whether your username and email you entered has been generated in the list :

After this insert the following commands :

XHTML

1

2

3

4

5

6

7

gitinit

ls–a

gitadd.

gitcommit–am‘initialcommit’

You will have the following window :

Now go to your github account where you had created the ReadDirectory repository and copy the add origin command and push command and paste it in the gitbash command prompt respectively.

So after adding the commands you will be asked for your github username and password ,so you will have the following window :

Thus now the push operation is complete, so now we are ready to build our application .

Now go to www.build.phonegap.com and click on Sign in tab present at the right.

After clicking on the Sign in button you will get the next page where you have to click on the Sign in with GitHub button as shown by the arrow head ..

After that you will be navigated to the next page where you have to click on the new app button as shown by the red arrow head.

After clicking on the new app button ,you will get the following window where you have to select the open-source tab and click on the dropdown pointer and select your app as shown in the image :

NOTE : Here you will have your own application name that is the name given by you while creating the repository.

When you select your app the fetching process will start as shown in the figure :

After the fetching is complete you will get the following window :

Now click on the Ready to Build button as shown by the red arrow in the image and you will get the following screen :

Click on the android icon and you will have the following window popping up to save the apk file.

Now save your apk file and insert it in your android mobile phone and install it ,you will have the application running on your mobile phone

Thus we have successfully learnt how to read directory from sdcard in phonegap .

1 COMMENT

You actually make it seem so easy with your presentation but I find this topic to be actually something which I think I would never
understand. It seems too complicated and extremely broad for
me. I am looking forward for your next post, I willl try to get the hang of
it!