Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 9th, 2010, 11:38 PM
Registered User
 
Join Date: Mar 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Intent Resolution confusion

Page 146 "How Android Resolves Intent Filters"
The text states
Quote:
2.1. "Action matches are made if the Intent Filter either includes the specified action or has no action specified"
on Android developer guide
http://developer.android.com/intl/zh...s-filters.html

the rule follows
Quote:
To pass this test, the action specified in the Intent object must match one of the actions listed in the filter. If the object or the filter does not specify an action, the results are as follows:

•If the filter fails to list any actions, there is nothing for an intent to match, so all intents fail the test. No intents can get through the filter.
•On the other hand, an Intent object that doesn't specify an action automatically passes the test — as long as the filter contains at least one action.
Therefore I think the text got mixed up between the rules applied for Intent and Intent Filters.

I think changing the text to
"Action matches are made if the Intent Filter either includes the specified action or has no action specified for Intent object"
would make more sense.

Please correct my understanding if I misunderstood any of the contents.

thanks

Last edited by fungi8210; March 10th, 2010 at 01:39 AM..
Reply With Quote
  #2 (permalink)  
Old March 10th, 2010, 06:50 AM
Reto's Avatar
Wrox Author
Points: 287, Level: 5
Points: 287, Level: 5 Points: 287, Level: 5 Points: 287, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2008
Location: London, United Kingdom
Posts: 61
Thanks: 1
Thanked 7 Times in 6 Posts
Default

Yes - your understanding is correct.

Intents will resolve to any Intent Filter that includes an action tag that matches the specified Intent action, or if an Intent has no action specified it will match an Intent Filter that has at least one action tag.
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
Reply With Quote
  #3 (permalink)  
Old March 10th, 2010, 07:15 AM
Registered User
 
Join Date: Mar 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks!
Im just a little surprised how this error can sneak through first edition and onto the second edition. But then again, it might be sdk version differences.
Reply With Quote
  #4 (permalink)  
Old March 10th, 2010, 07:18 AM
Reto's Avatar
Wrox Author
Points: 287, Level: 5
Points: 287, Level: 5 Points: 287, Level: 5 Points: 287, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2008
Location: London, United Kingdom
Posts: 61
Thanks: 1
Thanked 7 Times in 6 Posts
Default

I have a feeling this behavior was different back in the early days. I can't find anything definitive though so I'll not blame that :)
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Confused between the rules applied to Intent and Intent Filters fungi8210 BOOK: Professional Android 2 Application Development 1 March 10th, 2010 06:48 AM
SQL SERVER - Intent Lock carumuga SQL Server 2000 2 November 20th, 2007 05:53 AM
Some confusion in these code hpatel_it ASP.NET 1.0 and 1.1 Basics 0 August 30th, 2006 08:19 AM
Some confusion as to which SQL to use mark.uk SQL Server 2000 6 August 12th, 2004 10:47 AM



All times are GMT -4. The time now is 03:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.