diff --git a/app/.gitignore b/app/.gitignore
index 42afabf..796b96d 100644
--- a/app/.gitignore
+++ b/app/.gitignore
@@ -1 +1 @@
-/build
\ No newline at end of file
+/build
diff --git a/app/build.gradle b/app/build.gradle
index 0084a45..0ef4ad1 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,48 +1,30 @@
-plugins {
- id 'com.android.application'
- id 'org.jetbrains.kotlin.android'
-}
+apply plugin: 'com.android.application'
android {
- compileSdk 32
-
+ compileSdkVersion 28
defaultConfig {
- applicationId "com.example.externgnss"
- minSdk 28
- targetSdk 32
+ applicationId "fmaps.grabow.com.location001"
+ minSdkVersion 14
+ targetSdkVersion 28
versionCode 1
versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
-
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- buildFeatures {
- viewBinding true
- }
}
dependencies {
-
- implementation 'androidx.core:core-ktx:1.7.0'
- implementation 'androidx.appcompat:appcompat:1.3.0'
- implementation 'com.google.android.material:material:1.4.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
- implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
- testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
-}
\ No newline at end of file
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+ implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+ implementation 'pub.devrel:easypermissions:2.0.1'
+ implementation 'com.android.support:design:28.0.0'
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'com.android.support.test:runner:1.0.2'
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index 481bb43..f1b4245 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -18,4 +18,4 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
+#-renamesourcefileattribute SourceFile
diff --git a/app/src/androidTest/java/com/example/externgnss/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/example/externgnss/ExampleInstrumentedTest.kt
deleted file mode 100644
index bc7287d..0000000
--- a/app/src/androidTest/java/com/example/externgnss/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.example.externgnss
-
-import androidx.test.platform.app.InstrumentationRegistry
-import androidx.test.ext.junit.runners.AndroidJUnit4
-
-import org.junit.Test
-import org.junit.runner.RunWith
-
-import org.junit.Assert.*
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-@RunWith(AndroidJUnit4::class)
-class ExampleInstrumentedTest {
- @Test
- fun useAppContext() {
- // Context of the app under test.
- val appContext = InstrumentationRegistry.getInstrumentation().targetContext
- assertEquals("com.example.externgnss", appContext.packageName)
- }
-}
\ No newline at end of file
diff --git a/app/src/androidTest/java/fmaps/grabow/com/location001/ExampleInstrumentedTest.java b/app/src/androidTest/java/fmaps/grabow/com/location001/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..4710532
--- /dev/null
+++ b/app/src/androidTest/java/fmaps/grabow/com/location001/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package fmaps.grabow.com.location001;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("fmaps.grabow.com.location001", appContext.getPackageName());
+ }
+}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 9dd99dd..28c1d28 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,6 +1,9 @@
+ package="fmaps.grabow.com.location001">
+
+
+
-
+ android:theme="@style/AppTheme">
+
diff --git a/app/src/main/java/com/example/externgnss/MainActivity.kt b/app/src/main/java/com/example/externgnss/MainActivity.kt
deleted file mode 100644
index 27daf72..0000000
--- a/app/src/main/java/com/example/externgnss/MainActivity.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.example.externgnss
-
-import android.os.Bundle
-import com.google.android.material.floatingactionbutton.FloatingActionButton
-import com.google.android.material.snackbar.Snackbar
-import com.google.android.material.tabs.TabLayout
-import androidx.viewpager.widget.ViewPager
-import androidx.appcompat.app.AppCompatActivity
-import android.view.Menu
-import android.view.MenuItem
-import com.example.externgnss.ui.main.SectionsPagerAdapter
-import com.example.externgnss.databinding.ActivityMainBinding
-
-class MainActivity : AppCompatActivity() {
-
- private lateinit var binding: ActivityMainBinding
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
-
- binding = ActivityMainBinding.inflate(layoutInflater)
- setContentView(binding.root)
-
- val sectionsPagerAdapter = SectionsPagerAdapter(this, supportFragmentManager)
- val viewPager: ViewPager = binding.viewPager
- viewPager.adapter = sectionsPagerAdapter
- val tabs: TabLayout = binding.tabs
- tabs.setupWithViewPager(viewPager)
-
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/externgnss/ui/main/PageViewModel.kt b/app/src/main/java/com/example/externgnss/ui/main/PageViewModel.kt
deleted file mode 100644
index 204104b..0000000
--- a/app/src/main/java/com/example/externgnss/ui/main/PageViewModel.kt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.example.externgnss.ui.main
-
-import androidx.lifecycle.LiveData
-import androidx.lifecycle.MutableLiveData
-import androidx.lifecycle.Transformations
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-
-class PageViewModel : ViewModel() {
-
- private val _index = MutableLiveData()
- val text: LiveData = Transformations.map(_index) {
- "Hello world from section: $it"
- }
-
- fun setIndex(index: Int) {
- _index.value = index
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/externgnss/ui/main/PlaceholderFragment.kt b/app/src/main/java/com/example/externgnss/ui/main/PlaceholderFragment.kt
deleted file mode 100644
index 365eb8a..0000000
--- a/app/src/main/java/com/example/externgnss/ui/main/PlaceholderFragment.kt
+++ /dev/null
@@ -1,73 +0,0 @@
-package com.example.externgnss.ui.main
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.TextView
-import androidx.fragment.app.Fragment
-import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProvider
-import com.example.externgnss.R
-import com.example.externgnss.databinding.FragmentMainBinding
-
-/**
- * A placeholder fragment containing a simple view.
- */
-class PlaceholderFragment : Fragment() {
-
- private lateinit var pageViewModel: PageViewModel
- private var _binding: FragmentMainBinding? = null
-
- // This property is only valid between onCreateView and
- // onDestroyView.
- private val binding get() = _binding!!
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- pageViewModel = ViewModelProvider(this).get(PageViewModel::class.java).apply {
- setIndex(arguments?.getInt(ARG_SECTION_NUMBER) ?: 1)
- }
- }
-
- override fun onCreateView(
- inflater: LayoutInflater, container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
-
- _binding = FragmentMainBinding.inflate(inflater, container, false)
- val root = binding.root
-
- val textView: TextView = binding.sectionLabel
- pageViewModel.text.observe(viewLifecycleOwner, Observer {
- textView.text = it
- })
- return root
- }
-
- companion object {
- /**
- * The fragment argument representing the section number for this
- * fragment.
- */
- private const val ARG_SECTION_NUMBER = "section_number"
-
- /**
- * Returns a new instance of this fragment for the given section
- * number.
- */
- @JvmStatic
- fun newInstance(sectionNumber: Int): PlaceholderFragment {
- return PlaceholderFragment().apply {
- arguments = Bundle().apply {
- putInt(ARG_SECTION_NUMBER, sectionNumber)
- }
- }
- }
- }
-
- override fun onDestroyView() {
- super.onDestroyView()
- _binding = null
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/externgnss/ui/main/SectionsPagerAdapter.kt b/app/src/main/java/com/example/externgnss/ui/main/SectionsPagerAdapter.kt
deleted file mode 100644
index a62e786..0000000
--- a/app/src/main/java/com/example/externgnss/ui/main/SectionsPagerAdapter.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.example.externgnss.ui.main
-
-import android.content.Context
-import androidx.fragment.app.Fragment
-import androidx.fragment.app.FragmentManager
-import androidx.fragment.app.FragmentPagerAdapter
-import com.example.externgnss.R
-
-private val TAB_TITLES = arrayOf(
- R.string.tab_text_1,
- R.string.tab_text_2
-)
-
-/**
- * A [FragmentPagerAdapter] that returns a fragment corresponding to
- * one of the sections/tabs/pages.
- */
-class SectionsPagerAdapter(private val context: Context, fm: FragmentManager)
- : FragmentPagerAdapter(fm) {
-
- override fun getItem(position: Int): Fragment {
- // getItem is called to instantiate the fragment for the given page.
- // Return a PlaceholderFragment (defined as a static inner class below).
- return PlaceholderFragment.newInstance(position + 1)
- }
-
- override fun getPageTitle(position: Int): CharSequence? {
- return context.resources.getString(TAB_TITLES[position])
- }
-
- override fun getCount(): Int {
- // Show 2 total pages.
- return 2
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/fmaps/grabow/com/location001/MainActivity.java b/app/src/main/java/fmaps/grabow/com/location001/MainActivity.java
new file mode 100644
index 0000000..b0f37d3
--- /dev/null
+++ b/app/src/main/java/fmaps/grabow/com/location001/MainActivity.java
@@ -0,0 +1,232 @@
+package fmaps.grabow.com.location001;
+
+import android.Manifest;
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.location.LocationListener;
+import android.location.LocationManager;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.util.Log;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import pub.devrel.easypermissions.AfterPermissionGranted;
+import pub.devrel.easypermissions.EasyPermissions;
+
+import static java.lang.Thread.sleep;
+
+public class MainActivity extends AppCompatActivity {
+ private TextView output;
+ private LocationManager locationManager;
+ private boolean doRun = true;
+ private final Context cntxToastInternGNSSUpdate = this;
+ final String[] perms = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.INTERNET};
+ private boolean bChange = true;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ startLocationInit();
+ }
+
+ // From https://github.com/googlesamples/easypermissions
+ @Override
+ public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+ // Forward results to EasyPermissions
+ EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
+ }
+
+ @AfterPermissionGranted(123)
+ private void startLocationInit() {
+ if (EasyPermissions.hasPermissions(this, perms)) {
+ // Already have permission, do the thing
+ Toast.makeText(cntxToastInternGNSSUpdate, "Permission granted!", Toast.LENGTH_SHORT).show();
+
+ // Get the output UI
+ output = (TextView) findViewById(R.id.interngnss);
+
+ // Test print
+ ///printlnOnView(output, "Running!");
+
+ locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
+ //List providers = locationManager.getAllProviders();
+
+ //for (String temp : providers) {
+ // System.out.println(temp);
+ //printProvider(temp);
+ //}
+
+ } else {
+ // Do not have permissions, request them now
+ EasyPermissions.requestPermissions(this, "We require location access!!!",
+ 123, perms);
+ }
+ }
+
+/*
+ private void printProvider(String provider) {
+ LocationProvider info = locationManager.getProvider(provider);
+ output.append("Name: " + info.getName() + "\n");
+ output.append("Accuracy: " + info.getAccuracy() + "\n");
+ output.append("PowerReq.: " + info.getPowerRequirement() + "\n");
+ output.append("CellIDReq.: " + info.requiresCell() + "\n");
+ output.append("NetworkReq.: " + info.requiresNetwork() + "\n");
+ output.append("SatReq.: " + info.requiresSatellite() + "\n\n");
+ }
+ */
+
+
+ // Die Nachfolgenden Methoden können Sie aus einem Worker-Thread aufrufen
+ private void printlnOnView(final TextView v, final String str) {
+ Runnable myRun = new Runnable() {
+ public void run() {
+ v.setText(str + "\n");
+ }
+ };
+ runOnUiThread(myRun);
+ }
+ /*
+ private void printOnView(final TextView v, final String str) {
+ Runnable myRun = new Runnable() {
+ public void run() {
+ v.append(str);
+ }
+ };
+ runOnUiThread(myRun);
+ }
+
+ public void addToString(Location loc) {
+ //Verwendet die Variablen centerLat & centerLng
+ String time = loc.getTime() +"";
+ String latStr = Double.toString(loc.getLatitude());
+ String lngStr = Double.toString(loc.getLongitude());
+ String acc = loc.getAccuracy() + "";
+ String numOfSat = loc.getExtras().getInt("satellites") +"";
+ String satStr = "";
+ String distStr = "";
+ // Bestimme die Distanz (Fix <-> Center)
+ Location locationA = new Location("Center");
+ locationA.setLatitude(Double.valueOf(centerLat));
+ locationA.setLongitude(Double.valueOf(centerLng));
+ Location locationB = new Location("Fix");
+ locationB.setLatitude(Double.valueOf(latStr));
+ locationB.setLongitude(Double.valueOf(lngStr));
+ distStr = locationA.distanceTo(locationB) + "";
+ logString = logString + time + ";"; logString = logString + numOfSat + ";"; logString = logString + distStr +
+ ";"; logString = logString + acc + ";"; logString = logString + latStr + ";"; logString = logString + lngStr
+ + ";"; logString = logString + centerLat + ";"; logString = logString + centerLng + ";"; logString =
+ logString + satStr + ";"; logString = logString + "\n";
+ }
+ */
+
+ @SuppressLint("MissingPermission")
+ @Override
+ protected void onResume() {
+ super.onResume();
+ if (!EasyPermissions.hasPermissions(this, perms)) {
+ // Dummy thread ...
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ while (doRun) {
+ Log.i("HAG", "Just do nothing ...");
+ try {
+ sleep(2000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }).start();
+ } else {
+ locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);
+
+ // Worker-Thread
+ new Thread(
+ new Runnable() {
+ @Override
+ public void run() {
+
+
+ while (doRun) {
+ // Log.i("HAG", "ok");
+
+ //
+ // Aufgabe 3
+ //
+ // Geben Sie via printOnView die getLastKnownLocation() von
+ // Network-Provider und GPS-Provider aus
+ //
+
+ printlnOnView(output, "Lat: " + locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude()
+ + " Long: " + locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()
+ + " Accuracy: " + locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getAccuracy()
+
+
+
+ );
+
+
+ //
+ // Aufgabe 4
+ //
+ // Erzeugen Sie eine WebView und zeigen Sie mittels der WebView
+ // alternierend die Location von Network und GPS auf der Karte an
+ //
+ //
+
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ //Update
+ }
+ });
+
+ try {
+ sleep(10000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }).start();
+
+ }
+ }
+
+ /**
+ * Stop the updates when Activity is paused
+ */
+ @Override
+ protected void onPause() {
+ super.onPause();
+ doRun = false;
+ }
+
+ LocationListener locationListener = new LocationListener() {
+ @Override
+ public void onLocationChanged(android.location.Location location) {
+ //double latitude = location.getLatitude();
+ //double longitude = location.getLongitude();
+ //String msg = "New Latitude: " + latitude + " New Longitude: " + longitude;
+ Toast.makeText(cntxToastInternGNSSUpdate, "Internal GNSS updated", Toast.LENGTH_LONG).show();
+ }
+
+ @Override
+ // This callback will never be invoked on Android Q and above.
+ public void onStatusChanged(String provider, int status, Bundle extras) {
+ // Toast.makeText(mContext, "Status Changed", Toast.LENGTH_LONG).show();
+ }
+
+ @Override
+ public void onProviderEnabled(String provider) {
+ }
+
+ @Override
+ public void onProviderDisabled(String provider) {
+ }
+ };
+}
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
index 2b068d1..1f6bb29 100644
--- a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -4,13 +4,17 @@
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
-
+
-
\ No newline at end of file
+
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
index 07d5da9..0d025f9 100644
--- a/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -5,7 +5,7 @@
android:viewportWidth="108"
android:viewportHeight="108">
-
+ android:id="@+id/linearLayout"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_permission_requester.xml b/app/src/main/res/layout/activity_permission_requester.xml
new file mode 100644
index 0000000..6a2c0d0
--- /dev/null
+++ b/app/src/main/res/layout/activity_permission_requester.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml
deleted file mode 100644
index 0a90c04..0000000
--- a/app/src/main/res/layout/fragment_main.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..898f3ed
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index c209e78..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dffca36
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index b2dfe3d..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..64ba76f
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d6..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dae5e08
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611d..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..e5ed465
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a307..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..14ed0af
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a695..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..b0907ca
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..d8ae031
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f50..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..2c18de9
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d642..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..beed3cd
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae3..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/values-land/dimens.xml b/app/src/main/res/values-land/dimens.xml
deleted file mode 100644
index 22d7f00..0000000
--- a/app/src/main/res/values-land/dimens.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- 48dp
-
\ No newline at end of file
diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index 69e71c5..0000000
--- a/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/values-w1240dp/dimens.xml b/app/src/main/res/values-w1240dp/dimens.xml
deleted file mode 100644
index d73f4a3..0000000
--- a/app/src/main/res/values-w1240dp/dimens.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- 200dp
-
\ No newline at end of file
diff --git a/app/src/main/res/values-w600dp/dimens.xml b/app/src/main/res/values-w600dp/dimens.xml
deleted file mode 100644
index 22d7f00..0000000
--- a/app/src/main/res/values-w600dp/dimens.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- 48dp
-
\ No newline at end of file
diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml
deleted file mode 100644
index 9309de9..0000000
--- a/app/src/main/res/values-w820dp/dimens.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- 64dp
-
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index f8c6127..69b2233 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,10 +1,6 @@
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
-
\ No newline at end of file
+ #008577
+ #00574B
+ #D81B60
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
deleted file mode 100644
index 0a87b6e..0000000
--- a/app/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
- 16dp
- 16dp
- 16dp
- 16dp
- 8dp
-
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 172ef13..8b4c8a6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,5 +1,3 @@
- ExternGnss
- Tab 1
- Tab 2
-
\ No newline at end of file
+ Location001
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..5885930
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
deleted file mode 100644
index 7c17845..0000000
--- a/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/test/java/com/example/externgnss/ExampleUnitTest.kt b/app/src/test/java/com/example/externgnss/ExampleUnitTest.kt
deleted file mode 100644
index 61b4b55..0000000
--- a/app/src/test/java/com/example/externgnss/ExampleUnitTest.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.example.externgnss
-
-import org.junit.Test
-
-import org.junit.Assert.*
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
- @Test
- fun addition_isCorrect() {
- assertEquals(4, 2 + 2)
- }
-}
\ No newline at end of file
diff --git a/app/src/test/java/fmaps/grabow/com/location001/ExampleUnitTest.java b/app/src/test/java/fmaps/grabow/com/location001/ExampleUnitTest.java
new file mode 100644
index 0000000..26092c7
--- /dev/null
+++ b/app/src/test/java/fmaps/grabow/com/location001/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package fmaps.grabow.com.location001;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 0ccd671..89d187a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,10 +1,25 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
-plugins {
- id 'com.android.application' version '7.1.2' apply false
- id 'com.android.library' version '7.1.2' apply false
- id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
+
+buildscript {
+ repositories {
+ google()
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.1.2'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
}
task clean(type: Delete) {
delete rootProject.buildDir
-}
\ No newline at end of file
+}
diff --git a/gradle.properties b/gradle.properties
index cd0519b..82618ce 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,18 +6,10 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app"s APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
-# Enables namespacing of each library's R class so that its R class includes only the
-# resources declared in the library itself and none from the library's dependencies,
-# thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
\ No newline at end of file
+
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index e708b1c..f6b961f 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 16d39ed..7e6feef 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Mar 27 20:33:38 CEST 2022
+#Tue May 07 08:39:57 CEST 2019
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
diff --git a/gradlew b/gradlew
old mode 100755
new mode 100644
index 4f906e0..cccdd3d
--- a/gradlew
+++ b/gradlew
@@ -1,21 +1,5 @@
#!/usr/bin/env sh
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
##############################################################################
##
## Gradle start up script for UN*X
@@ -44,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -82,7 +66,6 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -126,11 +109,10 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
@@ -156,19 +138,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
else
eval `echo args$i`="\"$arg\""
fi
- i=`expr $i + 1`
+ i=$((i+1))
done
case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@@ -177,9 +159,14 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
-APP_ARGS=`save "$@"`
+APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index ac1b06f..e95643d 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,19 +1,3 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -29,18 +13,15 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
+if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +35,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-if exist "%JAVA_EXE%" goto execute
+if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,14 +45,28 @@ echo location of your Java installation.
goto fail
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
diff --git a/settings.gradle b/settings.gradle
index 9b9ae2a..e7b4def 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,16 +1 @@
-pluginManagement {
- repositories {
- gradlePluginPortal()
- google()
- mavenCentral()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-rootProject.name = "ExternGnss"
include ':app'