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 Application Development ISBN: 978-0-470-34471-2
This is the forum to discuss the Wrox book Professional Android Application Development by Reto Meier; ISBN: 9780470344712
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 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 December 4th, 2009, 05:49 AM
Registered User
 
Join Date: Dec 2009
Location: Virginia Beach, VA
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to silverx10 Send a message via AIM to silverx10 Send a message via MSN to silverx10 Send a message via Yahoo to silverx10
Default Serious Issues

So this book was published this year, and it already seems to be horribly out of date, which means it's prolly gonna get returned to Amazon.

That being said, just about every code snippet I've seen from the beginning of the book (the viewing of the Hello, World application) all the way to the chapter two To Do example are being swamped with errors.

Code:
public void onCreate(Bundle icicle) {
Is the first line that's given me grief. In the generated project file, it's actually generated as:

Code:
public void onCreate(Bundle savedInstanceState) {
Am I doing something horribly wrong, or is this book (as I've already decided) horribly out of date?
Reply With Quote
  #2 (permalink)  
Old December 4th, 2009, 06:05 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

There's certainly been a few changes since the release, but the code from the first 6 chapters should still work pretty well.

The problem you've indicated here is just a change in variable name. As you can see, the method signature is still the same:

Code:
public void onCreate(Bundle)
But the name of the bundle parameter is different. If you're seeing errors it's likely because the generated code now names the Bundle parameter savedInstanceSate, whereas in the code snippets I've used the name icicle. If you change them to make sure it's always the same name your errors should disappear.

If there are still any errors, let me know and I'll try and figure out what's going wrong.

Incidentally, the book was actually published a little over a year ago -- though it's still incredible how quickly things change!

Cheers
Reto
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
Reply With Quote
  #3 (permalink)  
Old December 4th, 2009, 06:13 AM
Registered User
 
Join Date: Dec 2009
Location: Virginia Beach, VA
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to silverx10 Send a message via AIM to silverx10 Send a message via MSN to silverx10 Send a message via Yahoo to silverx10
Default

Good lord, that was a faster response than I was expecting.

I'm an insomniac, what's your excuse? ;)

Anyway, I'm gonna give this another go, and see if I can't get the example working by following each step verbatim.

In an attempt to cover all my bases, I even went so far as to downgrade from the Galileo release of Eclipse to Ganymede, as the book specifies.

Also, something that differs big time from your step-by-steps in the guides here is that your "New Project" windows don't look remotely similar to the one I'm using. It gives us an extra option: MinSDK Version.

Not sure if that makes a big difference, but all the same... here goes.

Last edited by silverx10; December 4th, 2009 at 06:15 AM..
Reply With Quote
  #4 (permalink)  
Old December 4th, 2009, 06:34 AM
Registered User
 
Join Date: Dec 2009
Location: Virginia Beach, VA
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to silverx10 Send a message via AIM to silverx10 Send a message via MSN to silverx10 Send a message via Yahoo to silverx10
Default

Yep, did everything exactly as written, still getting tons of errors.

I've got some Visual Basic under my belt, but nothing that could lead me to intuitively figure out how to get around these issues. And with at least a little programming background, if I can't figure it out, I'm sure that nobody with an equivalent amount will be able to, either.

If I sound ungrateful, I apologize. Getting feedback from the author at all is more than I was expecting.

http://www.silveraonyx.net/images/errors.jpg

More specifically, this is what Eclipse has to say on each of those items:

http://www.silveraonyx.net/images/errorspecific.jpg

Last edited by silverx10; December 4th, 2009 at 06:38 AM..
Reply With Quote
  #5 (permalink)  
Old December 4th, 2009, 06:48 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 live in England -- not bad as excuses go :)

First off, if you haven't already - let me suggest you download the code from:
http://www.wrox.com/WileyCDA/WroxTit...-DOWNLOAD.html

If you've done that, you'll need to make a couple of changes before it will compile.
1) Open the project properties (right click the project, select 'Properties').
2) Select 'Android' on the right panel.
3) Select a build target (pick the last item on the list).

If you're developing using the emulator you'll also need to construct a new Android Virtual Device before you can debug your app.
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
Reply With Quote
  #6 (permalink)  
Old December 4th, 2009, 06:55 AM
Registered User
 
Join Date: Dec 2009
Location: Virginia Beach, VA
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to silverx10 Send a message via AIM to silverx10 Send a message via MSN to silverx10 Send a message via Yahoo to silverx10
Default

Aye, England is a good excuse as any, haha.

http://www.silveraonyx.net/images/properties.jpg

's what I see when I right-click > Properties on the project.

If I choose the last item in that list, the project generates a new warning that I've made a change, but that the API is set higher than that of the project.

Already configured an AVD when I checked out the Android SDK Hello, World example.
Reply With Quote
  #7 (permalink)  
Old December 15th, 2009, 02:18 PM
Registered User
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default me too :-)

Ya, me too. :-/

