Skip to content

Instantly share code, notes, and snippets.

@futtetennista
Created March 9, 2012 13:40
Show Gist options
  • Save futtetennista/2006534 to your computer and use it in GitHub Desktop.
Save futtetennista/2006534 to your computer and use it in GitHub Desktop.
ignition-location
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<configuration>
<aspectLibraries>
<aspectLibrary>
<groupId>com.github.ignition</groupId>
<artifactId>ignition-location</artifactId>
<type>apklib</type>
</aspectLibrary>
</aspectLibraries>
<source>1.6</source>
</configuration>
<executions>
<execution>
<!-- phase need to be before compile, or the build will fail. More info here: http://stackoverflow.com/questions/2610633/maven-compile-aspectj-project-containing-java-1-6-source -->
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
@IgnitedLocationActivity
public class IgnitedLocationSampleActivity extends MapActivity {
// MUST BE OVERRIDDEN OR IGNITION LOCATION WON'T WORK!
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
}
// MUST BE OVERRIDDEN OR IGNITION LOCATION WON'T WORK!
@Override
public void onResume() {
super.onResume();
}
// MUST BE OVERRIDDEN OR IGNITION LOCATION WON'T WORK!
@Override
public void onPause() {
super.onPause();
}
@Override
public boolean onIgnitedLocationChanged(Location newLocation) {
...
return true;
}
...
}
<dependency>
<groupId>com.github.ignition</groupId>
<artifactId>ignition-location</artifactId>
<version>0.1</version>
<type>apklib</type>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment