Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2cf3b9a479 |
@ -1,14 +1,14 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion 28
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "hendrikschutter.com.externgnss"
|
applicationId "fmaps.grabow.com.externGNSS"
|
||||||
minSdkVersion 17
|
minSdkVersion 14
|
||||||
targetSdkVersion 30
|
targetSdkVersion 28
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
@ -20,12 +20,11 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||||
implementation 'pub.devrel:easypermissions:3.0.0'
|
implementation 'pub.devrel:easypermissions:2.0.1'
|
||||||
implementation 'com.google.android.material:material:1.0.0'
|
implementation 'com.android.support:design:28.0.0'
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||||
implementation 'com.github.mik3y:usb-serial-for-android:3.4.4'
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,26 @@
|
|||||||
|
package fmaps.grabow.com.externGNSS;
|
||||||
|
|
||||||
|
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 <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4.class)
|
||||||
|
public class ExampleInstrumentedTest {
|
||||||
|
@Test
|
||||||
|
public void useAppContext() {
|
||||||
|
// Context of the app under test.
|
||||||
|
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||||
|
|
||||||
|
assertEquals("fmaps.grabow.com.externGNSS", appContext.getPackageName());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="hendrikschutter.com.externgnss">
|
package="externGNSS">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
@ -12,8 +12,7 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity android:name="hendrikschutter.com.externgnss.MainActivity"
|
<activity android:name="fmaps.grabow.com.externGNSS.MainActivity">
|
||||||
android:exported="true">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
|||||||
@ -1,104 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
width="576px"
|
|
||||||
height="576px"
|
|
||||||
viewBox="0 0 576 576"
|
|
||||||
version="1.1"
|
|
||||||
id="SVGRoot"
|
|
||||||
sodipodi:docname="Zeichnung.svg"
|
|
||||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview14"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
showgrid="true"
|
|
||||||
inkscape:zoom="1.1937961"
|
|
||||||
inkscape:cx="360.61435"
|
|
||||||
inkscape:cy="288.99408"
|
|
||||||
inkscape:window-width="1920"
|
|
||||||
inkscape:window-height="1011"
|
|
||||||
inkscape:window-x="1680"
|
|
||||||
inkscape:window-y="0"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="layer1">
|
|
||||||
<inkscape:grid
|
|
||||||
type="xygrid"
|
|
||||||
id="grid10321" />
|
|
||||||
</sodipodi:namedview>
|
|
||||||
<defs
|
|
||||||
id="defs9">
|
|
||||||
<rect
|
|
||||||
x="129.68106"
|
|
||||||
y="372.2285"
|
|
||||||
width="443.5032"
|
|
||||||
height="143.16513"
|
|
||||||
id="rect2051" />
|
|
||||||
<inkscape:path-effect
|
|
||||||
effect="fillet_chamfer"
|
|
||||||
id="path-effect151"
|
|
||||||
is_visible="true"
|
|
||||||
lpeversion="1"
|
|
||||||
satellites_param="F,0,0,1,0,77,0,1 @ F,0,0,1,0,77,0,1 @ F,0,0,1,0,77,0,1 @ F,0,0,1,0,77,0,1"
|
|
||||||
unit="px"
|
|
||||||
method="auto"
|
|
||||||
mode="F"
|
|
||||||
radius="77"
|
|
||||||
chamfer_steps="1"
|
|
||||||
flexible="false"
|
|
||||||
use_knot_distance="true"
|
|
||||||
apply_no_radius="true"
|
|
||||||
apply_with_radius="true"
|
|
||||||
only_selected="false"
|
|
||||||
hide_knots="false" />
|
|
||||||
</defs>
|
|
||||||
<g
|
|
||||||
inkscape:label="Ebene 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1">
|
|
||||||
<path
|
|
||||||
style="fill:#ff7800;stroke-width:1.07303;image-rendering:optimizeQuality"
|
|
||||||
id="rect84"
|
|
||||||
width="576"
|
|
||||||
height="576"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
inkscape:path-effect="#path-effect151"
|
|
||||||
d="m 77,0 h 422 a 77,77 45 0 1 77,77 v 422 a 77,77 135 0 1 -77,77 H 77 A 77,77 45 0 1 0,499 V 77 A 77,77 135 0 1 77,0 Z"
|
|
||||||
sodipodi:type="rect" />
|
|
||||||
<rect
|
|
||||||
style="fill:#deddda;stroke-width:2.23489"
|
|
||||||
id="rect175"
|
|
||||||
width="486"
|
|
||||||
height="486"
|
|
||||||
x="45"
|
|
||||||
y="45" />
|
|
||||||
<ellipse
|
|
||||||
style="fill:#77767b"
|
|
||||||
id="path455"
|
|
||||||
cx="286.14011"
|
|
||||||
cy="198"
|
|
||||||
rx="38.140095"
|
|
||||||
ry="40" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
id="text2049"
|
|
||||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2051);fill:#000000;fill-opacity:1;stroke:none"
|
|
||||||
transform="translate(48.601894,4.0839844)"><tspan
|
|
||||||
x="129.68164"
|
|
||||||
y="457.16602"
|
|
||||||
id="tspan10337"><tspan
|
|
||||||
style="font-size:96px;font-family:Hack;-inkscape-font-specification:'Hack, Normal'"
|
|
||||||
id="tspan10335">GNSS</tspan></tspan></text>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
@ -1,19 +1,19 @@
|
|||||||
package hendrikschutter.com.externgnss;
|
package fmaps.grabow.com.externGNSS;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.hardware.usb.UsbManager;
|
|
||||||
import android.location.LocationListener;
|
import android.location.LocationListener;
|
||||||
import android.location.LocationManager;
|
import android.location.LocationManager;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import pub.devrel.easypermissions.AfterPermissionGranted;
|
import pub.devrel.easypermissions.AfterPermissionGranted;
|
||||||
import pub.devrel.easypermissions.EasyPermissions;
|
import pub.devrel.easypermissions.EasyPermissions;
|
||||||
|
|
||||||
import static java.lang.Thread.sleep;
|
import static java.lang.Thread.sleep;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
@ -29,14 +29,8 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
startLocationInit();
|
startLocationInit();
|
||||||
UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
|
|
||||||
Log.i("HAG", "init app");
|
|
||||||
ExternGNSS tmp = new ExternGNSS(manager, this);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// From https://github.com/googlesamples/easypermissions
|
// From https://github.com/googlesamples/easypermissions
|
||||||
@Override
|
@Override
|
||||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||||
@ -51,6 +45,20 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
// Already have permission, do the thing
|
// Already have permission, do the thing
|
||||||
Toast.makeText(cntxToastInternGNSSUpdate, "Permission granted!", Toast.LENGTH_SHORT).show();
|
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<String> providers = locationManager.getAllProviders();
|
||||||
|
|
||||||
|
//for (String temp : providers) {
|
||||||
|
// System.out.println(temp);
|
||||||
|
//printProvider(temp);
|
||||||
|
//}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Do not have permissions, request them now
|
// Do not have permissions, request them now
|
||||||
EasyPermissions.requestPermissions(this, "We require location access!!!",
|
EasyPermissions.requestPermissions(this, "We require location access!!!",
|
||||||
@ -58,32 +66,68 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setEditTextLabel(final EditText v, final String str) {
|
/*
|
||||||
|
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() {
|
Runnable myRun = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
v.setText(str);
|
v.setText(str + "\n");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
runOnUiThread(myRun);
|
runOnUiThread(myRun);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
public void setExternGnss( final String str) {
|
private void printOnView(final TextView v, final String str) {
|
||||||
Runnable myRun = new Runnable() {
|
Runnable myRun = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
final TextView v = (TextView) findViewById(R.id.externGNSSTextView);
|
|
||||||
v.append(str);
|
v.append(str);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
runOnUiThread(myRun);
|
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")
|
@SuppressLint("MissingPermission")
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (!EasyPermissions.hasPermissions(this, perms)) {
|
if (!EasyPermissions.hasPermissions(this, perms)) {
|
||||||
// Dummy thread ...
|
// Dummy thread ...
|
||||||
/*
|
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -97,38 +141,50 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
*/
|
|
||||||
} else {
|
} else {
|
||||||
if(locationManager != null){
|
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);
|
||||||
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Worker-Thread
|
// Worker-Thread
|
||||||
new Thread(
|
new Thread(
|
||||||
new Runnable() {
|
new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
while (doRun && (locationManager != null)) {
|
|
||||||
if (locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {
|
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssLatNumber), String.format( "%.6f", locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude()));
|
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssLongNumber), String.format( "%.6f", locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()));
|
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssAltitudeNumber), String.format( "%.2f", locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getAltitude()) + " m");
|
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssAccuracyNumber), String.format( "%.2f", locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getAccuracy()) + " m");
|
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssSatCountNumber), Integer.toString(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getExtras().getInt("satellites")));
|
|
||||||
|
|
||||||
}else{
|
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssLatNumber), "no signal");
|
while (doRun) {
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssLongNumber), "no signal");
|
// Log.i("HAG", "ok");
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssAltitudeNumber), "no signal");
|
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssAccuracyNumber), "no signal");
|
//
|
||||||
setEditTextLabel((EditText) findViewById(R.id.interngnssSatCountNumber),"no signal");
|
// 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() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
//Update
|
//Update
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sleep(10000);
|
sleep(10000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@ -137,6 +193,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
package hendrikschutter.com.externgnss;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.hardware.usb.UsbDeviceConnection;
|
|
||||||
import android.hardware.usb.UsbManager;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.widget.EditText;
|
|
||||||
|
|
||||||
import com.hoho.android.usbserial.driver.UsbSerialDriver;
|
|
||||||
import com.hoho.android.usbserial.driver.UsbSerialPort;
|
|
||||||
import com.hoho.android.usbserial.driver.UsbSerialProber;
|
|
||||||
import com.hoho.android.usbserial.util.SerialInputOutputManager;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ExternGNSS implements SerialInputOutputManager.Listener {
|
|
||||||
private MainActivity uiactivity;
|
|
||||||
ExternGNSS(UsbManager manager, MainActivity mainactivity) {
|
|
||||||
Log.i("HAG", "init extern gnss");
|
|
||||||
this.uiactivity = mainactivity;
|
|
||||||
// Find all available drivers from attached devices.
|
|
||||||
List<UsbSerialDriver> availableDrivers = UsbSerialProber.getDefaultProber().findAllDrivers(manager);
|
|
||||||
if (availableDrivers.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Open a connection to the first available driver.
|
|
||||||
UsbSerialDriver driver = availableDrivers.get(0);
|
|
||||||
UsbDeviceConnection connection = manager.openDevice(driver.getDevice());
|
|
||||||
if (connection == null) {
|
|
||||||
// add UsbManager.requestPermission(driver.getDevice(), ..) handling here
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
UsbSerialPort port = driver.getPorts().get(0); // Most devices have just one port (port 0)
|
|
||||||
try {
|
|
||||||
port.open(connection);
|
|
||||||
port.setParameters(9600, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_NONE);
|
|
||||||
|
|
||||||
SerialInputOutputManager usbIoManager = new SerialInputOutputManager(port, this);
|
|
||||||
usbIoManager.start();
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNewData(byte[] data) {
|
|
||||||
//runOnUiThread(() -> { textView.append(new String(data)); });
|
|
||||||
Log.i("HAG", new String(data));
|
|
||||||
if( this.uiactivity != null){
|
|
||||||
this.uiactivity.setExternGnss(new String(data));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRunError(Exception e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
34
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="78.5885"
|
||||||
|
android:endY="90.9159"
|
||||||
|
android:startX="48.7653"
|
||||||
|
android:startY="61.0927"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000" />
|
||||||
|
</vector>
|
||||||
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#008577"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
||||||
@ -1,22 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<group android:scaleX="0.084375"
|
|
||||||
android:scaleY="0.084375"
|
|
||||||
android:translateX="29.7"
|
|
||||||
android:translateY="29.7">
|
|
||||||
<path
|
|
||||||
android:pathData="m77,0h422a77,77 45,0 1,77 77v422a77,77 135,0 1,-77 77H77A77,77 45,0 1,0 499V77A77,77 135,0 1,77 0Z"
|
|
||||||
android:strokeWidth="1.07303"
|
|
||||||
android:fillColor="#ff7800"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M45,45h486v486h-486z"
|
|
||||||
android:strokeWidth="2.23489"
|
|
||||||
android:fillColor="#deddda"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M248,198a38.14,40 0,1 0,76.28 0a38.14,40 0,1 0,-76.28 0z"
|
|
||||||
android:fillColor="#77767b"/>
|
|
||||||
</group>
|
|
||||||
</vector>
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
@ -7,157 +7,15 @@
|
|||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/interngnssLongTextView"
|
android:id="@+id/interngnss"
|
||||||
android:layout_width="70dp"
|
android:layout_width="390dp"
|
||||||
android:layout_height="32dp"
|
android:layout_height="46dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="21dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="21dp"
|
||||||
android:text="Long:"
|
android:layout_marginTop="176dp"
|
||||||
android:textSize="18sp"
|
android:text="TextView"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/interngnssLongNumber"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/interngnssLatTextView"
|
|
||||||
android:layout_width="70dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:text="Lat:"
|
|
||||||
android:textSize="18sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/interngnssLatNumber"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/interngnssAltitudeTextView"
|
|
||||||
android:layout_width="70dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:text="Altitude:"
|
|
||||||
android:textSize="18sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/interngnssAltitudeNumber"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/interngnssNameTextView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:text="Intern GNSS Receiver"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
<TextView
|
|
||||||
android:id="@+id/interngnssAccuracyTextView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:text="Accuracy:"
|
|
||||||
android:textSize="18sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/interngnssAccuracyNumber"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/interngnssSatCountTextView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:text="Satellites:"
|
|
||||||
android:textSize="18sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/interngnssSatCountNumber"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/interngnssLatNumber"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="128dp"
|
|
||||||
android:layout_marginLeft="128dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:cursorVisible="false"
|
|
||||||
android:ems="16"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:inputType="numberDecimal"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/interngnssNameTextView" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/interngnssLongNumber"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="128dp"
|
|
||||||
android:layout_marginLeft="128dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:cursorVisible="false"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:inputType="numberDecimal"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/interngnssLatNumber" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/interngnssAltitudeNumber"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="128dp"
|
|
||||||
android:layout_marginLeft="128dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:cursorVisible="false"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:inputType="numberDecimal"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/interngnssLongNumber" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/interngnssAccuracyNumber"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="128dp"
|
|
||||||
android:layout_marginLeft="128dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:cursorVisible="false"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:inputType="numberDecimal"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/interngnssAltitudeNumber" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/interngnssSatCountNumber"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="128dp"
|
|
||||||
android:layout_marginLeft="128dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:cursorVisible="false"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:inputType="number"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/interngnssAccuracyNumber" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/externGNSSTextView"
|
|
||||||
android:layout_width="360dp"
|
|
||||||
android:layout_height="347dp"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="300dp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".PermissionRequester">
|
tools:context=".PermissionRequester">
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 15 KiB |
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="ic_launcher_background">#FFFFFF</color>
|
|
||||||
</resources>
|
|
||||||
@ -1,3 +1,3 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">ExternGNSS</string>
|
<string name="app_name">Extern GNSS</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -0,0 +1,17 @@
|
|||||||
|
package fmaps.grabow.com.externGNSS;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Example local unit test, which will execute on the development machine (host).
|
||||||
|
*
|
||||||
|
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
public class ExampleUnitTest {
|
||||||
|
@Test
|
||||||
|
public void addition_isCorrect() {
|
||||||
|
assertEquals(4, 2 + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||||
@ -16,8 +16,7 @@ buildscript {
|
|||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
jcenter()
|
||||||
maven { url 'https://jitpack.io' }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,6 @@
|
|||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
android.enableJetifier=true
|
|
||||||
android.useAndroidX=true
|
|
||||||
org.gradle.jvmargs=-Xmx1536m
|
org.gradle.jvmargs=-Xmx1536m
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
|||||||