Tampilkan postingan dengan label defect tracking. Tampilkan semua postingan
Tampilkan postingan dengan label defect tracking. Tampilkan semua postingan

Kamis, 14 Oktober 2010

Reader Feedback: Manifest Permissions Editor

[UPDATE: 13 Feb, 2011: This problem now longer exists in ADT 9.0.0 (the version right after 0.9.9).]

The Android Manifest file editor within Eclipse provides a number of useful editing tabs to wrangle the complexities of this file. One such tab is the Permissions tab. Use the Permissions tab to manage the permissions that your application uses and grants to others.

If you've been working with Android for a while, then you may be familiar with the permissions listed in the drop-down when you register a new permission using the uses-permission tag. We refer to this feature in both our books; specifically in Sam's Teach Yourself Android Application Development in 24 Hours, Hour 5, "Configuring the Android Manifest File."

Unfortunately, a recent update to the Android Development Tools plugin removed this drop-down. We're not sure if it's a bug or not yet, but the drop-down disappeared in the software update between ADT 0.9.8 or ADT 0.9.9.

What used to look like:

Permissions tab from ADT 0.9.7 showing the drop-down list of values
Now looks like:
Permissions tab from ADT 0.9.9, with the corresponding Browse... dialog
When you press the Browse... button, the dialog comes up.

The field provided still works for typing in permissions values by hand, instead of selecting them from a list. The alternate method, editing the XML file directly from the last tab, hasn't changed at all.

So where is one to get these values to type in yourself? On page 90 and 91 of the SAMS book, we've listed a number of the most common permission values. However, the best place to get the appropriate values for your applications is from the Android SDK documentation. Permissions are defined in the documentation for the android.Manifest.permission class. Also conveniently listed with these values is a short description of what they enable the application to do. Before including a permission within your application, always check the documentation to determine if that is the most appropriate one to use.

Senin, 30 Agustus 2010

Reader Feedback: Trivia Quiz Server Bug

Bugs happen! 

In Hour 17 of Sam's Teach Yourself Android Application Development in 24 Hours, you learn about AsyncTasks. You use one to send a request to the server to add a friend based upon their email address. What's supposed to happen is that the server looks up the email address and if it finds a match, it adds that user to your list of friends, which is stored on the server. Then, when the Scores Screen is updated to download scores of your friends, the server will return XML containing just that. It will not return email address or anything like that -- we don't want privacy leaks.

What was happening?

Nothing!

Nothing? That's right. The server was failing to find any friends -- regardless of the email address. It was, however, returning the correct status. We just didn't bother with doing anything more with the status than printing it out to LogCat. Whoops.

Fixed

The fix was simple. The Google App Engine server has been updated to version 3 and, after some brief testing, we promoted this to the default server.

If you were having trouble with adding friends, now you know why.

This report was sent in by a reader. If you have troubles, please don't hesitate to contact us at androidwirelessdev@gmail.com or right here on this blog. We see all comments. It might just be a bug!

Senin, 23 Agustus 2010

Unit Testing with Android JUnit

Mobiletuts+ Android JUnit Testing Article
Testing is an important part of any software project. Testing for mobile is no different. One way of ensuring correctness of code at all levels is via automated unit testing.  Through automated unit testing, you can define expected results on the normal cases, in addition to edge case failures, standard failures, and everything in between. The popular JUnit framework is often used when writing these unit tests for Java.

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.
ANDROID BOOK © 2008 Template by:
SkinCorner