Skip to content

Commit 39845ce

Browse files
authored
Merge pull request #17 from sofwerx/scottlandis
merge Scottlandis
2 parents dd156e1 + 62e0664 commit 39845ce

55 files changed

Lines changed: 2994 additions & 1021 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ buildscript {
55
repositories {
66
google()
77
jcenter()
8+
mavenLocal()
89
}
910
dependencies {
1011
classpath 'com.android.tools.build:gradle:3.1.4'
@@ -19,6 +20,7 @@ allprojects {
1920
repositories {
2021
google()
2122
jcenter()
23+
maven { url 'https://jitpack.io' } //for charts
2224
}
2325
}
2426

torgi/build.gradle

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
applicationId "org.sofwerx.torgi"
77
minSdkVersion 24
88
targetSdkVersion 27
9-
versionCode 1
10-
versionName "1.0"
9+
versionCode 2
10+
versionName "0.3"
1111
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1212
externalNativeBuild {
1313
cmake {
@@ -26,16 +26,38 @@ android {
2626
// path "CMakeLists.txt"
2727
// }
2828
// }
29+
flavorDimensions "version"
30+
productFlavors {
31+
logger {
32+
dimension "version"
33+
applicationId "org.sofwerx.torgi.logger"
34+
versionNameSuffix "-logger"
35+
}
36+
viewer {
37+
dimension "version"
38+
applicationId "org.sofwerx.torgi.viewer"
39+
versionNameSuffix "-viewer"
40+
}
41+
}
42+
43+
compileOptions {
44+
targetCompatibility 1.8
45+
sourceCompatibility 1.8
46+
}
2947
}
3048

3149
dependencies {
32-
implementation fileTree(include: ['*.jar'], dir: 'libs')
33-
implementation project(':geopackage-sdk')
50+
//implementation fileTree(include: ['*.jar'], dir: 'libs')
51+
//implementation project(':geopackage-sdk')
3452

53+
viewerImplementation 'com.github.PhilJay:MPAndroidChart:v3.0.3' //for charts
54+
viewerImplementation 'org.osmdroid:osmdroid-android:6.0.2'
55+
implementation 'mil.nga.geopackage:geopackage-android:3.0.2'
3556
implementation 'com.android.support:appcompat-v7:27.1.1'
36-
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
57+
viewerImplementation 'com.android.support.constraint:constraint-layout:1.1.3'
58+
//implementation 'com.google.android.gms:play-services-maps:15.0.1'
3759
implementation 'com.android.support:design:27.1.1'
3860
testImplementation 'junit:junit:4.12'
3961
androidTestImplementation 'com.android.support.test:runner:1.0.2'
4062
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
41-
}
63+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package org.sofwerx.torgi.ui;
2+
3+
import android.os.Bundle;
4+
import android.widget.TextView;
5+
6+
import org.sofwerx.torgi.R;
7+
8+
public class MainActivity extends AbstractTORGIActivity {
9+
private TextView status;
10+
11+
@Override
12+
public void onCreate(Bundle savedInstanceState) {
13+
super.onCreate(savedInstanceState);
14+
status = findViewById(R.id.textView);
15+
}
16+
17+
@Override
18+
public void onResume() {
19+
super.onResume();
20+
if (permissionsPassed)
21+
status.setText(getString(R.string.notification));
22+
else
23+
status.setText(getString(R.string.torgi_not_running));
24+
}
25+
26+
@Override
27+
protected int getLayout() {
28+
return R.layout.activity_logger;
29+
}
30+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:orientation="vertical"
8+
tools:context=".ui.MainActivity">
9+
10+
<ImageView
11+
android:id="@+id/imageView"
12+
android:layout_width="80dp"
13+
android:layout_height="80dp"
14+
android:layout_centerInParent="true"
15+
android:src="@drawable/icon_gnns" />
16+
17+
<TextView
18+
android:id="@+id/textView"
19+
android:layout_width="wrap_content"
20+
android:layout_height="wrap_content"
21+
android:layout_below="@+id/imageView"
22+
android:layout_centerHorizontal="true"
23+
android:gravity="center"
24+
android:text="@string/torgi_not_running"
25+
android:textSize="20sp" />
26+
</RelativeLayout>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">TORGI Logger</string>
3+
</resources>

torgi/src/main/AndroidManifest.xml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,27 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="org.sofwerx.torgi">
44
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
5-
<uses-permission android:name="android.permission.SEND_SMS" />
65
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
7-
<uses-permission android:name="android.permission.WAKE_LOCK" />
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
8+
<uses-feature android:name="android.hardware.location.gps" />
89

910
<application
1011
android:icon="@mipmap/ic_launcher"
1112
android:label="@string/app_name"
1213
android:roundIcon="@mipmap/ic_launcher_round"
1314
android:supportsRtl="true"
1415
android:theme="@style/AppTheme">
16+
17+
<service android:name="org.sofwerx.torgi.service.TorgiService"/>
18+
1519
<activity
16-
android:name=".MainActivity"
17-
android:label="@string/app_name"
18-
android:theme="@style/AppTheme.NoActionBar">
20+
android:name=".ui.MainActivity"
21+
android:label="@string/app_name">
1922
<intent-filter>
2023
<action android:name="android.intent.action.MAIN" />
2124
<category android:name="android.intent.category.LAUNCHER" />
2225
</intent-filter>
23-
<intent-filter>
24-
<action android:name="android.intent.action.VIEW" />
25-
<category android:name="android.intent.category.DEFAULT" />
26-
<data android:mimeType="vnd.android-dir/mms-sms" />
27-
</intent-filter>
28-
<intent-filter>
29-
<action android:name="android.intent.action.VIEW" />
30-
<action android:name="android.intent.action.SENDTO" />
31-
<category android:name="android.intent.category.DEFAULT" />
32-
<category android:name="android.intent.category.BROWSABLE" />
33-
<data android:scheme="sms" />
34-
<data android:scheme="smsto" />
35-
</intent-filter>
36-
<intent-filter>
37-
<action android:name="android.intent.action.SEND" />
38-
<category android:name="android.intent.category.DEFAULT" />
39-
<data android:mimeType="text/plain" />
40-
</intent-filter>
4126
</activity>
42-
4327
</application>
44-
4528
</manifest>

0 commit comments

Comments
 (0)