Beginning Android Tablet Application Development

Beginning Android Tablet Application Development

Wei-Meng Lee

Language: English

Pages: 288

ISBN: 1118106733

Format: PDF / Kindle (mobi) / ePub

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.

The Beginner's Guide to the Internet Underground

Your Code as a Crime Scene: Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs

Instant Spring for Android Starter

iOS SDK Programming: A Beginner's Guide

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

COMPONENTS OF AN ANDROID TABLET APPLICATION activity — TextView, EditText, Button, and so on. The Java class for a fragment needs to extend the Fragment base class: NOTE Besides the Fragment base class, a fragment can also extend a few other subclasses of the Fragment class, such as DialogFragment, ListFragment, and PreferenceFragment. Chapter 3 will discuss these types of fragments in more detail. public class Fragment1 extends Fragment { //... } To draw the UI for a fragment, you override

mnu2 = menu.add(0, 1, 1, “Stop Tracking”); { mnu2.setShowAsAction( MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); C04.indd 144 28/06/11 12:46 PM Getting Location Data ❘ 145 } MenuItem mnu3 = menu.add(0, 2, 1, “Use GPS”); { mnu3.setShowAsAction( MenuItem.SHOW_AS_ACTION_WITH_TEXT); mnu3.setCheckable(true); } MenuItem mnu4 = menu.add(0, 3, 1, “Use Cellular/WiFi”); { mnu4.setShowAsAction( MenuItem.SHOW_AS_ACTION_WITH_TEXT); mnu4.setCheckable(true); } } private boolean

Intent i = new Intent(android.content.Intent.ACTION_VIEW); i.putExtra(“address”, “5556; 5558; 5560”); i.putExtra(“sms_body”, “Hello my friends!”); i.setType(“vnd.android-dir/mms-sms”); startActivity(i); } }); } This will invoke the Messaging application, as shown in Figure 5-3. Note that you can send your SMS to multiple recipients by simply separating each phone number with a semicolon (in the putExtra() method). c05.indd 158 28/06/11 1:19 PM SMS Messaging ❘ 159 FIGURE 5-3 NOTE If you

lines in bold to the MainActivity .java fi le: /** 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); btnSendSMS = (Button) findViewById(R.id.btnSendSMS);

how to verify your account and complete the joining process. NOTE You can read messages in the forums without joining P2P, but in order to post your own messages, you must join. After you join, you can post new messages and respond to messages that other users post. You can read messages at any time on the Web. If you want to have new messages from a particular forum e-mailed to you, click the Subscribe to This Forum icon by the forum name in the forum listing. For more information about how to

Download sample

Download