Beginning Android Tablet Application Development

Beginning Android Tablet Application Development

Wei-Meng Lee

Language: English

Pages: 288

ISBN: 1118106733

Format: PDF / Kindle (mobi) / ePub


A full-color, fast-paced introduction to developing tablet applications using Android The new release of Android 3 brings the full power of Android to tablet computing and this hands-on guide offers an introduction to developing tablet applications using this new Android release. Veteran author Wei-Meng Lee explains how Android 3 is specifically optimized for tablet computing and he details Android's tablet-specific functions. Beginning with the basics, this book moves at a steady pace to provide everything you need to know to begin successfully developing your own Android tablet applications. * Serves as a full-color, hands-on introduction to developing tablet applications with the new Android 3 * Offers a helpful overview of Android 3 programming for tablets* Details the components of Android tablet applications* Highlights ways to build the Android user interface for tablets, create location-based services, publish Android applications, use Eclipse for Android development, and employ the Android emulator Beginning Android Tablet Application Development is an ideal starting point for getting started with using Android 3 to develop tablet applications.

Cocoa Design Patterns

C++: No Experience Required

Hacking the Kinect

C# 4.0 in a Nutshell: The Definitive Reference

Swift High Performance

The Black Art of Programming

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

application is 1. This value is used to identify the version number of your application. It can be used to programmatically determine whether an application needs to be upgraded. ➤ The version name of the application is 1.0. This string value is mainly used for display to the user. You should use the format: .. for this value. ➤ The application uses the image named icon.png located in the drawable folder. 28/06/11 12:32 PM 26 ❘ CHAPTER 1 GETTING STARTED WITH ANDROID

planning, and so on. Of course, one of the key ingredients in an LBS app is maps, which present a visual representation of your location. In this chapter, you will learn how to make use of Google Maps in your Android application, and how to manipulate it programmatically. In addition, you will learn how to obtain your geographical location using the LocationManager class available in the Android SDK. At the end of the chapter, you will have created a very cool Android tablet mapping application!

mapFragment = (ShowMap)getFragmentManager().findFragmentById( R.id.mapFragment); //---invoke the method from the fragment--mapFragment.gotoLocation(latlng[position]); C04.indd 126 28/06/11 12:46 PM Displaying Maps ❘ 127 You made use of the getFragmentManager() method to obtain an instance of the FragmentManager object, and then called its findFragmentById() method to obtain an instance of the ShowMap fragment. You then called the gotoLocation() method available in the fragment. Adding

getActivity().findViewById(R.id.mapView); mc = mapView.getController(); mapView.setBuiltInZoomControls(true); mapView.setSatellite(true); mapView.setTraffic(true); } //---go to a particular location--public void gotoLocation(String latlng) { //---the location is represented as “lat,lng”--String[] coordinates = latlng.split(“,”); double lat = Double.parseDouble(coordinates[0]); double lng = Double.parseDouble(coordinates[1]); p = new GeoPoint((int) (lat * 1E6), (int) (lng * 1E6)); mc.animateTo(p);

locationListener; private String senderTel; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //---intent to filter for SMS messages received--intentFilter = new IntentFilter(); intentFilter.addAction(“SMS_RECEIVED_ACTION”); //---register the receiver--registerReceiver(intentReceiver, intentFilter); } private BroadcastReceiver intentReceiver = new BroadcastReceiver() {

Download sample

Download

About admin