วันจันทร์ที่ 24 ตุลาคม พ.ศ. 2554

Beginning Android Application Development Ebook



          
-->


Beginning Android Application Development EBook
 Free Ebook Download   Sample code Download   ( pass code "thailand")

Product Description
Create must-have applications for the latest Android OS
The Android OS is a popular and flexible platform for many of today's most in-demand mobile devices. This full-color guide offers you a hands-on introduction to creating Android applications for the latest mobile devices. Veteran author Wei Meng Lee accompanies each lesson with real-world examples to drive home the content he covers. Beginning with an overview of core Android features and tools, he moves at a steady pace while teaching everything you need to know to successfully develop your own Android applications.
  • Explains what an activity is and reviews its life cycle
  • Zeroes in on customizing activities by applying styles and themes
  • Looks at the components of a screen, including Linear Layout, Absolute Layout, and Relative Layout, among others
  • Details ways to adapt to different screen sizes and adjust display orientation
  • Reviews the variety of views such as Text View, Progress Bar, Time Picker, and more
Beginning Android Application Development pares down the most essential steps you need to know so you can start creating Android applications today. 

From the Back Cover
Create applications for the latest Android OS
The Android OS is a popular and flexible platform for many of today's most in-demand mobile devices. This full-color guide offers you a hands-on introduction to creating Android applications for the latest mobile devices. Veteran author Wei-Meng Lee accompanies each lesson with real-world examples to drive home the content he covers. Beginning with an overview of core Android features and tools, the author proceeds to teach everything you need to know to successfully develop your own Android applications.
Beginning Android Application Development:
  • Explains what an activity is and reviews its lifecycle
  • Zeroes in on how to customize activities by applying styles and themes
  • Looks at the components of a screen, including Linear Layout, Absolute Layout, and Relative Layout, among others
  • Details ways to adapt to different screen sizes and adjust display orientation
  • Reviews the variety of views such as TextView, Progress Bar, Time Picker, and more
  • Covers SMS messaging and networking
  • Walks you through how to create an Android Service and interact with it
  • Pares down the most essential steps for publishing Android applications
Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved.
wrox.com Programmer Forums
Join our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world.
Code Downloads
Take advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use.

Product Details

  • Paperback: 448 pages
  • Publisher: Wrox; 1 edition (April 19, 2011)
  • Language: English
  • ISBN-10: 1118017110
  • ISBN-13: 978-1118017111
  • Product Dimensions: 9 x 7.3 x 1.1 inches 

รับเขียนโปรแกรม Android Application และสอนการเขียนโปรแกรม สอน online ได้
อดุลย์ 081-6452400  e-mail fongwe_a@hotmail.com

สอนเขียนโปรแกรม Android Application สอนแบบ online ได้ทั่วประเทศ กำหนดเวลาเรียนได้
การเรียน Android Application แบบ online สามารถกำหนดเวลาเรียน เองได้ ตามแต่ตกลงกัน

Course
1.JAVA Programming สำหรับผู้ที่ยังไม่มีพื้นฐานทางด้าน การเขียนโปรแกรม JAVA
เรียน 6 ครั้ง ครั้งละ 1 ชั่วโมงครึ่ง 

2.Beginning Android Development เริ่มต้นการพัฒนาด้วย Android ( ต้องมีพื้นฐาน JAVA แล้ว )
เรียน 10 ครั้ง ครั้งละ 1 ชั่วโมงครึ่ง

3.Android Application สอนตามความต้องการในการเขียนโปรแกรม ใช้งานจริง เช่น โปรแกมเกม หรือ โปรแกรมใช้งานด้านต่างๆ
ระยะเวลา และ ค่าเรียน ตามแต่ความยากง่ายของโปรแกรม ซึ่งอาจจะรวมสอน JAVA Programming ด้วยสำหรับผู้เริ่มต้นเลย




Video ตัวอย่างการเรียน การสอน online
http://androidcontrol.blogspot.com/2011/11/introduction-to-java-programming-thai.html

more info about Android Development
http://androiddevelopersthai.blogspot.com/

วันพฤหัสบดีที่ 20 ตุลาคม พ.ศ. 2554

Android Volt Meter with IOIO Board






