Sunday, December 25, 2011

FREE AWS (Amazon Web Services)


AWS (Amazon Web Services) is introducing a free usage tier to new AWS customers get started in the cloud. New AWS customers will be able to run a free Amazon EC2 Micro Instance for a year, while also leveraging a free usage tier for Amazon S3, Amazon Elastic Block Store, Amazon Elastic Load Balancing, and AWS data transfer. AWS’s free usage tier can be used for anything you want to run in the cloud: launch new applications, test existing applications in the cloud, or simply gain hands-on experience with AWS.

know more: http://aws.amazon.com/free/

Wednesday, December 21, 2011

HTML Media Capture API

It's a example to input image file using W3C HTML Media Capture specification.

Note that not all browse have implemented this feature currently. It's a example run on Firefox for Android 9.0, running on table of HTC Flyer (Android 3.2.1). If user click on the Browse... button, it will open a file browser to select file. If capture button clicked, a camera capture dialog will be open.

HTML Media Capture API

<!DOCTYPE html>
<html>
<head>
<title>HTML5 Capture API</title>
</head>
<body>
<H1>HTML5 Capture API</H1>
<input type="file" accept="image/*" id="capture">
</body>
</html>

Head First Mobile Web


Despite the huge number of mobile devices and apps in use today, your business still needs a website. You just need it to be mobile. Head First Mobile Web walks you through the process of making a conventional website work on a variety smartphones and tablets. Put your JavaScript, CSS media query, and HTML5 skills to work—then optimize your site to perform its best in the demanding mobile market. Along the way, you’ll discover how to adapt your business strategy to target specific devices.

  • Navigate the increasingly complex mobile landscape
  • Take both technical and strategic approaches to mobile web design
  • Use the latest development techniques—including responsive web design, and server-side device detection with WURFL
  • Learn quickly through images, puzzles, stories, and quizzes




Tuesday, December 20, 2011

Create HTML5 Apps & Web Apps with the appMobi XDK

appMobi XDK(Cross Platform Development Kit) uses standard web languages (HTML5, CSS, and JavaScript) to create mobile apps for smartphones and tablets. Uniquely, you don't have to learn any new HTML tools to create apps with XDK. You can develop and test apps using Macintosh, PC, DreamWeaver, Visual Studio - whatever tools you are already comfortable using.

The XDK offers a comprehensive simulation and debugging capability far beyond any other mobile development system. Apps can be rapidly tested during development using the XDK's built-in emulator, or you can test on the actual device using WiFi and appMobi's unique AppLab testing apps. You can even email test versions of your app to colleagues or clients anywhere in the world, allowing them to test using AppLab.

appMobi XDK

appMobi web site: http://www.appmobi.com/

Monday, December 19, 2011

Footer Toolbar of jQuery Mobile

Example of using Footer Toolbar of jQuery Mobile:

Footer Toolbar of jQuery Mobile

<!DOCTYPE html>
<html>
<head>
<title>jQuery Mobile Web Page: Toolbar</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<!-- Example of Header bar -->
<div data-role="header">
<!-- Left Button -->
<a href="#home" data-icon="arrow-l">Home</a>
<!-- Title -->
<h1>Toolbar</h1>
<!-- Left Button -->
<a href="#secondpage" data-icon="arrow-r">Second</a>
</div>
<!-- End of Header bar -->

<div data-role="content">
<p>Hello jQuery Mobile Toolbar</p>
<p>it's a basic mobile web page utilize jQuery Mobile implementing Toolbar.</p>
<a href="#secondpage">Jump to Second Page</a>
</div>

<!-- Example of Footer bar -->
<div data-role="footer">
<a href="#home" data-icon="arrow-l" datarole="button">Left</a>
<a href="http://mobile-web-app.blogspot.com/" data-icon="arrow-u" data-role="button">Up</a>
<a href="#secondpage" data-icon="arrow-r" datarole="button">Right</a>
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
<!-- End of Footer bar -->

