aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/org/traccar/manager/MainActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/org/traccar/manager/MainActivity.java')
-rw-r--r--app/src/main/java/org/traccar/manager/MainActivity.java42
1 files changed, 18 insertions, 24 deletions
diff --git a/app/src/main/java/org/traccar/manager/MainActivity.java b/app/src/main/java/org/traccar/manager/MainActivity.java
index 68d5135..c8d202d 100644
--- a/app/src/main/java/org/traccar/manager/MainActivity.java
+++ b/app/src/main/java/org/traccar/manager/MainActivity.java
@@ -1,36 +1,30 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton@traccar.org)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package org.traccar.manager;
+import android.app.Activity;
import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-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 MainActivity extends FragmentActivity implements OnMapReadyCallback {
-
- private GoogleMap map;
+public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
- // 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);
- }
-
- @Override
- public void onMapReady(GoogleMap googleMap) {
- map = googleMap;
-
- LatLng sydney = new LatLng(-34, 151);
- map.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
- map.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}