My Blog List
Diberdayakan oleh Blogger.
Kamis, 26 Agustus 2010
Reader Feedback: Educational Materials
We're frequently asked by professors, teachers, and other educators about materials they can use in their lectures or coursework above and beyond those found in our books. Our publisher has a great site for this purpose: Pearson Education. They create slides and other teaching materials for the various books, including Android Wireless Application Development and Sam's Teach Yourself Android Application Development in 24 Hours
. We don't know exactly when the materials are available, but it is usually some time after the book is available for purchase. If you have any trouble obtaining teaching materials on a particular topic, don't hesitate to contact our publisher, Pearson Education team support or us directly and we will try to accommodate your requests as best we can.
Senin, 23 Agustus 2010
Unit Testing with Android JUnit
![]() |
| Mobiletuts+ Android JUnit Testing Article |
The Android framework includes powerful unit testing support. Learn how to get started with Android JUnit with our Mobiletuts+ article on JUnit testing with Android.
Label:
android,
bugs,
code,
defect tracking,
defects,
Junit,
mobile,
QA,
quality assurance,
testing,
unit testing
Senin, 16 Agustus 2010
Creating Useful AVDs
![]() |
| Various Android Virtual Devices |
In some cases, you can just switch to testing on real hardware instead of the emulator. If you have a lot of devices for your team, you can probably just switch to using devices. However, if you can't afford devices for everyone on the development and test team or can't get your hands on some unusual devices with unique hardware characteristics, you can create AVDs to simulate these. Head over to Mobiletuts+ and read our tutorial about creating AVDs that come as close as possible to simulating the following devices:
- HTC Evo 4G
- Google/HTC Nexus One
- Motorola Droid
- T-Mobile/HTC G1
- Archos 5 Internet Tablet
Label:
android,
Android Virtual Device,
AVD,
development,
Eclipse,
emulator,
mobile platform,
testing
Selasa, 10 Agustus 2010
Reader Feedback: On Log Tags
![]() |
| Sam's Teach Yourself Android Application Development in 24 Hours |
Log.d(DEBUG_TAG, "SHARED_PREFERENCES");
// (From Hour 10, Page 177)
A couple of readers have asked us: What is DEBUG_TAG? Where is it defined?
The short answer is: you need to define it! By this point in the book, we aren't displaying every line of code you need for the application to compile--only the relevant new code for that particular lesson. We assume that you've mastered certain fundamental Android skills in the previous chapters of the book. One of these skills is understanding the Log calls, such as Log.v or Log.d. which were discussed in detail in Hour 3, Page 54. This skill is essential for debugging Android applications and is used regularly throughout the book.
Log method calls simply display diagnostic information to the Logcat logging tool, providing the developer with important information as the application executes. These calls have no impact on the actual application functionality. The calls just log string output for debugging purposes. You can include these logging calls in your applications or simply leave them out (and not provide diagnostic logging). If you want to log information using the logging calls, you will need to supply a tag string as the first parameter for each Log method. In Hour 3, we suggest that you define a logging tag for each and every Android project or class you create.
The logging tag is shown in the log output of logcat, so you can tell that the information is coming from your application, Activity, class, or method. It's that simple.
![]() |
| LogCat output showing all device logs. Cluttered. |
You can also filter on just the tag, which shows the real power of it.
![]() |
| LogCat, with filter to show only the tag "GestureFunActivity" |
So, when you run across a line in the book that uses such a call, we do not provide the definition of DEBUG_TAG variable. Instead, we assume you know that this is a generic logging call, and you should supply the definition of the variable somewhere in your class. For example, if you want to add logging calls to an Activity class called QuizHelpActivity, class, you should add a definition such as:
Or maybe you'd prefer:private static final String DEBUG_TAG = "QuizHelpActivity";
Or even something for your entire application:private static final String DEBUG_TAG = "QuizHelpActivity Logging Info: ";
private static final String DEBUG_TAG = "MyAppLogging";Those of you who have Java experience will likely recognize that the DEBUG_TAG variable is a constant. That is to say, it has the static final qualifiers. Since the input type to the Log functions are String objects, you then know this to be a static final String. Remember that the logging tag should be descriptive for the specific application or class. In fact, it's often set to the class name, but there is no requirement to do so.
We hope this helps clear up this question. As always, feel free to email us or post a comment right here!
Rabu, 04 Agustus 2010
Second Edition of Android Wireless Application Development Available as a Rough Cut
![]() |
| Rough Cuts eBook cover |
For those with access to Safari, the Rough Cuts version is available. Right now, that's the first twelve chapters, but the others will be put up not long after we finish them until, finally, the book is shipped in print.
Get Rough Cuts Android Wireless Application Development, Second Edition, now, while it's hot!
Kamis, 15 Juli 2010
Android Debug Key Expired? So Did Your Debug Maps API Key!
As an Android developer, you've probably run into an expired debug key by now. If you use the Maps API, you'll inevitably run across the other issue: your maps key is tied to your debug certificate and it also stops working. This happened to me because of a lengthy break from use the Maps API. My old code had a Maps API key in it tied to an equally old debug key. Naturally, using the new debug key meant this didn't work at all.
Now, if you've followed our advice and created a certificate that won't expire for a long, long time, then you can create a debug maps key that will work with it for a long, long time.
It's all pretty simple:
First, create your new debug.keystore file, using all the mandatory values:
Finally, use that to generate your new Maps API Key. The results will look like this:
If your debug.keystore file is now stored in a non-standard location, don't forget to update your build tools. In Eclipse preferences, this is the screen that needs to change:
Now, if you've followed our advice and created a certificate that won't expire for a long, long time, then you can create a debug maps key that will work with it for a long, long time.
It's all pretty simple:
First, create your new debug.keystore file, using all the mandatory values:
keytool -genkey -keypass android -keystore debug.keystore -alias androiddebugkey -storepass android -validity 10000 -dname "CN=Android Debug,O=Android,C=US"Next, get the certificate fingerprint for use in generating the Maps API key:
keytool -list -keystore debug.keystore -storepass androidLike so:
![]() |
| Command results for keytool |
Finally, use that to generate your new Maps API Key. The results will look like this:
![]() |
| After generating new Maps API Key |
If your debug.keystore file is now stored in a non-standard location, don't forget to update your build tools. In Eclipse preferences, this is the screen that needs to change:
![]() |
| Edit the path to your debug.keystore file |
Senin, 12 Juli 2010
Not a Programmer? You Can Still Create Android Apps!
Google has introduced a new tool today called App Inventor. It uses the Open Blocks Java library to allow visual creation of applications, online.
This could be useful for regular developers to prototype quick apps. But, the real use is for non-developers or young folks. What would your kid create if they could create something with no coding required? Might it be silly? Might it be something other kids would have fun with? If you're not a developer, what would you create?
The tool, as it stands now, isn't fully open to the public. You have to fill out a form and then Google will eventually add access. The form is definitely aimed at educators. It's clear Google is looking at this as a teaching tool of sorts. We've always thought mobile programming would make a great target for teaching. This is evidence we aren't alone in that thought.
This could be useful for regular developers to prototype quick apps. But, the real use is for non-developers or young folks. What would your kid create if they could create something with no coding required? Might it be silly? Might it be something other kids would have fun with? If you're not a developer, what would you create?
The tool, as it stands now, isn't fully open to the public. You have to fill out a form and then Google will eventually add access. The form is definitely aimed at educators. It's clear Google is looking at this as a teaching tool of sorts. We've always thought mobile programming would make a great target for teaching. This is evidence we aren't alone in that thought.
Langganan:
Postingan (Atom)
Category
- 1.5 (2)
- 1.5 1.5 R1 (2)
- 1.6r2 (1)
- 2.0 (3)
- 2.0.1 (1)
- 4.0 (2)
- activity (1)
- activitymanager (1)
- address (1)
- amazon (2)
- android (54)
- android 3.0 (1)
- android 3.2 (1)
- android compatibility (2)
- android ndk (1)
- android sdk (2)
- Android Virtual Device (3)
- API (1)
- App (3)
- App Store (2)
- app widget (1)
- apple (1)
- appwidget (1)
- archos (2)
- article (1)
- articles (1)
- atrix (1)
- atrix4g (1)
- AVD (3)
- awad (2)
- awad2e (2)
- beginner (1)
- Berlin (1)
- blackberry (3)
- book (13)
- books (2)
- borders (1)
- brick (1)
- bug (3)
- bugs (1)
- business (5)
- business case (1)
- business plans (3)
- buzz (1)
- camangi (1)
- cell phone (3)
- class (1)
- code (8)
- code name (1)
- coding (2)
- college (1)
- commercial (1)
- compatibility (1)
- compatibility scaling (1)
- compiling (1)
- conference (1)
- contacts (1)
- contactscontract (1)
- coupon (1)
- coursework (1)
- cupcake (2)
- cute (1)
- DEBUG_TAG (1)
- debugging (1)
- defect tracking (3)
- defects (1)
- design (1)
- designer (1)
- developer (8)
- development (15)
- device (1)
- devices (2)
- diagnostics (1)
- discounts (1)
- distribution (1)
- donut (1)
- download (1)
- droidcon (2)
- e-book (2)
- e-version (1)
- eclair (1)
- Eclipse (6)
- ed (1)
- edu (1)
- emulator (2)
- errata (2)
- error (2)
- errors (2)
- europe (1)
- excerpt (1)
- exercise (1)
- extension (1)
- feedback (1)
- fix (1)
- fragmentation (1)
- free (3)
- froyo (1)
- fruit (1)
- fun (1)
- Germany (1)
- gingerbread (4)
- giveaway (2)
- Google (7)
- hardware (3)
- help (1)
- higher education (1)
- holiday (1)
- Home screen (1)
- honeycomb (2)
- host (1)
- ice cream sandwich (2)
- ics (2)
- IDE (1)
- implementation (1)
- incentive (1)
- informit (1)
- installation (1)
- internationalization (1)
- iPhone (4)
- issue (1)
- Junit (1)
- korea (2)
- korean (1)
- L14 (1)
- language (1)
- layout (2)
- layout editor (1)
- learning (2)
- level 13 (1)
- local (1)
- locale (1)
- localization (1)
- logging (2)
- mac (2)
- macos (1)
- manifest (1)
- maps (1)
- marketplace (5)
- mobile (13)
- mobile platform (5)
- mobiletuts+ (1)
- moblie (1)
- monetization (1)
- motorola (1)
- news (1)
- paid (1)
- parse (1)
- plug-in (2)
- plugin (1)
- preview (3)
- project risk (2)
- provider (1)
- published (3)
- publishing (2)
- purchase (3)
- QA (1)
- quality assurance (1)
- question (1)
- raw (1)
- raw resources (1)
- reading (3)
- release (1)
- resources (1)
- review (1)
- revisions (1)
- root (1)
- safari (1)
- sale (1)
- sample (2)
- samples (1)
- SAMS (7)
- sams2e (2)
- scaling (1)
- SDK (7)
- SDK update (3)
- server (1)
- slides (1)
- snapshot (1)
- Software (3)
- source code (3)
- source control (2)
- student (1)
- sty (1)
- subscription (1)
- tablet (1)
- tablets (1)
- tale (1)
- teacher (1)
- teaching (3)
- testing (3)
- tips (4)
- tools (2)
- translation (1)
- travel (1)
- tricks (1)
- tutorial (5)
- unit testing (1)
- update (2)
- updates (2)
- upgrade (5)
- URI (1)
- version (4)
- video (2)
- VideoView (1)
- widget (1)
- wireless (14)
- workaround (1)











