Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
Initial check-in
Browse files Browse the repository at this point in the history
  • Loading branch information
broady committed Mar 20, 2013
1 parent 4a2fe8c commit 428a2c4
Show file tree
Hide file tree
Showing 79 changed files with 1,848 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .classpath
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
6 changes: 6 additions & 0 deletions .gitignore
@@ -0,0 +1,6 @@
local.properties
bin
gen
out
.settings
.idea
33 changes: 33 additions & 0 deletions .project
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>hellomap</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
53 changes: 53 additions & 0 deletions AndroidManifest.xml
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- TODO: Replace "com.example.hellomap" with your desired package name -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.hellomap"
android:versionCode="1"
android:versionName="1.0">

<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="17"/>

<!-- TODO: Replace "com.example" with your package name -->
<permission
android:name="com.example.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.permission.MAPS_RECEIVE"/>

<!-- The following four permissions -->
<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"/>

<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

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

<application
android:label="@string/app_name"
android:icon="@drawable/ic_launcher">

<!-- TODO: Insert your Maps API key here. See this page for more information:
https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="your_api_key"/>

<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>
87 changes: 84 additions & 3 deletions README.md
@@ -1,4 +1,85 @@
hellomap-android
================
A fast way to get started with the [Google Maps Android API v2](http://developers.google.com/maps/documentation/android).

Quick start with the Google Maps Android API
# Requirements

Java Development Kit (JDK) [Download](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)

Android SDK [Download](http://developer.android.com/sdk/index.html)

## Check out the project
See here: https://code.google.com/a/google.com/p/hellomap/source/checkout
You may use the in-built git clients in Eclipse and IntelliJ.

# Eclipse

## Download Eclipse
Eclipse is packaged with the [Android Developer Tools bundle](http://developer.android.com/sdk/index.html)

## Import the project to your workspace
1. Choose File> Import...
2. Choose Android > Existing Android Code Into Workspace
3. Navigate to the checked out project
4. You should see two projects - "hellomap" and "google-play-services_lib".
5. Ensure both are selected
6. Press "Finish"

## Add your API key
1. Navigate to AndroidManifest.xml, under the "hellomap" project.
2. Click the "AndroidManifest.xml" tab, next to "Instrumentation", to see the XML view.
3. Replace "your_api_key" with an API key generated using [these instructions](https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key)

## Run the app
1. Ensure your phone is in plugged in, developer mode enabled and screen unlocked
2. Press the green arrow, or choose Run>Run

## Troubleshooting
### I see a grey map

Follow the instructions under "Add your API key" and try again.

### I see the Android starter screen
1. Choose Window>Close All Perspectives
2. Choose Window>Open Perspective>Other...
3. Choose Java

# IntelliJ
## Download IntelliJ
http://www.jetbrains.com/idea/download/
Choose the "Community Edition"

## Import the project
1. In the start up screen, choose "Open project"
2. Select the checked out project, press OK

## Add your API key
1. Navigate to the AndroidManifest.xml file
2. Replace "your_api_key" with an API key generated using [these instructions](https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key)

## Run the app
1. Ensure your phone is in plugged in, developer mode enabled and screen unlocked
2. Choose Run>Edit Configurations...
3. Press the + button
4. Click "Android Application"
5. Edit the name
6. Choose "hellomap" as the Module
7. Choose "USB Device" as your Target Device
8. Press OK
9. Press the green play button next to the name you specified. This will build the app, install it on the device and run it.

## Troubleshooting
### "Please specify Android SDK"
1. Click "New..."
2. Choose "Android SDK"
3. Navigate to the Android SDK's "sdk" directory, press "Choose"

### "No Java SDK of appropriate version found"
1. Click "New..."
2. Choose "JDK"
3. Navigate to the JDK's home directory. For OS X, this is at `/Library/Java/JavaVirtualMachines/jdk.../Contents/Home`
4. Press "Choose"
5. If you are prompted with "Set up created SDK on project?", press No.
6. Follow the instructions above
7. If you are prompted with "Set up created SDK on project?", press Yes.

### I see a grey map
Follow the instructions under "Add your API key" and try again.
17 changes: 17 additions & 0 deletions ant.properties
@@ -0,0 +1,17 @@
# This file is used to override default values used by the Ant build system.
#
# This file must be checked into Version Control Systems, as it is
# integral to the build system of your project.

# This file is only used by the Ant script.

# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.

# You can also use it define how the release builds are signed by declaring
# the following properties:
# 'key.store' for the location of your keystore and
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.

92 changes: 92 additions & 0 deletions build.xml
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="hellomap" default="help">

<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties"/>

<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties"/>

<!-- if sdk.dir was not set from one of the property file, then
get it from the ANDROID_HOME env var.
This must be done before we load project.properties since
the proguard config can use sdk.dir -->
<property environment="env"/>
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME"/>
</condition>

<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties"/>

<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
unless="sdk.dir"
/>

<!--
Import per project custom build rules if present at the root of the project.
This is the place to put custom intermediary targets such as:
-pre-build
-pre-compile
-post-compile (This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir})
-post-package
-post-build
-pre-clean
-->
<import file="custom_rules.xml" optional="true"/>

<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml"/>

</project>
54 changes: 54 additions & 0 deletions hellomap.iml
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/assets" />
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/libs" />
<option name="USE_CUSTOM_APK_RESOURCE_FOLDER" value="false" />
<option name="CUSTOM_APK_RESOURCE_FOLDER" value="" />
<option name="USE_CUSTOM_COMPILER_MANIFEST" value="false" />
<option name="CUSTOM_COMPILER_MANIFEST" value="" />
<option name="APK_PATH" value="" />
<option name="LIBRARY_PROJECT" value="false" />
<option name="RUN_PROCESS_RESOURCES_MAVEN_TASK" value="true" />
<option name="GENERATE_UNSIGNED_APK" value="false" />
<option name="CUSTOM_DEBUG_KEYSTORE_PATH" value="" />
<option name="PACK_TEST_CODE" value="false" />
<option name="RUN_PROGUARD" value="false" />
<option name="PROGUARD_CFG_PATH" value="/proguard-project.txt" />
<resOverlayFolders>
<path>/res-overlay</path>
</resOverlayFolders>
<includeSystemProguardFile>true</includeSystemProguardFile>
<includeAssetsFromLibraries>false</includeAssetsFromLibraries>
<additionalNativeLibs />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="google-play-services_lib" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="file://$MODULE_DIR$/libs" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$MODULE_DIR$/libs" recursive="false" />
</library>
</orderEntry>
</component>
</module>

8 changes: 8 additions & 0 deletions libproject/google-play-services_lib/.classpath
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

0 comments on commit 428a2c4

Please sign in to comment.