I did some android before and I wanted to try to jump start to get to the next level -- so I bought this book. I had 1.5 and 1.6 -- and, of course, 2.0 comes out so I want to get up to date and dl it -- and then start the book. Now the code examples are riddled with out of date items -- screens, layouts and options are significantly changed. It's so bad, it's almost tempting to downgrade... but then I'll be getting familiar with old info.

I've managed to bang my head through all the issues I've had so far, and, in doing so, learn the changes and what to look for in the new versions, etc. However, even with that, the code and layout in the book -- TO ME -- seems extremely fragmented and totally random.

I'm now trying to add the menus to the todo projects. I've got the java code in, but where does the drawable resource xml go? I don't have just one drawable, it looks like I have low, medium and high... I have the X and + drawables in the ldpi -- but there doesn't seem to be any xml associated with it. I assume I'll have to make a drawable under values. YET -- the code in the book seems to assume that this should already be working
at this point. I went back to chapter 2 to see if I missed some XML editing there -- but I can't seem to find anything. I've gone over chapter 4 and I can't seem to find any XML etc. Fine, I'll take a few guesses, and then try a few searches, etc. (back now) -- seems that R.java gets (auto) generated, so I can look in the gen/r.Java and see what the system THINKS in there. I see the name of my lpdi image, so I changed the name in the code to match what the R gen has... now it seems to work.

Page 101 -- "For Example" ... "creatively labeled /Submenu/ from Figure 4-5, its" ... I don't have anything that says "Submenu" in figure 4-5. 4-5 says: menu item 5, 6, 9, checkbox, radiobutton 1, 2, 3 (Menu+a) ... etc.

It's all very confusing.

I downloaded the code. I've whacked the R.java ... but the code for chapter 4 doesn't have menus in it. *ARGH*

Scott
Reply With Quote
  #8 (permalink)  
Old December 15th, 2009, 03:02 PM
Registered User
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default calculate resultset of two sql statement

There is a situation where I need to calcuated two data within the stored procedure. And the sum of these two data should

return from stored procedure.Right now I am not concentrating on return value.

My problem is that I need the values return through the two select statement within @v1 and @v2, but when i execute this

procedure it returns me the select statement (string) within these variable. Please suggest me the appropriate way to do this.
I will appriciate any response. it will help me to go further into my solution.





ALTER PROCEDURE [dbo].[WeightageInASI]
@Quarter varchar(10),
@Sector varchar(100),
@CurrentYear varchar(10)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Weightagevalue float
DECLARE @v1 float, @v2 float, @v3 float

select @v1 = 'SELECT isnull(sum(Q.'+ @Quarter +'),0) as '+ @Quarter +' FROM CompanyClassification c INNER JOIN
QuarterlyCapitalisation Q ON C.BSC_CODE=Q.BSC_CODE WHERE
C.SECTOR = ' + Char(39) + +' ' + @Sector + Char(39) +' AND Q.'+ @Quarter +' !=0 AND YEAR= '+ Char(39) + @CurrentYear +

Char(39) +''
exec(@v1)

select @v2 = 'SELECT isnull(sum(Q.'+ @Quarter +'),0) as '+ @Quarter +' FROM CompanyClassification c INNER JOIN
QuarterlyCapitalisation Q ON C.BSC_CODE=Q.BSC_CODE WHERE
C.SECTOR = ' + Char(39) + 'Not In ASI' + Char(39) +' AND Q.'+ @Quarter +' !=0 AND YEAR= '+ Char(39) + @CurrentYear + Char(39)

+''
exec @v2
set @v3 = @v1 * 100 / @v2

end
Reply With Quote
  #9 (permalink)  
Old December 15th, 2009, 03:05 PM
Registered User
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default interesting java

Which chapter is that code from? :-)
Reply With Quote
  #10 (permalink)  
Old January 13th, 2010, 02:35 PM
Registered User
 
Join Date: Jan 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Some suggestions for the 2.0 book

While this book has helped me to some extent, I'm fairly disappointed in the lack of detail. For one, I just purchased it and was not aware that it was only Android 1.0. This should be stated more clearly. Wrox should offer an upgrade special to the Android 2.0 book. Second, I've used many Wrox books and what I like about them is that code is shown, and then a full step by step explanation of what is going on in the code follows. This Android book only has very brief explanations of what is going on in the code, leaving out necessary detail. And the way it illustrates things like animation before even showing the basics makes it very confusing to step through methodically. Also, an Appendix with some key class descriptions and some basic Eclipse configuration info would be useful. I've had a lot of programming experience, so I've been able to work through some of the issues, but I pity those who do not have experience.
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
connection string issues, web.config file issues kaliaparijat ASP.NET 2.0 Professional 1 June 12th, 2008 08:07 AM
IE Issues iPagan BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 April 1st, 2007 04:11 AM
Still Having Issues slas7713 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 9 October 27th, 2006 02:59 PM
For-each issues hiskeyd XSLT 1 February 27th, 2006 08:01 PM



All times are GMT -4. The time now is 05:36 AM.


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