This repository has been archived by the owner on Oct 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Malah
committed
Feb 4, 2019
1 parent
817b9d0
commit 2d4c062
Showing
9 changed files
with
105 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ | |
/build | ||
/captures | ||
.externalNativeBuild | ||
local.properties | ||
local.properties | ||
app/src/debug/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
# Projet MMM | ||
|
||
## Binômes | ||
* Gwénolé LE HENAF | ||
* Charles LARZILLIERE | ||
* Gwénolé LE HENAFF | ||
* Hugo BANNIER | ||
|
||
## Technologies | ||
* Android | ||
* Java 8 | ||
* Gradle | ||
* Lombok | ||
|
||
## Build | ||
Ajouter la clé API de google map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/src/main/java/fr/istic/hbmlh/photoloc/MapsActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package fr.istic.hbmlh.photoloc; | ||
|
||
import android.support.v4.app.FragmentActivity; | ||
import android.os.Bundle; | ||
|
||
import com.google.android.gms.maps.CameraUpdateFactory; | ||
import com.google.android.gms.maps.GoogleMap; | ||
import com.google.android.gms.maps.OnMapReadyCallback; | ||
import com.google.android.gms.maps.SupportMapFragment; | ||
import com.google.android.gms.maps.model.LatLng; | ||
import com.google.android.gms.maps.model.MarkerOptions; | ||
|
||
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback { | ||
|
||
private GoogleMap mMap; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_maps); | ||
// Obtain the SupportMapFragment and get notified when the map is ready to be used. | ||
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() | ||
.findFragmentById(R.id.map); | ||
mapFragment.getMapAsync(this); | ||
} | ||
|
||
|
||
/** | ||
* Manipulates the map once available. | ||
* This callback is triggered when the map is ready to be used. | ||
* This is where we can add markers or lines, add listeners or move the camera. In this case, | ||
* we just add a marker near Sydney, Australia. | ||
* If Google Play services is not installed on the device, the user will be prompted to install | ||
* it inside the SupportMapFragment. This method will only be triggered once the user has | ||
* installed Google Play services and returned to the app. | ||
*/ | ||
@Override | ||
public void onMapReady(GoogleMap googleMap) { | ||
mMap = googleMap; | ||
|
||
// Add a marker in Sydney and move the camera | ||
LatLng sydney = new LatLng(-34, 151); | ||
mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney")); | ||
mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<fragment xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:map="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/map" | ||
android:name="com.google.android.gms.maps.SupportMapFragment" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".MapsActivity" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<resources> | ||
<!-- | ||
TODO: Before you release your application, you need a Google Maps API key. | ||
To do this, you can either add your release key credentials to your existing | ||
key, or create a new key. | ||
Note that this file specifies the API key for the release build target. | ||
If you have previously set up a key for the debug target with the debug signing certificate, | ||
you will also need to set up a key for your release certificate. | ||
Follow the directions here: | ||
https://developers.google.com/maps/documentation/android/signup | ||
Once you have your key (it starts with "AIza"), replace the "google_maps_key" | ||
string in this file. | ||
--> | ||
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">YOUR_KEY_HERE</string> | ||
</resources> |