Wrox Programmer Forums
|
BOOK: Android Application Development Cookbook: 93 Recipes for Building Winning Apps
This is the forum to discuss the Wrox book Android Application Development Cookbook: 93 Recipes for Building Winning Apps by Wei-Meng Lee; ISBN: 978-1-1181-7767-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Android Application Development Cookbook: 93 Recipes for Building Winning Apps 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 20th, 2013, 05:35 AM
Authorized User
 
Join Date: May 2010
Posts: 21
Thanks: 0
Thanked 6 Times in 4 Posts
Default Download the free updated Chapter 7 on Google Maps for Android v2.0

As "Android Application Development Cookbook: 93 Recipes for Building Winning Apps" goes to press, version 1.0 of the Google Maps for Android was deprecated and replaced by version 2.0. As a service to my readers, I have worked together with Wrox to make the revised Chapter 7 featuring Google Maps for Android v2.0 available for download free of charge.

You can download the chapter here: http://www.wrox.com/WileyCDA/WroxTit...-DOWNLOAD.html.

Wei-Meng Lee,
Technologist & Founder,
Developer Learning Solutions
http://www.Learn2Develop.net
Tel: (65)-9-692-4065

Author of:
* Beginning Android 4 Application Development (Wrox)
* Beginning iOS 5 Application Development (Wrox)
* C# 2008 Programmer's Reference (Wrox)
Join our Facebook fan page now at:
http://www.facebook.com/DeveloperLearningSolutions
The Following 2 Users Say Thank You to weimenglee For This Useful Post:
jminatel (May 20th, 2013)
 
Old June 8th, 2013, 05:59 PM
Registered User
 
Join Date: May 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Source Code Download GoogleMaps_v2.0.zip

Quote:
Originally Posted by weimenglee View Post
You can download the chapter here: http://www.wrox.com/WileyCDA/WroxTit...-DOWNLOAD.html.
Thanks for the updated chapter.
The chapter refers to a source code download GoogleMaps_v2.0.zip
How do I download this file ?
 
Old July 23rd, 2013, 03:14 PM
Registered User
 
Join Date: Jul 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yeah.. How do we download this file ?
Chapter is no editable - you cannot to copy text.
 
Old July 23rd, 2013, 08:01 PM
Authorized User
 
Join Date: May 2010
Posts: 21
Thanks: 0
Thanked 6 Times in 4 Posts
Default Source Code for Google Maps For Android v2.0

Hi All:
You can now download the source code for the above at: https://dl.dropboxusercontent.com/u/...eMaps-v2.0.zip.

Thanks!
Wei-Meng Lee

Quote:
Originally Posted by weimenglee View Post
As "Android Application Development Cookbook: 93 Recipes for Building Winning Apps" goes to press, version 1.0 of the Google Maps for Android was deprecated and replaced by version 2.0. As a service to my readers, I have worked together with Wrox to make the revised Chapter 7 featuring Google Maps for Android v2.0 available for download free of charge.

You can download the chapter here: http://www.wrox.com/WileyCDA/WroxTit...-DOWNLOAD.html.

Wei-Meng Lee,
Technologist & Founder,
Developer Learning Solutions
http://www.Learn2Develop.net
Tel: (65)-9-692-4065

Author of:
* Beginning Android 4 Application Development (Wrox)
* Beginning iOS 5 Application Development (Wrox)
* C# 2008 Programmer's Reference (Wrox)
Join our Facebook fan page now at:
http://www.facebook.com/DeveloperLearningSolutions
 
Old March 3rd, 2014, 12:31 PM
Registered User
 
Join Date: Feb 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default map.getMyLocation() returns null

The new Map example works fine, but one caveat.

If I chose menu_showcurrentlocation from menu it aways returns null

unless I chose menu_getcurrentlocation first.

Despite adding a call to a method the same as what 'menu_getcurrentlocation' does prior.

Any idea?

TIA
 
Old September 26th, 2014, 06:24 AM
Authorized User
 
Join Date: Oct 2012
Posts: 15
Thanks: 2
Thanked 1 Time in 1 Post
Default Source code for Chapter 7

Well thanks for the updated chapter which I have (eventually) got working fine. I say eventually as I spent a day or so fiddling with some obscure bug in my google-play-services.lib which I won't go into.

However, what would have significantly helped the debug process would have been to have different downloadable source codes for each part of the chapter i.e. Google Maps 7.1 through to Google Maps 7.7. The reason I'm asking for this is that the at section 7.1 the code is relatively straightforward but has become much more complex with the supplied source code as it encompasses all the working sections of the chapter.

So if others are experiencing the same issue here is my source code for Section 7.1 which is where you're able to check that you've got your basic API, google-play-services.lib etc. etc. all set up OK...

activity_main.xml
Code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <fragment
        android:id="@+id/map"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        class="com.google.android.gms.maps.MapFragment"
        android:clickable="true" />

</RelativeLayout>
MainActivity.java
Code:
package com.example.googlemaps;

import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

	}
}
GoogleMapsManifest
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.googlemaps"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="18" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <permission
        android:name="com.example.googlemaps.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.example.googlemaps.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.googlemaps.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>

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="Your API key here...." />
    </application>

</manifest>





Similar Threads
Thread Thread Starter Forum Replies Last Post
coordinates google maps etxJS sedoyksa Javascript 0 October 31st, 2011 07:33 PM
Google maps Geocode avi1 ASP.NET 3.5 Basics 0 October 24th, 2010 01:49 AM
com.google.android.maps library unavailable lz1234 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 1 June 7th, 2009 10:18 AM
XSL, Javascript and Google maps.. tomharding XSLT 2 March 14th, 2007 06:10 PM





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