 |
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
|
|
|
|

May 3rd, 2011, 04:26 AM
|
|
Authorized User
|
|
Join Date: May 2010
Posts: 21
Thanks: 0
Thanked 6 Times in 4 Posts
|
|
Chapter 9 - LBS
Hi Readers:
---------------
For Chapter 9, page 306, step 2, main.xml should be AndroidManifest.xml.
---------------
For Chapter 9, page 322, you need to add in the following permissions in order for your application to receive location coordinates:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.learn2develop.LBS"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="11" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOC ATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCAT ION"></uses-permission>
<application android:icon="@drawable/icon" android:label="Where Am I">
<uses-library android:name="com.google.android.maps" />
<activity android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Sorry for the omission!
Thanks,
Wei-Meng Lee
Last edited by weimenglee; May 16th, 2011 at 10:18 AM..
|
|
The Following User Says Thank You to weimenglee For This Useful Post:
|
|
|

July 26th, 2011, 10:47 AM
|
|
Registered User
|
|
Join Date: Jul 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I downloaded the code and put everything in place.
all I changed is the API key for the Google maps.
everything is working fine untill I try to change the location with the Eclipse emulator control (DDMS). The connection between the emulator and the DDMS is dropped:
- in the "devices" tab/view, all items (eg com.android.launcher, com.android.systemui, ...) under the emulator disappear
- in the "debug" view, it says <terminated> and <disconnected>
I've downloaded and installed an entirely new Eclipse + ADK to ensure they are up to date. Still fails.
When I disable the part about the locationlistener in MainActivity.java, changing the location via the emulator control does not cause the emulator to be disconnected anymore (but of course, the location of the map in the app is not changed either).
Any suggestions?
|
|

July 26th, 2011, 10:51 AM
|
|
Authorized User
|
|
Join Date: May 2010
Posts: 21
Thanks: 0
Thanked 6 Times in 4 Posts
|
|
Hi:
I suppose your AVD is Android 2.3.x? Try using an older version of the Android, say by creating an AVD using Android 2.2. That should work. Seems like the Android 2.3.x has some problems when sending it location coordinates.
Hope this helps!
Wei-Meng
|
|

July 26th, 2011, 10:58 AM
|
|
Registered User
|
|
Join Date: Jul 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you very much for you ultra fast reply. Wish I had tried asking the question before losing a day reinstalling everything :)
Works like a charm now. Perfect!
what a relief...
|
|

July 2nd, 2013, 11:06 AM
|
|
Registered User
|
|
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Map not displaying
I have checked the code very carefully against Chapter 9 of Beginning Android Applications and have checked that the API key I generated and logged with the Google APIs console is correctly entered and cannot get map to display (just the grid) in my test app, either on emulator or my Samsung Galaxy Mini which does have internet access. Not sure where else to look, could you offer a hint please?
|
|

July 14th, 2013, 03:04 PM
|
|
Registered User
|
|
Join Date: Jul 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi westcoastrider,
Did you figure out the issue with the map? I have the same problem...
Quote:
Originally Posted by westcoastrider
I have checked the code very carefully against Chapter 9 of Beginning Android Applications and have checked that the API key I generated and logged with the Google APIs console is correctly entered and cannot get map to display (just the grid) in my test app, either on emulator or my Samsung Galaxy Mini which does have internet access. Not sure where else to look, could you offer a hint please?
|
|
|

July 15th, 2013, 09:05 AM
|
|
Registered User
|
|
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by AndreyU
Hi westcoastrider,
Did you figure out the issue with the map? I have the same problem...
|
I'm afraid not yet, I have some other stuff I need to do so it's had to go on the back burner, but it's very frustrating so if you come across anything I'd be interested to know. Google maps is so easy to use on the web you wouldn't expect there to be so many hurdles when developing for Android 
|
|

November 14th, 2013, 01:05 PM
|
|
Registered User
|
|
Join Date: Oct 2013
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
LBS PROJECT
In the last project of the LBS chapter has a project of location tracking application i have tried to develop it as per the code and in eclipse it deosn't show any error when i deploy it on a real device as a unsigned application it says application cant install anybody please help............
Help much appreciated
|
|

November 14th, 2013, 06:08 PM
|
|
Registered User
|
|
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by mikemwambia
In the last project of the LBS chapter has a project of location tracking application i have tried to develop it as per the code and in eclipse it deosn't show any error when i deploy it on a real device as a unsigned application it says application cant install anybody please help............
Help much appreciated
|
You may need to set your phone's permissions so it will allow you to install apps not purchased from an apps store - this is usually set to prevent this as a protection against third party malicious software being downloaded.
I did get the map working in the end, but because of work pressure in other areas I haven't gone much further with it I'm afraid. Can't really remember what I did, which I know isn't very helpful, but I do recall having to fiddle with my settings on Google API console to ensure that the right app was registered correcly with the right permissions, if that's any help at all. Good luck!
|
|
The Following User Says Thank You to westcoastrider For This Useful Post:
|
|
|
 |
|