Android Volt Meter with IOIO Board
We can use Android phone as Digital Volt meter with IOIO Board.

We edit IOIO Sample App Source code. It has Analog to digital input code.
Testing on Samsung Spica i5700 ( Update to 2.2 )

มาทำ โวลต์มิเตอร์ ด้วย Android + IOIO Board ( โยโย่ บอร์ด )
ทดสอบกับโทรศัพท์มือถือ samsung spica i5700 ( up ROM เป็น 2.2 แล้วใช้ได้ )


Original Code
public void loop() throws ConnectionLostException {
      try {
            final float reading = input_.read();
            setText(Float.toString(reading));
           

pwmOutput_.setPulseWidth(1000 + seekBar_.getProgress());
            led_.write(!toggleButton_.isChecked());
            sleep(10);
            } catch (InterruptedException e) {
                  ioio_.disconnect();
            } catch (ConnectionLostException e) {
                  enableUi(false);
                  throw e;
            }
      }
Edit Code
public void loop() throws ConnectionLostException {
      try {
            final float reading = input_.getVoltage();                 
            float div4 = 4;
            setText(Float.toString(reading*div4));
           
                                   
            pwmOutput_.setPulseWidth(1000 + seekBar_.getProgress());
                  led_.write(!toggleButton_.isChecked());
                  sleep(10);
            } catch (InterruptedException e) {
                  ioio_.disconnect();
            } catch (ConnectionLostException e) {
                  enableUi(false);
                  throw e;
            }
      }

We change input   final float reading = input_.read();
setText(Float.toString(reading));
to                          final float reading = input_.getVoltage();           
                  float div4 = 4;
                  setText(Float.toString(reading*div4));

If you not use float div4 = 4; and setText(Float.toString(reading*div4));
You can read voltage only 3.3 V.
Then use div4 = 3.3 x 4 =  13.2 V. ( But need  voltage divider circuit )
Voltage Divider Circuit
V out = Vin/4  Then V out  connect to Pin 40 IOIO Board.

วันพุธที่ 12 ตุลาคม พ.ศ. 2554

Android control IOIO Board Testing



-->

Android control IOIO Board Testing.
IOIO Board is External Interface board to control other device with Android Mobile phone.
We use a sample code form Sparkfun.
Use LG GT540 Android phone ( platform 2.1 ) for testing. It's work fine.

We also use Wellcom A86 Mobile phone but it's not work :(
Enjoy your hobby.

ทดสอบ การควบคุม IOIO Board ด้วยโทรศัพท์มือถือ แอนดรอย

IOIO Projects

SMS to Braille Character Code with IOIO Board

Android TCP/IP Server Client control IOIO Board




วันเสาร์ที่ 8 ตุลาคม พ.ศ. 2554

IOIO Board for Android Control I/O