</div>

<div data-role="page" id="secondpage">
<!-- Example of Header bar -->
<div data-role="header">
<!-- Left Button -->
<a href="#home" data-icon="arrow-l">Home</a>
<!-- Title -->
<h1>Toolbar</h1>
<!-- Left Button -->
<a href="#secondpage" data-icon="arrow-r">Second</a>
</div>
<!-- End of Header bar -->

<div data-role="content">
<p>It's the SECOND PAGE</p>
<a href="#home">Back to Home Page</a>
</div>

<!-- Example of Footer bar -->
<div data-role="footer">
<a href="#home" data-icon="arrow-l" datarole="button">Left</a>
<a href="http://mobile-web-app.blogspot.com/" data-icon="arrow-u" data-role="button">Up</a>
<a href="#secondpage" data-icon="arrow-r" datarole="button">Right</a>
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
<!-- End of Footer bar -->

</div>

</body>
</html>

Sunday, December 18, 2011

Header Toolbar of jQuery Mobile

In jQuery Mobile, there are two standard types of toolbars: Headers and Footers.
  • The Header bar serves as the page title, and typically contains a page title and up to two buttons.
  • The Footer bar is usually the last element inside each mobile page, and tends to be more freeform than the header in terms of content and functionality, but typically contains a combination of text and buttons.


Example of jQuery Mobile Header bar:
Header Toolbar of jQuery Mobile

<!DOCTYPE html>
<html>
<head>
<title>jQuery Mobile Web Page: Toolbar</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<!-- Example of Toolbar -->
<!-- Left Button -->
<a href="#home" data-icon="arrow-l">Home</a>
<!-- Title -->
<h1>Toolbar</h1>
<!-- Left Button -->
<a href="#secondpage" data-icon="arrow-r">Second</a>
<!-- End of Toolbar -->
</div>
<div data-role="content">
<p>Hello jQuery Mobile Toolbar</p>
<p>it's a basic mobile web page utilize jQuery Mobile implementing Toolbar.</p>
<a href="#secondpage">Jump to Second Page</a>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

<div data-role="page" id="secondpage">
<div data-role="header">
<!-- Example of Toolbar -->
<!-- Left Button -->
<a href="#home" data-icon="arrow-l">Home</a>
<!-- Title -->
<h1>Toolbar</h1>
<!-- Left Button -->
<a href="#secondpage" data-icon="arrow-r">Second</a>
<!-- End of Toolbar -->
</div>
<div data-role="content">
<p>It's the SECOND PAGE</p>
<a href="#home">Back to Home Page</a>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

</body>
</html>



Related:
- Footer Toolbar of jQuery Mobile

Friday, December 16, 2011

Handle Slider change event

Handle Slider change event

The article "jQuery Mobile: Read value of Slider" demonstrate how to read slider value when user click on a button. It's modified to automatically detect slider change event here.

In order to detect slider change, we have to add a additional element("my-slider" in my example)surround the slider - I don't know why I can't use "slider" directly!

Then implement:
$("#my-slider").change(function() {
//...do what you want here...
});

example:
Handle Slider change event
<!DOCTYPE html>
<html>
<head>
<meta name = "viewport" content = "width = device-width, height = device-height" />
<title>jQuery Mobile: Slider</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<h1>Slider</h1>
</div>
<div data-role="content">
<p>jQuery Mobile: Slider</p>
<div data-role="fieldcontain">
<label for="slider">Slider:</label>
<div id="my-slider">
<input type="range" name="slider" id="slider" value="0" min="0" max="100" />
</div>
<input type="button" value="Read Slider" onclick="button_clicked()" />
<p id="slider_value">0</p>
</div>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

<script>
function button_clicked(){
var SliderValue = $("#slider").val();
alert("Slider value = " + SliderValue);
}

$("#my-slider").change(function() {
var SliderValue = $("#slider").val();
$("#slider_value").text("Slider changed: " + SliderValue);
});
</script>

</body>
</html>