Wrox Programmer Forums
|
BOOK: Beginning Android Application Development
This is the forum to discuss the Wrox book Beginning Android Application Development by Wei-Meng Lee; ISBN: 978-1-1180-1711-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2013, 04:19 AM
Registered User
 
Join Date: May 2013
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Unhappy chapter2-using startActivityForResult

Many Thanks to author for such a nice book for novice Android learners like me. I have understood how 'startActivity' method works for starting second activity from first activity, and the program works fine. However though I have understood how the 'startActivityForResult' method works, but when I try to run the program nothing happens in the emulator after I click on keypad center button...I have thoroughly checked and ensured that in manifest file, main.java, main.xml, activity2.java and activity2.xml there are no mistakes in writing the code...can the experts guide me please? ---arun karkare
 
Old May 19th, 2013, 03:38 PM
Registered User
 
Join Date: May 2013
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Code Issue

Hello ArunKarkare,
I also encountered the same issue with the program and i changed it a bit to see the working. After changing the working is the same as described in the book. In the book the textView, EditText and the Button component are added to the main.xml but Activity2.xml file is shown in the image which consists of all this.

I am providing you the link to the file which i modified to make it work.I have added a button and used that to navigate to the other activity instead of using the DPAD action.
The target SDK for that is 2.3.3 API 10... You can download it and test it...

Almost all the code for the java files remains the same except for the button action only.....

http://sdrv.ms/10OiDoy


I hope i have helped you solve your issue...


Regards,
Nikhil

Last edited by Nik_Pro; May 19th, 2013 at 03:46 PM..
 
Old May 19th, 2013, 10:31 PM
Registered User
 
Join Date: May 2013
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default chapter2-using startActivityForResult

Hello....Nikhil...many thanks for ur comments, and yes I realized the problem that some portion of the code must have been in Activity2.java that was wrongly included in main.java, also I realized that center-directional-button on emulator does not work, so I used the 'H' key on my laptop keyboard instead...anyway thanks again ....arun karkare
The Following User Says Thank You to ArunKarkare For This Useful Post:
Nik_Pro (May 20th, 2013)
 
Old May 20th, 2013, 08:29 AM
Registered User
 
Join Date: May 2013
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Your Welcome Arun...


Regards,
Nikhil





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter2 - Showdialog mixieh BOOK: Beginning Android 4 Application Development 4 March 17th, 2013 02:25 PM
Chapter2 - To Do List error jmjiru BOOK: Professional Android 2 Application Development 2 November 21st, 2011 01:31 PM
Chapter2 : To Do List example albiert BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 2 June 1st, 2010 01:28 PM
Chapter2 error BlackSoul BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 1 January 4th, 2010 04:27 PM
Chapter2 netblue BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 2 June 5th, 2007 01:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.