IOIO Board for Android Control I/O
The IOIO (yo-yo") is a board specially designed to work with your Android device (OS versions 1.5 and greater). The board provides robust connectivity to an Android device via a USB connection and is fully controllable from within an Android application using a simple and intuitive Java API - no embedded programming or external programmer will ever be needed!
So far, the devices proven to work are: G1, Nexus One, Nexus S, Motorola Droid X. If you get the IOIO working on your Android device, please let us know in the comments below, thanks!
The IOIO board contains a single MCU that acts as a USB host and interprets commands from an Android app. In addition, the IOIO can interact with peripheral devices in the same way as most MCUs. Digital Input/Output, PWM, Analog Input, I2C, SPI, and UART control can all be used with the IOIO. Code to control these interfaces is written in the same way as you write an Android app with the help of a simple to use app-level library. In other words, you can combine the awesome computing power, Internet/Bluetooth connectivity, touch screen, and a variety of sensors from your Android device with the ability to easily add peripheral devices to interact with the outside world. Also, using the IOIO does not require any hardware or software modifications to your Android device, thus preserving the warranty as well as making the functionality available to non-hackers.
If you are new to the IOIO or developing apps with Android, please use these resources to help get started:
For firmware upgrades, you can download the IOIO Manager app (see the QR code in the images to the right). See the IOIO Manager wiki for more information.
Also featured is a Programmer function, which lets you upgrade the bootloader of your IOIO using another IOIO as a programmer! See the IOIO Manager wiki for more information.

Specification Summary
  • Microcontroller PIC24FJ128DA106-I/PT (with USB OTG , USB Host Support)
  • 48 total I/O pins - all of which can function as digital inputs and outputs.
  • Up to 16 analog inputs (10-bit).
  • Up to 9 PWM outputs.
  • Up to 4 UART channels.
  • Up to 3 SPI channels.
  • Up to 3 TWI (I²C-compatible) channels.
  • On-board switch-mode regulator providing up to 1.5A of 5V supply. Can charge the Android device as well as power a couple of small motors. (Power Supply via USB cable from PC or Device)
  • Bootloader on the board pulls firmware off phone, enabling OTA firmware upgrades and application-specific firmware.
  • Pulse-width measurement, capacitance sensing and more (will be pushed with first OTA firmware upgrade).

Update: The IOIO now has beta firmware available which supports Google's Open Accessory (ADK) protocol. The code base can be found here.
Documents:
IOIO Projects

SMS to Braille Character Code with IOIO Board

Android TCP/IP Server Client control IOIO Board



วันอังคารที่ 4 ตุลาคม พ.ศ. 2554

Snake Game on Android

                        


Snake Game on Android



We have test sample android code classic game call "Snake game".
It work fine on my android mobile phone.
This code demonstrates how to create custom View layouts and request draws to the screen. A great example of a basic game that does not require a fast frame rate.

Picture by Screen capture Program on Wellcom A86 Mobile phone. ( Wellcom is Brand in Thailand )
Source code on ADT Plugin for Eclipse

เราได้ทดสอบ เกมยอดนิยม ที่เรียกว่า "เกมงู" บนมือถือแอนดรอยด์ ก็ทำงานได้ดี






วันอาทิตย์ที่ 2 ตุลาคม พ.ศ. 2554

Hello World Android Application - Edit 1


       






Hello World Android Application - Edit 1
(2 Small Picture by Screen capture Program on Wellcom A86 Mobile phone )
 
Add ICON Picture in TextView
Add Large TextView  " Thai Micro Tech "
Add Medium TextView  " By fongwe_a@hotmail.com "
Add Analog Clock
Add Digital Clock

Run on Android Platform 2.1, API 7 Android Virtual Device.

Source code example for Android Apps.
http://androidcodeexample.blogspot.com/2012/06/hello-android-first-app.html

Hello World Android Application









Hello World Android Application
My first android application is hello world program.

Use Java Development kit ( JDK 7 )

Use Eclipse Classic 3.7.1 with ADT Plugin for Eclipse

Android 2.1 platform, API 7 ( Virtual Device )

Export Package ( *.apk ) to Wellcom A86 Mobile phone work fine.

Source code for HelloAndroid

Android Development tools








Android Development Tools

If you want to develop Application on Android. You will need...


 1.JDK (Java Development Kit), which includes the JRE. ( I use Java SE 7 )











2.Eclipse with the Android Development ( I use Eclipse Classic 3.7.1 )












3.Android Development tools ADT Plugin for Eclipse
( I use


android-sdk_r13-windows.zip )





The Android Software Development Kits ( Android SDK ) is comprised of the platform, tools, sample code, and documentation
needed to develop Android applications. It is built as an add-on to the Java Development
Kit and has an integrated plugin for the Eclipse Integrated Development Environment.

Here's an overview of the steps you must follow to set up the Android SDK:
Prepare your development computer and ensure it meets the system requirements.
  1. JDK ( Java Development kit ) includes JRE
  2. Eclipse with Android Development kit ( SDK )  For SDK If you're on Windows, download the installer for help with the initial setup.
  3. ADT Plugin for Eclipse (if you'll be developing in Eclipse).


Installing and Upgrading
There are many places on the Internet that discuss detailed step-by-step instructions on how to install the Android SDK. For example, all the necessary links can be found on the Google website http://developer.android.com/sdk/.Therefore, the general procedure outlined here serves to emphasize the most common installation steps for reference.These steps should be done on a host computer used as the development environment.

1. Install the Java Development Kit (for example, install JDK 6.0 for use with
Android 2.1 or above; JDK 5.0 is the minimum version needed for any earlier version
of Android).

2. Install Eclipse Classic (for example, version 3.7.1). In the case of Windows, this just needs to be unzipped in place and is ready to use.

3. Install the Android SDK starter package (for example, version r16). In the case of
Windows, this just needs to be unzipped in place and is ready to use.

4. Start Eclipse and select Help → Install New Software..., and then type https://
dl-ssl.google.com/android/eclipse/ and install the Android DDMS and Android
Development Tools.

5. In Eclipse, select Window → Preferences... (on a Mac, select Eclipse → Preferences) and select Android. Browse to the location where the SDK was unzipped
and apply.

6. In Eclipse, select Window → Android SDK and AVD Manager → Available
Packages, and then choose the necessary APIs to install (for example, Documentation for Android SDK,API 8; SDK Platform Android 2.2,API 8; Google APIs by Google Inc.; and Android API 8).

7. From the same Android SDK and AVD Manager menu, create an Android virtual
device to run the emulator or install USB drivers to run applications on a pluggedin
phone.

8. In Eclipse, select Run →Run Configurations... and create a new run configuration
to be used with each Android application (or similar for a Debug Configuration).
Android JUnit tests can be configured here, too.





Android Platform Versions,Feature










Android Platform Versions

                    Platform                              Codename         API Level
Android 1.5Cupcake 3
Android 1.6Donut 4
Android 2.1Eclair 7
Android 2.2Froyo 8
Android 2.3 - 2.3.2Gingerbread 9
Android 2.3.3 - 2.3.4 10
Android 3.0 Honeycomb 11
Android 3.112
Android 3.213    
Android 4.0                                         Icecream Sandwich               14

Android Feature

As Android is open source and freely available to manufacturers for customization, there are no fixed hardware and software configurations. However, Android itself supports the following features:

Storage Uses SQLite, a lightweight relational database, for data storage.

Connectivity Supports GSM/EDGE, IDEN, CDMA, EV-DO, UMTS,Bluetooth (includes A2DP and AVRCP), WiFi, LTE, and WiMAX. Chapter 8 discusses networking in more detail.

Messaging Supports both SMS and MMS. 

Web browser Based on the open-source WebKit, together with Chromes V8 JavaScript engine

Media support Includes support for the following media: H.263, H.264 (in 3GP or MP4 container), MPEG-4 SP, AMR, AMR-WB (in 3GP container), AAC, HE-AAC (in MP4 or 3GP container), MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP

Hardware support Accelerometer Sensor, Camera, Digital Compass, Proximity Sensor, and GPS

Multi-touch Supports multi-touch screens

Multi-tasking Supports multi-tasking applications

Flash support Android 2.3 supports Flash 10.1.

Tethering Supports sharing of Internet connections as a wired/wireless hotspot

Beginning Android Application Development Ebook

http://androidcontrol.blogspot.com/2011/10/beginning-android-application.html

What is Android?



What is Android?

Android is operating system ( OS ) Software for Mobile phone or Mobile device by Google.

Android platform using the Java programming language.

แอนดรอยด์ เป็น โปรแกรมระบบปฎิบัติการ ( OS ) ควบคุมการทำงานสำหรับโทรศัพท์มือถือ และอุปกรณ์พกพา แบบต่างๆ ระบบแอนดรอย์ ใช้ภาษาจาวา ในการพัฒนา โดยบริษัท กูเกิล

มี จุดเริ่มต้นมาจากบริษัท Android Inc. ที่ได้นำเอาระบบปฏิบัติการลีนุกซ์ (Linux) ซึ่งนิยมนำไปใช้งานกับเครื่องแม่ข่าย (Server) เป็นหลัก นำมาลดทอนขนาดตัว เพื่อให้เหมาะสมแกการนำไปติดตั้งบนอุปกรณ์พกพา ที่มีขนาดพื้นที่จัดเก็บข้อมูลที่จำกัด โดยหวังว่า แอนดรอยด์ นั้นจะเป็นหุ่นยนต์ตัวน้อย ๆ ที่คอยช่วยเหลืออำนวยความสะดวกแก่ผู้ที่พกพามัน ไปในทุกที่ ทุกเวลา