Showing posts with label Mobile Emulators. Show all posts
Showing posts with label Mobile Emulators. Show all posts

Wednesday, May 27, 2015

jQueryMobile App using Navbars For Android and BlackBerry

In this post we describe Step by step How to create a jQueryMobile App using Navbars For Android and BlackBerry.
In this article we'll build from scratch in 20 minutes a small jQuery Mobile HTML5 App using Navbars at both  header and footer , for use on all kind of Mobile Devices  : Nexus Galaxy, BlackBerry, Acer , Nokia, iPad, iPhone, and more...
This Mobile App can be downloaded from the following GitHub repository:
https://github.com/CarmelSoftware/jQueryMobile_Navbars
This small Mobile App shows like this:
jQueryMobile App using Navbars For Android and BlackBerry

This is how it is displayed on the Ripple Mobile emulator:
jQueryMobile App using Navbars For Android and BlackBerry   1



jQueryMobile App using Navbars For Android and BlackBerry 



For this tutorial we will need the jQuery Mobile and the jQuery Frameworks, therefore go to http://jquerymobile.com/ and to  the  jQuery official web site  and copy the URLs of the latest version of the frameworks on CDN  . We  will also need a Mobile Emulator, for testing purposes, so please follow this 5 minutes tutorial on installing the Ripple Mobile Emulator.
There is a more detailed explanation on installing the frameworks and the emulator,  at this "First jQueryMobile App" Tutorial.  :

After you got the frameworks, add the references to a new HTML5 file:
jQueryMobile App using Navbars For Android and BlackBerry    2



1) Header's Navbar with Shadows and Round Corners:


Write a div to be a Page of our jQueryMobile App , and insert another <div> in it , to be its Header:

jQueryMobile App using Navbars For Android and BlackBerry   3


We use the data-role jQuery Mobile directive to define a "navbar" inside the Header.
This Navbar will hold a <ul> list which its <li> list items will contain jQuery Mobile Buttons , based on <a> hyperlinks.
Also, we add to the three buttons , Icons, shadows and round corners, using jQuery Mobile classes.
Next, if you like, add some text to the page, and some more buttons:
jQueryMobile App using Navbars For Android and BlackBerry   4




2) Footer's Navbar with Horizontal Grouping, Icons , Shadows and Round Corners:

Next, we add a Navbar to the Footer, which is a fixed footer :

jQueryMobile App using Navbars For Android and BlackBerry   5

Again, we create a <ul> list with some <a> buttons in it. They will have icons, defined with the data-icon directive.
But this time we do not add shadows nor round corners, to attain a more compact group of Navbar buttons.
The complete list of icons can be found at the  jQuery Mobile official web site.


We used the data-position "fixed" directive at the header and the footer, in order to stuck them while the user is scrolling the page.  

Now let's open our jQuery Mobile App in the Ripple emulator to check it:


jQueryMobile App using Navbars For Android

jQueryMobile App using Navbars For Android and BlackBerry
 As you can see, the Navbar at the Header has shadows and round corners, making it more appealing and good looking:
jQueryMobile App using Navbars
 The Footer Navbar that we did , contains five buttons with icons, but we refused to add shadows and round corners. However, it looks very nice either:
jQueryMobile App




For customizing this App we added some style in a CSS file as follows:


jQueryMobile App  Buttons




That's it....Hope you've enjoyed this article  ,

Happy programming.....

      by Carmel Schvartzman


כתב: כרמל שוורצמן

Wednesday, May 20, 2015

How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia iPad iPhone in 5 minutes

In this post we describe Step by step How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia iPad iPhone in 5 minutes.
In this article we install a Mobile Emulator for use on the kind of Mobile Device that you wish: Nexus Galaxy, BlackBerry, Acer , Nokia, iPad, iPhone, and more...
Ripple is multi-platform aimed to mobile HTML5 application development and testing.
This jquery Mobile Emulator looks as the following:

How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia iPad iPhone in 5 minutes

How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia iPad iPhone in 5 minutes  1

How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia iPad iPhone in 5 minutes   2


How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia iPad iPhone in 5 minutes 


You can get and run the code for the jQuery Mobile App showed above, from this GitHub rep:
https://github.com/CarmelSoftware/jQueryMobile_PaginationAndButtons

Ripple is browser agnostic. However, here we'll be installing it on Chrome.
Open the Chrome Webstore and make a search for the FREE "Ripple" Emulator:

How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia iPad iPhone in 5 minutes   3


At the moment of writing this post, there is a "Beta" version of the Ripple Emulator. But it is being tested and it responds very well. Take a look at the feedbacks: by now, more than 500 web developers have rated this beta version with 4 stars. So go ahead and install this Chrome extension 

How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia iPad iPhone in 5 minutes  4

After the installation, open some jQuery Mobile App url. The emulator will respond with this screen:


How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia iPad iPhone

This will be just the first time that you use Ripple. The emulator wants to know your preferences. You can just click on the default option ("Mobile Web").

Next, check that the "Allow access to file URLs" option is enabled in Chrome:

How to install the Ripple Mobile App Emulator for Android BlackBerry Nokia

Finally, you can test your Mobile App with plenty of different devices :


How to install the Ripple Mobile App Emulator for Android

You can choose for a "Dark" or a "Light" background also:

How to install the Ripple Mobile App Emulator





That's it.... 
Happy programming.....

      by Carmel Schvartzman


כתב: כרמל שוורצמן

Monday, May 18, 2015

How to create a jQueryMobile Popup Dialog in 10 minutes

In this article we review Step by step How to create a jQueryMobile Popup Dialog in 10 minutes.
Here we make from scratch in 10 minutes a small jQuery Mobile HTML5 App with buttons , paging , and a PopUp Dialog for use on all kinds of Mobile Devices  : Nexus Galaxy, BlackBerry, Acer , Nokia, iPad, iPhone,  ...
Here we'll build a Mobile app with two pages. When the user wants to go to the second page (a fictitious external web site) she/he will be prompted with a Popup Dialog whether is sure to abandon the site, and will be given the chose between proceeding or canceling the decision.
The complete code for this Mobile App can be get from this GitHub repository:
https://github.com/CarmelSoftware/jQueryMobile_PopUp

This small jquery Mobile App will display as the following:
How to create a jQueryMobile Popup Dialog in 10 minutes





How to create a jQueryMobile Popup Dialog in 10 minutes 



First , we need the jQuery Mobile files and the jQuery Framework, so browse to http://jquerymobile.com/ and to  the  jQuery official web site  and get the latest version of the frameworks  . Also we'll need an emulator, to see how our App will display on different Mobile devices, therefore open the Chrome Webstore and look for the FREE "Ripple" Emulator. Install it and check at the Chrome Extensions that the Emulator has full access to file URLs , and that it's enabled.
For a more detailed explanation about downloading those script frameworks and emulator, refer to this "First jQueryMobile App" Tutorial
After you get the scripts, add the following references to a new HTML5 file at the "head" element :

How to create a jQueryMobile Popup Dialog in 10 minutes    1
Next,  write a div to contain a first Page of our jQueryMobile App:

How to create a jQueryMobile Popup Dialog in 10 minutes   2

Now add a button to open the Popup Dialog as follows:

How to create a jQueryMobile Popup Dialog in 10 minutes    3

The important thing here is the data-rel="dialog" and the href reference to the Dialog page.
This is our first page, with three <div>s for a Header , Content and a Footer,  identified by the "data-role" jQueryMobile  directive, and with some style got by using the "data-theme" directive.

Now let's add a second page as follows:

How to create a jQueryMobile Popup Dialog in 10 minutes    4

We add here a button to go back to the first page:

How to create a jQueryMobile Popup Dialog in 10 minutes    5

And also some text for demonstration's sake:

How to create a jQueryMobile Popup Dialog in 10 minutes   6


Now we create the Dialog, as a page:

create a jQueryMobile Popup Dialog in 10 minutes

In the Content data-role we write the message, and add two buttons: one for cancelling with the data-rel="back" directive, and the other to go to page2:


jQueryMobile Popup Dialog in 10 minutes

Notice that the "back" rel goes back with the same transition that we apply from the previous page.

Let's see how it is displayed at the mobile emulator:
Mobile Popup Dialog in 10 minutes


Click the button to browse to the SomewhereElse page:


Popup Dialog in 10 minutes

And proceed to the next page:


Dialog in 10 minutes



That's it....Hoping you enjoyed this post ,

Happy programming with jQueryMobile.....

      by Carmel Schvartzman


כתב: כרמל שוורצמן

Monday, May 4, 2015

Simple First jQueryMobile App For Android and BlackBerry in 20 minutes

In this post we describe Step by step How to create a Simple First jQueryMobile App For Android and BlackBerry in 20 minutes.
In this article we make from scratch in 20 minutes a small jQuery Mobile HTML5 App with buttons and paging , for use on the kind of Mobile Device that you wish: Nexus Galaxy, BlackBerry, Acer , Nokia, iPad, iPhone, and more...
This jquery Mobile App will show as the following:
Simple First jQueryMobile App For Android and BlackBerry in 20 minutes
Simple First jQueryMobile App For Android and BlackBerry in 20 minutes  1



Simple First jQueryMobile App For Android and BlackBerry in 20 minutes 


The complete code for this App can be downloaded from this GitHub rep:
https://github.com/CarmelSoftware/jQueryMobile_PaginationAndButtons

First , we need the jQuery Mobile files, so browse to http://jquerymobile.com/and get the latest version of the framework  :

Simple First jQueryMobile App For Android and BlackBerry in 20 minutes    2


Simple First jQueryMobile App For Android and BlackBerry in 20 minutes   3




Since jQuery Mobile uses jQyery, do the same thing to get the jQuery Framework from the  jQuery official web site:

Simple First jQueryMobile App For Android and BlackBerry in 20 minutes   4

Simple First jQueryMobile App For Android and BlackBerry in 20 minutes   5



Next, we'll need an emulator, to see how our App will show on Mobile devices. 
So open the Chrome Webstore and search for the FREE "Ripple" Emulator:

Simple First jQueryMobile App For Android and BlackBerry in 20 minutes   6

Simple First jQueryMobile App For Android and BlackBerry

After the installation check that the Emulator has access to file URLs , and that it's enabled:
Simple First jQueryMobile App For Android and BlackBerry in 20 minutes

Open the jQueryMobile and the jQuery downloaded files and find the following .js javascript files:



First jQueryMobile App For Android and BlackBerry in 20 minutes

Copy them to a "script" folder in your project. Do the same which the "jquery.mobile-X.X.X.css" CSS file, inside a "style" folder (the "X.X.X" are for the current CSS version of the file).
Add all the references to a new HTML5 file at the "head" element :

 jQueryMobile App For Android and BlackBerry in 20 minutes
Next, let's write a div to contain the first Page of our jQueryMobile App:

Mobile App For Android and BlackBerry in 20 minutes

Take a close look at the code: there is a <div> with ID="page1" : that is our first page. Inside there are three <div>s for a Header , Content and a Footer, all of them identified by the "data-role" jQueryMobile  directive. Also, we add some style using the "data-theme" directive.

Let's try it. Open Chrome and click the Ripple button at the top-right:

App For Android and BlackBerry in 20 minutes

The HTML page will open and you can choose the kind of Mobile Device that you want: Nexus Galaxy, BlackBerry, Acer, Nokia, iPad, iPhone, and more:

Android and BlackBerry in 20 minutes

Provided everything's ok, we proceed to add a button to open a second page, as follows:

Simple First jQueryMobile App For Android and BlackBerry
The directives are as before, and we add a new one data-transition directive for the animation between pages.
Now let's append a second page as follows:

Simple First jQueryMobile App For Android

We did the same as before, but this time there are two buttons, one for the previous page and another for the next one.
Let's see how it is displayed at the mobile emulator:


Simple First jQueryMobile App

Click the button to browse to the second page:

Simple First jQueryMobile

Next, let's add a third page as follows:


Simple jQueryMobile App   BlackBerry in 20 minutes

As you see, now the button reference points to the second page. Also, we try different transitions : pop, flip, slide, slideup, slidedown, fade....Choose the one that you wish...
And finally, let's add some text to make it more realistic:


Simple  Mobile App For   BlackBerry in 20 minutes

Do the same for all pages:

Simple   jQuery  App For Android  in 20 minutes


Now let's try our Mobile App:

 App For Android and BlackBerry in 20 minutes

Simple   jQuery  App For  BlackBerry in 20 minutes

 First jQueryMobile App For Android   minutes

All three pages look fine , and the animations are attractive: Flip:

 jQueryMobile App For   BlackBerry in  minutes

 jQueryMobile SlideDown animation:
 Android and BlackBerry in 20 minutes

 Fade animation:
 BlackBerry in 20 minutes




That's it....Hoping you enjoyed this article  ,

Happy programming.....

      by Carmel Schvartzman


כתב: כרמל שוורצמן