├── .gitignore
├── .gitmodules
├── .idea
├── .name
├── compiler.xml
├── copyright
│ ├── NextGIS_Logger.xml
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── scopes
│ └── scope_settings.xml
└── vcs.xml
├── CHANGELOG.md
├── LICENSE
├── Logger.iml
├── README.md
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── proguard-logger.txt
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── nextgis
│ │ └── logger
│ │ ├── LoggerApplication.java
│ │ ├── LoggerService.java
│ │ ├── UI
│ │ ├── activity
│ │ │ ├── AboutActivity.java
│ │ │ ├── BindActivity.java
│ │ │ ├── IntroActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MarkActivity.java
│ │ │ ├── NGIDLoginActivity.java
│ │ │ ├── NGIDSettingsActivity.java
│ │ │ ├── NGWLoginActivity.java
│ │ │ ├── PreferencesActivity.java
│ │ │ ├── ProgressBarActivity.java
│ │ │ └── SessionsActivity.java
│ │ ├── fragment
│ │ │ ├── AccountPreferenceFragment.java
│ │ │ ├── MainPreferenceFragment.java
│ │ │ ├── NGIDLoginFragment.java
│ │ │ ├── NGIDSettingsFragment.java
│ │ │ ├── NGWLoginFragment.java
│ │ │ └── SensorsPreferenceFragment.java
│ │ └── view
│ │ │ ├── AudioCalibratePreference.java
│ │ │ ├── IntEditTextPreference.java
│ │ │ ├── SlidingTabLayout.java
│ │ │ └── SlidingTabStrip.java
│ │ ├── engines
│ │ ├── ArduinoEngine.java
│ │ ├── AudioEngine.java
│ │ ├── BaseEngine.java
│ │ ├── CellEngine.java
│ │ ├── GPSEngine.java
│ │ ├── InfoColumn.java
│ │ ├── InfoItem.java
│ │ ├── SensorEngine.java
│ │ └── WiFiEngine.java
│ │ ├── livedata
│ │ ├── InfoActivity.java
│ │ ├── InfoCellFragment.java
│ │ ├── InfoExternalsFragment.java
│ │ ├── InfoFragment.java
│ │ └── InfoSensorsFragment.java
│ │ └── util
│ │ ├── AccountAuthenticator.java
│ │ ├── ApkDownloader.java
│ │ ├── FileUtil.java
│ │ ├── LoggerConstants.java
│ │ ├── LoggerVectorLayer.java
│ │ ├── MarkName.java
│ │ ├── NGIDUtils.java
│ │ ├── NGWAccountAuthenticator.java
│ │ └── UiUtil.java
│ └── res
│ ├── anim
│ └── rotation.xml
│ ├── drawable-hdpi
│ ├── ic_add_white_24dp.png
│ ├── ic_arrow_back_white_24dp.png
│ ├── ic_bluetooth_white_24dp.png
│ ├── ic_cloud_upload_white_24dp.png
│ ├── ic_delete_white_24dp.png
│ ├── ic_insert_chart_white_24dp.png
│ ├── ic_launcher.png
│ ├── ic_ngw.png
│ ├── ic_pause_white_24dp.png
│ ├── ic_remove_white_24dp.png
│ ├── ic_select_all_white_24dp.png
│ ├── ic_share_white_24dp.png
│ ├── ic_status_notification.png
│ └── ic_undo_white_24dp.png
│ ├── drawable-mdpi
│ ├── ic_add_white_24dp.png
│ ├── ic_arrow_back_white_24dp.png
│ ├── ic_bluetooth_white_24dp.png
│ ├── ic_cloud_upload_white_24dp.png
│ ├── ic_delete_white_24dp.png
│ ├── ic_insert_chart_white_24dp.png
│ ├── ic_launcher.png
│ ├── ic_ngw.png
│ ├── ic_pause_white_24dp.png
│ ├── ic_remove_white_24dp.png
│ ├── ic_select_all_white_24dp.png
│ ├── ic_share_white_24dp.png
│ ├── ic_status_notification.png
│ └── ic_undo_white_24dp.png
│ ├── drawable-xhdpi
│ ├── ic_add_white_24dp.png
│ ├── ic_arrow_back_white_24dp.png
│ ├── ic_bluetooth_white_24dp.png
│ ├── ic_cloud_upload_white_24dp.png
│ ├── ic_delete_white_24dp.png
│ ├── ic_insert_chart_white_24dp.png
│ ├── ic_launcher.png
│ ├── ic_ngw.png
│ ├── ic_pause_white_24dp.png
│ ├── ic_remove_white_24dp.png
│ ├── ic_select_all_white_24dp.png
│ ├── ic_share_white_24dp.png
│ ├── ic_status_notification.png
│ └── ic_undo_white_24dp.png
│ ├── drawable-xxhdpi
│ ├── ic_add_white_24dp.png
│ ├── ic_arrow_back_white_24dp.png
│ ├── ic_bluetooth_white_24dp.png
│ ├── ic_cloud_upload_white_24dp.png
│ ├── ic_delete_white_24dp.png
│ ├── ic_insert_chart_white_24dp.png
│ ├── ic_launcher.png
│ ├── ic_ngw.png
│ ├── ic_pause_white_24dp.png
│ ├── ic_remove_white_24dp.png
│ ├── ic_select_all_white_24dp.png
│ ├── ic_share_white_24dp.png
│ ├── ic_status_notification.png
│ └── ic_undo_white_24dp.png
│ ├── drawable-xxxhdpi
│ ├── ic_add_white_24dp.png
│ ├── ic_arrow_back_white_24dp.png
│ ├── ic_bluetooth_white_24dp.png
│ ├── ic_cloud_upload_white_24dp.png
│ ├── ic_delete_white_24dp.png
│ ├── ic_insert_chart_white_24dp.png
│ ├── ic_launcher.png
│ ├── ic_pause_white_24dp.png
│ ├── ic_remove_white_24dp.png
│ ├── ic_select_all_white_24dp.png
│ ├── ic_share_white_24dp.png
│ └── ic_undo_white_24dp.png
│ ├── drawable
│ ├── nextgis.png
│ ├── nextgis_addition.png
│ └── title_strip.xml
│ ├── layout
│ ├── activity_about.xml
│ ├── activity_info.xml
│ ├── activity_intro.xml
│ ├── activity_main.xml
│ ├── activity_mark.xml
│ ├── activity_ngid_login.xml
│ ├── activity_ngw_login.xml
│ ├── activity_sessions.xml
│ ├── dialog_audio_calibrate.xml
│ ├── dialog_edit_mark.xml
│ ├── divider.xml
│ ├── fab.xml
│ ├── fragment_about.xml
│ ├── fragment_contacts.xml
│ ├── fragment_info_cell.xml
│ ├── fragment_info_external.xml
│ ├── fragment_info_sensors.xml
│ ├── fragment_intro.xml
│ ├── fragment_intro_login.xml
│ ├── fragment_ngid_login.xml
│ ├── fragment_ngw_login.xml
│ ├── info_cell_active_row.xml
│ ├── info_cell_neighbour_row.xml
│ ├── info_external_row.xml
│ ├── info_item.xml
│ └── item_value.xml
│ ├── menu
│ ├── main.xml
│ ├── mark.xml
│ └── sessions.xml
│ ├── values-ru
│ └── strings.xml
│ ├── values-v21
│ ├── colors.xml
│ └── styles.xml
│ ├── values-w820dp
│ └── dimens.xml
│ ├── values
│ ├── arrays.xml
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── loaders.xml
│ ├── strings.xml
│ └── styles.xml
│ └── xml
│ ├── authenticator.xml
│ ├── headers.xml
│ ├── preferences.xml
│ ├── preferences_main.xml
│ ├── preferences_ngid.xml
│ ├── preferences_ngw.xml
│ ├── preferences_sensors.xml
│ ├── provider_paths.xml
│ └── syncadapter.xml
├── arduino
├── sample_scheme.png
└── sample_sketch.ino
├── art
├── applicationIcon.svg
├── applicationIconNotification.svg
└── logger_img.png
├── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 |
8 | ### JetBrains template
9 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
10 |
11 | *.iml
12 |
13 | ## Directory-based project format:
14 | .idea/
15 | # if you remove the above rule, at least ignore the following:
16 |
17 | # User-specific stuff:
18 | # .idea/workspace.xml
19 | # .idea/tasks.xml
20 | # .idea/dictionaries
21 |
22 | # Sensitive or high-churn files:
23 | # .idea/dataSources.ids
24 | # .idea/dataSources.xml
25 | # .idea/sqlDataSources.xml
26 | # .idea/dynamic.xml
27 | # .idea/uiDesigner.xml
28 |
29 | # Gradle:
30 | # .idea/gradle.xml
31 | # .idea/libraries
32 |
33 | # Mongo Explorer plugin:
34 | # .idea/mongoSettings.xml
35 |
36 | ## File-based project format:
37 | *.ipr
38 | *.iws
39 |
40 | ## Plugin-specific files:
41 |
42 | # IntelliJ
43 | /out/
44 |
45 | # mpeltonen/sbt-idea plugin
46 | .idea_modules/
47 |
48 | # JIRA plugin
49 | atlassian-ide-plugin.xml
50 |
51 | # Crashlytics plugin (for Android Studio and IntelliJ)
52 | com_crashlytics_export_strings.xml
53 | crashlytics.properties
54 | crashlytics-build.properties
55 |
56 |
57 | ### Android template
58 | # Built application files
59 | *.apk
60 | *.ap_
61 |
62 | # Files for the Dalvik VM
63 | *.dex
64 |
65 | # Java class files
66 | *.class
67 |
68 | # Generated files
69 | bin/
70 | gen/
71 |
72 | # Gradle files
73 | .gradle/
74 | build/
75 | /*/build/
76 |
77 | # Local configuration file (sdk path, etc)
78 | local.properties
79 |
80 | # Proguard folder generated by Eclipse
81 | proguard/
82 |
83 | # Log Files
84 | *.log
85 |
86 |
87 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "maplib"]
2 | path = maplib
3 | url = https://github.com/nextgis/android_maplib
4 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | nextgislogger
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/NextGIS_Logger.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | Maven Android API 19 Platform
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | Changelog
2 | ***
3 | ## version 1.5.2 (12.02.2016)
4 | * Added microphone level calibration
5 | * Bugfixing
6 |
7 | ***
8 | ## version 1.5.1 (28.01.2016)
9 | * Added LTE support
10 | * Added roaming status
11 | * Disabled sensors excluded from log
12 | * Bugfixing
13 |
14 | ***
15 | ## version 1.5 (16.07.2015)
16 | * Added data from external sensors (Supports only [Arduino](https://github.com/nextgis/nextgislogger/wiki/External-sensors-(Arduino)) now)
17 | * Added audio data to sensors
18 | * Added button to add new mark
19 | * Added human-readable datetime column to log files
20 | * UI changes
21 | * Bugfixing
22 |
23 | ***
24 | ## version 1.4.1 (12.04.2015)
25 | * Bugfixing
26 |
27 | ***
28 | ## version 1.4 (05.04.2015)
29 | * Added live data screen accessed at any screen by FAB
30 | * Added undo action to last added mark by FAB
31 | * Added volume buttons mark control (previous/next)
32 | * Changed some icons
33 | * Bugfixing
34 |
35 | ***
36 | ## version 1.3 (01.03.2015)
37 | * Added GPS data (lat/lon/alt/accuracy/speed/bearing) to sensor log
38 | * Added default chooser action for presets
39 | * Added progress bar to each screen indicating current service status
40 | * Added vibrate on mark click
41 | * Other improvements
42 |
43 | ## version 1.2.3 (23.12.2014)
44 | * Added select/deselect all button to sessions screen
45 | * Added keep screen on at Markers screen (check settings)
46 | * Bugfixing
47 |
48 | ## version 1.2.2 (18.12.2014)
49 | * Added sessions screen
50 | * Added about screen
51 | * Added current log version to device_info.txt
52 | * Added new styles for main screen
53 | * Fixed sharing fail to Google Drive and GMail
54 | * Changed select categories file dialog
55 | * Keyboard not shows again after it was hidden
56 |
57 | ## version 1.2.1 (13.12.2014)
58 | * Added sharing logs to menu
59 | * Added deleting logs to menu
60 | * Added Russian localization
61 |
62 | ## version 1.2 (09.12.2014)
63 | * Added [sessions](https://github.com/nextgis/nextgislogger/wiki/About)
64 | * Added [separate activity for marks](https://github.com/nextgis/nextgislogger/wiki/About)
65 | * Added data from [sensors](https://github.com/nextgis/nextgislogger/wiki/Overview): orientation, magnetic_field, gyroscope
66 | * Added device info in [device_info.txt](https://github.com/nextgis/nextgislogger/wiki/Overview) for each session
67 | * Added marks count and records count info for each session.
68 | * Changed minimum Android version to 3.0 - Honeycomb (API 11), maximum 5.0 - Lollipop (API 21)
69 | * Changed package name to "NextGIS Logger" (com.nextgis.logger). Please reconfigure your preferences.
70 | * Changed cell data: "Power" in header instead RSSI, "-1" instead Integer.MAX_VALUE on API 17+
71 | * Сode refactoring
72 |
73 | ## version 1.1.4 (04.12.2014)
74 | * Fixed signal strength for 3G network below API 17 method (RSCP shows instead 0)
75 | * Fixed results directory visibility on external storage through MTP
76 | * Portrait orientation only in main activity
77 | * Improved categories file storage (may require reload file)
78 |
79 | ## version 1.1.3.1 (29.11.2014)
80 | * Fixed app crash while delete characters fast in Mark Name edit
81 | * Possibly fixed GSM log headers
82 |
83 | ## version 1.1.3 (20.11.2014)
84 | * Added "Identification string" to settings
85 | * Added current network type/generetaion, psc for UMTS and identification string to log
86 | * Improved current network type info. Now generation and type show in main screen as separate line
87 | * Fixed app crash on Samsung and Nexus (perhaps others) devices when using API 17+ option
88 | * Changed "Try use API 17+" to true by default
89 |
90 | ## version 1.1.2 (13.11.2014)
91 | * Added preset categories for mark name (choose preset file in options)
92 |
93 | ## version 1.1.1 (10.11.2014)
94 | * Fixed LAC and CID (were swapped in csv)
95 | * Fixed "Type" column in accelerometer log (now indicates "Linear"/"Raw")
96 | * Fixed linear acceleration. Now uses build in sensor (available on Gingerbread 2.3 or above and if device has linear sensor)
97 | * Added new method to find nearby cells on devices for Adnroid >=4.2 (check it in options)
98 | * Added WakeLock to Service (data saves continuously when screen is off)
99 | * Logger period moved to settings
100 |
101 | ## version 1.1 (09.11.2014)
102 | * Added accelerometer data to logger
103 | * Added settings screen for accelerometer
104 |
--------------------------------------------------------------------------------
/Logger.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | NextGIS Logger
2 | ==========
3 | Productive data logger for Android
4 |
5 | 
6 |
7 | ***
8 | See [About](https://github.com/nextgis/nextgislogger/wiki/About) and [Data structure](https://github.com/nextgis/nextgislogger/wiki/Data-structures) pages for more info.
9 |
10 | Changelog now is [here](https://github.com/nextgis/nextgislogger/blob/master/CHANGELOG.md).
11 |
12 | Check [how to connect Arduino and Logger](https://github.com/nextgis/nextgislogger/wiki/External-sensors-(Arduino)) also.
13 |
14 | Manual:
15 | * [Ru](http://gis-lab.info/qa/nextgis-logger.html)
16 | * [En](https://translate.google.com/translate?sl=ru&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fgis-lab.info%2Fqa%2Fnextgis-logger.html&edit-text=)
17 |
18 | License
19 | -------------
20 | This program is licensed under GNU GPL v2 or any later version
21 |
22 | Commercial support
23 | ----------
24 | Need to fix a bug or add a feature to NextGIS Logger? We provide custom development and support for this software. [Contact us](http://nextgis.ru/en/contact/) to discuss options!
25 |
26 | [](http://nextgis.com)
27 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /release
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Nikita Kirin
6 | * Author: Stanislav Petriakov, becomeglory@gmail.com
7 | * *****************************************************************************
8 | * Copyright © 2014-2017 NextGIS
9 | *
10 | * This program is free software: you can redistribute it and/or modify
11 | * it under the terms of the GNU General Public License as published by
12 | * the Free Software Foundation, either version 2 of the License, or
13 | * (at your option) any later version.
14 | *
15 | * This program is distributed in the hope that it will be useful,
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | * GNU General Public License for more details.
19 | *
20 | * You should have received a copy of the GNU General Public License
21 | * along with this program. If not, see .
22 | * *****************************************************************************
23 | */
24 |
25 | apply plugin: 'com.android.application'
26 |
27 | android {
28 | compileSdkVersion 25
29 | buildToolsVersion "23.0.3"
30 |
31 | defaultConfig {
32 | applicationId "com.nextgis.logger"
33 | minSdkVersion 11
34 | targetSdkVersion 25
35 | versionCode 21
36 | versionName "1.6.4"
37 | buildConfigField "String", "CLIENT_ID", "\"Im6GFdPPuPM09BnvFb3EacFZyq8TpRBSAAex7JDZ\""
38 | }
39 |
40 | buildTypes {
41 | release {
42 | minifyEnabled true
43 | proguardFile getDefaultProguardFile('proguard-android.txt')
44 | proguardFile 'proguard-logger.txt'
45 | }
46 | }
47 |
48 | return void
49 | }
50 |
51 | dependencies {
52 | compile 'com.android.support:gridlayout-v7:25.1.1'
53 | compile 'com.melnykov:floatingactionbutton:1.2.0'
54 | compile 'com.android.support:support-v4:25.1.1'
55 | compile 'com.github.TechFreak:WizardPager:1.0.3'
56 | compile 'com.4ert:sfcdialog:0.2'
57 | compile project(':maplib')
58 | }
--------------------------------------------------------------------------------
/app/proguard-logger.txt:
--------------------------------------------------------------------------------
1 | -dontusemixedcaseclassnames
2 | -dontskipnonpubliclibraryclasses
3 | -dontskipnonpubliclibraryclassmembers
4 | -verbose
5 |
6 | -dontobfuscate
7 | -dontoptimize
8 | -dontpreverify
9 |
10 | -printseeds seeds.txt
11 | -printusage unused.txt
12 | -printmapping mapping.txt
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/UI/activity/BindActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2016-2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.ui.activity;
25 |
26 | import android.content.ComponentName;
27 | import android.content.Intent;
28 | import android.content.ServiceConnection;
29 | import android.os.Bundle;
30 | import android.os.IBinder;
31 |
32 | import com.nextgis.logger.LoggerService;
33 | import com.nextgis.logger.engines.ArduinoEngine;
34 | import com.nextgis.logger.engines.CellEngine;
35 | import com.nextgis.logger.engines.SensorEngine;
36 | import com.nextgis.logger.ui.activity.ProgressBarActivity;
37 |
38 | public class BindActivity extends ProgressBarActivity implements ArduinoEngine.ConnectionListener, ServiceConnection {
39 | protected CellEngine mCellEngine;
40 | protected SensorEngine mSensorEngine;
41 | protected ArduinoEngine mArduinoEngine;
42 |
43 | @Override
44 | protected void onCreate(Bundle savedInstanceState) {
45 | super.onCreate(savedInstanceState);
46 | startLoggerService(this, null);
47 | Intent connection = new Intent(this, LoggerService.class);
48 | bindService(connection, this, 0);
49 | }
50 |
51 | @Override
52 | protected void onDestroy() {
53 | onServiceDisconnected(null);
54 | unbindService(this);
55 | super.onDestroy();
56 | }
57 |
58 | @Override
59 | public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
60 | LoggerService.LocalBinder binder = (LoggerService.LocalBinder) iBinder;
61 | mCellEngine = binder.getCellEngine();
62 | mSensorEngine = binder.getSensorEngine();
63 | mArduinoEngine = binder.getArduinoEngine();
64 | mArduinoEngine.addConnectionListener(this);
65 | }
66 |
67 | @Override
68 | public void onServiceDisconnected(ComponentName componentName) {
69 | mArduinoEngine.removeConnectionListener(this);
70 | mCellEngine = null;
71 | mSensorEngine = null;
72 | mArduinoEngine = null;
73 | }
74 |
75 | @Override
76 | public void onTimeoutOrFailure() {
77 |
78 | }
79 |
80 | @Override
81 | public void onConnected() {
82 |
83 | }
84 |
85 | @Override
86 | public void onConnectionLost() {
87 |
88 | }
89 |
90 | public CellEngine getCellEngine() {
91 | return mCellEngine;
92 | }
93 |
94 | public SensorEngine getSensorEngine() {
95 | return mSensorEngine;
96 | }
97 |
98 | public ArduinoEngine getArduinoEngine() {
99 | return mArduinoEngine;
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/UI/activity/NGIDLoginActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.ui.activity;
25 |
26 | import android.os.Bundle;
27 |
28 | import com.nextgis.logger.R;
29 |
30 | public class NGIDLoginActivity extends ProgressBarActivity {
31 | @Override
32 | protected void onCreate(Bundle savedInstanceState) {
33 | super.onCreate(savedInstanceState);
34 | mHasFAB = false;
35 | setContentView(R.layout.activity_ngid_login);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/UI/activity/NGIDSettingsActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.ui.activity;
25 |
26 | import android.annotation.TargetApi;
27 | import android.content.Intent;
28 | import android.content.SharedPreferences;
29 | import android.net.Uri;
30 | import android.os.Build;
31 | import android.os.Bundle;
32 | import android.preference.Preference;
33 | import android.preference.PreferenceManager;
34 | import android.preference.PreferenceScreen;
35 | import android.text.TextUtils;
36 | import android.view.MenuItem;
37 |
38 | import com.nextgis.logger.R;
39 | import com.nextgis.logger.ui.fragment.NGIDSettingsFragment;
40 | import com.nextgis.logger.util.NGIDUtils;
41 |
42 | import java.util.List;
43 |
44 | public class NGIDSettingsActivity extends PreferencesActivity {
45 | protected static final String ACCOUNT_ACTION = "com.nextgis.maplibui.ACCOUNT";
46 | SharedPreferences mPreferences;
47 |
48 | @Override
49 | protected void onCreate(Bundle savedInstanceState) {
50 | mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
51 | super.onCreate(savedInstanceState);
52 | }
53 |
54 | @Override
55 | public boolean onOptionsItemSelected(MenuItem item) {
56 | switch (item.getItemId()) {
57 | case android.R.id.home:
58 | finish();
59 | return true;
60 | default:
61 | return super.onOptionsItemSelected(item);
62 | }
63 | }
64 |
65 | @Override
66 | protected void onStart() {
67 | super.onStart();
68 | invalidateHeaders();
69 | }
70 |
71 | @Override
72 | public void onBuildHeaders(List target) {
73 | boolean isLoggedIn = !TextUtils.isEmpty(mPreferences.getString(NGIDUtils.PREF_ACCESS_TOKEN, ""));
74 | Header header = new Header();
75 | if (isLoggedIn) {
76 | header.title = getString(R.string.ngid_my);
77 | header.fragment = NGIDSettingsFragment.class.getName();
78 | } else {
79 | header.title = getString(R.string.login);
80 | header.intent = new Intent(this, NGIDLoginActivity.class);
81 | // header.fragment = NGIDLoginFragment.class.getName();
82 | }
83 |
84 | target.add(header);
85 |
86 | //add "New account" header
87 | header = new Header();
88 | header.title = getString(R.string.ngid_account_new);
89 | header.intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://my.nextgis.com"));
90 | target.add(header);
91 | }
92 |
93 | @TargetApi(Build.VERSION_CODES.KITKAT)
94 | @Override
95 | protected boolean isValidFragment(String fragmentName) {
96 | return true;
97 | }
98 |
99 | public void fillAccountPreferences(PreferenceScreen screen) {
100 | String notDefined = getString(R.string.not_set);
101 | String value = mPreferences.getString(NGIDUtils.PREF_USERNAME, null);
102 | screen.findPreference(NGIDUtils.PREF_USERNAME).setSummary(TextUtils.isEmpty(value) ? notDefined : value);
103 | value = mPreferences.getString(NGIDUtils.PREF_EMAIL, null);
104 | screen.findPreference(NGIDUtils.PREF_EMAIL).setSummary(TextUtils.isEmpty(value) ? notDefined : value);
105 | value = mPreferences.getString(NGIDUtils.PREF_FIRST_NAME, null);
106 | screen.findPreference(NGIDUtils.PREF_FIRST_NAME).setSummary(TextUtils.isEmpty(value) ? notDefined : value);
107 | value = mPreferences.getString(NGIDUtils.PREF_LAST_NAME, null);
108 | screen.findPreference(NGIDUtils.PREF_LAST_NAME).setSummary(TextUtils.isEmpty(value) ? notDefined : value);
109 | screen.findPreference("sign_out").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
110 | @Override
111 | public boolean onPreferenceClick(Preference preference) {
112 | mPreferences.edit().remove(NGIDUtils.PREF_USERNAME).remove(NGIDUtils.PREF_EMAIL).remove(NGIDUtils.PREF_FIRST_NAME)
113 | .remove(NGIDUtils.PREF_LAST_NAME).remove(NGIDUtils.PREF_ACCESS_TOKEN).remove(NGIDUtils.PREF_REFRESH_TOKEN).apply();
114 |
115 | if (onIsHidingHeaders())
116 | finish();
117 | else
118 | invalidateHeaders();
119 |
120 | return false;
121 | }
122 | });
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/UI/fragment/MainPreferenceFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2016-2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.ui.fragment;
25 |
26 | import android.content.Intent;
27 | import android.os.Bundle;
28 | import android.preference.EditTextPreference;
29 | import android.preference.Preference;
30 | import android.preference.PreferenceFragment;
31 | import android.widget.Toast;
32 |
33 | import com.nextgis.logger.R;
34 | import com.nextgis.logger.ui.view.IntEditTextPreference;
35 | import com.nextgis.logger.util.FileUtil;
36 | import com.nextgis.logger.util.LoggerConstants;
37 |
38 | public class MainPreferenceFragment extends PreferenceFragment implements Preference.OnPreferenceChangeListener {
39 | public static final int MIN_PERIOD = 1;
40 | public static final int MAX_PERIOD = 3600;
41 | public static final int CHOOSE_FILE = 53;
42 |
43 | @SuppressWarnings("deprecation")
44 | @Override
45 | public void onCreate(Bundle savedInstanceState) {
46 | super.onCreate(savedInstanceState);
47 | addPreferencesFromResource(R.xml.preferences_main);
48 |
49 | if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN_MR1)
50 | findPreference(LoggerConstants.PREF_USE_API17).setEnabled(false);
51 |
52 | EditTextPreference userName = (EditTextPreference) findPreference(LoggerConstants.PREF_USER_NAME);
53 | userName.setSummary(userName.getText());
54 | userName.setOnPreferenceChangeListener(this);
55 |
56 | IntEditTextPreference periodPreference = (IntEditTextPreference) findPreference(LoggerConstants.PREF_PERIOD_SEC);
57 | periodPreference.setSummary(getString(R.string.settings_period_sum) + periodPreference.getPersistedString("1"));
58 | periodPreference.setOnPreferenceChangeListener(this);
59 |
60 | Preference catPathPreference = findPreference(LoggerConstants.PREF_CAT_PATH);
61 | catPathPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
62 | @Override
63 | public boolean onPreferenceClick(final Preference preference) {
64 | Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
65 | intent.setType("file/*");
66 | startActivityForResult(intent, CHOOSE_FILE);
67 |
68 | return true;
69 | }
70 | });
71 | }
72 |
73 | @Override
74 | public void onActivityResult(int requestCode, int resultCode, Intent data) {
75 | if (requestCode == CHOOSE_FILE)
76 | FileUtil.copyPreset(getActivity(), data);
77 | else
78 | super.onActivityResult(requestCode, resultCode, data);
79 | }
80 |
81 | @Override
82 | public boolean onPreferenceChange(Preference preference, Object newValue) {
83 | switch (preference.getKey()) {
84 | case LoggerConstants.PREF_USER_NAME:
85 | preference.setSummary((String) newValue);
86 | return true;
87 | case LoggerConstants.PREF_PERIOD_SEC:
88 | int period;
89 |
90 | try {
91 | period = Integer.parseInt((String) newValue);
92 | boolean max = period > MAX_PERIOD;
93 | boolean min = period < MIN_PERIOD;
94 |
95 | if (max)
96 | period = MAX_PERIOD;
97 |
98 | if (min)
99 | period = MIN_PERIOD;
100 |
101 | ((IntEditTextPreference) preference).persistString(Integer.toString(period));
102 | preference.setSummary(getString(R.string.settings_period_sum) + period);
103 |
104 | if (min || max)
105 | throw new IllegalArgumentException();
106 | } catch (Exception e) {
107 | Toast.makeText(preference.getContext(), R.string.settings_period_toast, Toast.LENGTH_LONG).show();
108 | }
109 |
110 | return false;
111 | }
112 |
113 | return false;
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/UI/fragment/NGIDLoginFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.ui.fragment;
25 |
26 | import android.app.Activity;
27 | import android.content.Intent;
28 | import android.net.Uri;
29 | import android.os.Bundle;
30 | import android.support.annotation.Nullable;
31 | import android.support.v4.app.Fragment;
32 | import android.view.LayoutInflater;
33 | import android.view.View;
34 | import android.view.ViewGroup;
35 | import android.widget.Button;
36 | import android.widget.EditText;
37 | import android.widget.TextView;
38 | import android.widget.Toast;
39 |
40 | import com.nextgis.logger.R;
41 | import com.nextgis.logger.util.NGIDUtils;
42 | import com.nextgis.logger.util.UiUtil;
43 | import com.nextgis.maplib.util.NetworkUtil;
44 |
45 | public class NGIDLoginFragment extends Fragment implements View.OnClickListener {
46 | protected EditText mLogin, mPassword;
47 | protected Button mSignInButton;
48 |
49 | @Override
50 | public void onCreate(Bundle savedInstanceState) {
51 | super.onCreate(savedInstanceState);
52 | if (null == getParentFragment())
53 | setRetainInstance(true);
54 | }
55 |
56 | @Override
57 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
58 | final View view = inflater.inflate(R.layout.fragment_ngid_login, container, false);
59 | mLogin = (EditText) view.findViewById(R.id.login);
60 | mPassword = (EditText) view.findViewById(R.id.password);
61 | mSignInButton = (Button) view.findViewById(R.id.signin);
62 | mSignInButton.setOnClickListener(this);
63 | TextView signUp = (TextView) view.findViewById(R.id.signup);
64 | UiUtil.highlightText(signUp);
65 | signUp.setOnClickListener(this);
66 | return view;
67 | }
68 |
69 | @Override
70 | public void onClick(View v) {
71 | if (v.getId() == R.id.signin) {
72 | boolean loginPasswordFilled = checkEditText(mLogin) && checkEditText(mPassword);
73 | if (!loginPasswordFilled) {
74 | Toast.makeText(getActivity(), R.string.field_not_filled, Toast.LENGTH_SHORT).show();
75 | return;
76 | }
77 |
78 | mSignInButton.setEnabled(false);
79 | final Activity activity = getActivity();
80 | NGIDUtils.getToken(activity, mLogin.getText().toString(), mPassword.getText().toString(), new NGIDUtils.OnFinish() {
81 | @Override
82 | public void onFinish(String data) {
83 | mSignInButton.setEnabled(true);
84 |
85 | if (data == null)
86 | activity.finish();
87 | else
88 | Toast.makeText(activity, NetworkUtil.getError(activity, data), Toast.LENGTH_SHORT).show();
89 | }
90 | });
91 | } else if (v.getId() == R.id.signup) {
92 | Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse("http://my.nextgis.com"));
93 | startActivity(browser);
94 | }
95 | }
96 |
97 | private boolean checkEditText(EditText edit) {
98 | return edit.getText().length() > 0;
99 | }
100 |
101 | }
102 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/UI/fragment/NGIDSettingsFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.ui.fragment;
25 |
26 | import android.Manifest;
27 | import android.os.Bundle;
28 | import android.preference.PreferenceFragment;
29 |
30 | import com.nextgis.logger.R;
31 | import com.nextgis.logger.ui.activity.NGIDSettingsActivity;
32 | import com.nextgis.logger.ui.activity.ProgressBarActivity;
33 | import com.nextgis.logger.util.ApkDownloader;
34 |
35 | public class NGIDSettingsFragment extends PreferenceFragment {
36 | @Override
37 | public void onCreate(Bundle savedInstanceState) {
38 | super.onCreate(savedInstanceState);
39 |
40 | if (getArguments() != null && getArguments().containsKey("updater")) {
41 | if (ProgressBarActivity.hasStoragePermissions(getActivity()))
42 | ApkDownloader.check(getActivity(), true);
43 | else {
44 | String[] permissions = new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE};
45 | ProgressBarActivity.requestPermissions(getActivity(), R.string.permissions_title, R.string.permissions_storage,
46 | ProgressBarActivity.PERMISSION_STORAGE, permissions);
47 | }
48 |
49 | return;
50 | }
51 |
52 | addPreferencesFromResource(R.xml.preferences_ngid);
53 | NGIDSettingsActivity activity = (NGIDSettingsActivity) getActivity();
54 | activity.fillAccountPreferences(getPreferenceScreen());
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/UI/view/IntEditTextPreference.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2014-2015, 2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 | package com.nextgis.logger.ui.view;
24 |
25 | import android.content.Context;
26 | import android.preference.EditTextPreference;
27 | import android.util.AttributeSet;
28 |
29 | public class IntEditTextPreference extends EditTextPreference {
30 | public IntEditTextPreference(Context context) {
31 | super(context);
32 | }
33 |
34 | public IntEditTextPreference(Context context, AttributeSet attrs) {
35 | super(context, attrs);
36 | }
37 |
38 | public IntEditTextPreference(Context context, AttributeSet attrs, int defStyle) {
39 | super(context, attrs, defStyle);
40 | }
41 |
42 | @Override
43 | public String getPersistedString(String defaultReturnValue) {
44 | return String.valueOf(getPersistedInt(-1));
45 | }
46 |
47 | @Override
48 | public boolean persistString(String value) {
49 | return persistInt(Integer.valueOf(value));
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/engines/InfoColumn.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2016 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.engines;
25 |
26 | import android.os.Bundle;
27 | import android.os.Parcel;
28 | import android.os.Parcelable;
29 | import android.text.TextUtils;
30 |
31 | import java.util.IllegalFormatException;
32 |
33 | public class InfoColumn implements Parcelable {
34 | private static final String FNAME = "full_name";
35 | private static final String SNAME = "short_name";
36 | private static final String UNIT = "unit";
37 | private static final String FORMAT = "format";
38 | private static final String VALUE = "value";
39 |
40 | private String mFullName, mShortName, mUnit, mFormat;
41 | private Object mValue;
42 |
43 | public InfoColumn(String shortName, String fullName, String unit) {
44 | mShortName = shortName;
45 | mFullName = fullName;
46 | mUnit = unit;
47 | }
48 |
49 | public InfoColumn(String shortName, String fullName, String unit, Object value) {
50 | this(shortName, fullName, unit);
51 |
52 | if (!isValueTypeValid(value))
53 | throw new RuntimeException("Value must be following classes: [String, Double, Float, Integer, Long, Boolean]!");
54 |
55 | mValue = value;
56 | }
57 |
58 | public InfoColumn(String shortName, String fullName, String unit, Object value, String format) {
59 | this(shortName, fullName, unit, value);
60 | mFormat = format;
61 | }
62 |
63 | private InfoColumn(Parcel in) {
64 | Bundle bundle = in.readBundle(getClass().getClassLoader());
65 | mFullName = bundle.getString(FNAME);
66 | mShortName = bundle.getString(SNAME);
67 | mUnit = bundle.getString(UNIT);
68 | mFormat = bundle.getString(FORMAT);
69 | mValue = bundle.get(VALUE);
70 | }
71 |
72 | public static final Creator CREATOR = new Creator() {
73 | @Override
74 | public InfoColumn createFromParcel(Parcel in) {
75 | return new InfoColumn(in);
76 | }
77 |
78 | @Override
79 | public InfoColumn[] newArray(int size) {
80 | return new InfoColumn[size];
81 | }
82 | };
83 |
84 | @Override
85 | public int describeContents() {
86 | return 0;
87 | }
88 |
89 | @Override
90 | public void writeToParcel(Parcel dest, int flags) {
91 | Bundle bundle = new Bundle();
92 | bundle.putString(FNAME, mFullName);
93 | bundle.putString(SNAME, mShortName);
94 | bundle.putString(UNIT, mUnit);
95 | bundle.putString(FORMAT, mFullName);
96 |
97 | if (mValue instanceof String)
98 | bundle.putString(VALUE, (String) mValue);
99 | else if (mValue instanceof Double)
100 | bundle.putDouble(VALUE, (Double) mValue);
101 | else if (mValue instanceof Float)
102 | bundle.putFloat(VALUE, (Float) mValue);
103 | else if (mValue instanceof Integer)
104 | bundle.putInt(VALUE, (Integer) mValue);
105 | else if (mValue instanceof Long)
106 | bundle.putLong(VALUE, (Long) mValue);
107 | else if (mValue instanceof Boolean)
108 | bundle.putBoolean(VALUE, (Boolean) mValue);
109 |
110 | dest.writeBundle(bundle);
111 | }
112 |
113 | private boolean isValueTypeValid(Object value) {
114 | return value instanceof String || value instanceof Double || value instanceof Float
115 | || value instanceof Integer || value instanceof Long || value instanceof Boolean;
116 | }
117 |
118 | public void setValue(Object value) throws RuntimeException {
119 | if (!isValueTypeValid(value))
120 | throw new RuntimeException("Value must be following classes: [String, Double, Float, Integer, Long, Boolean]!");
121 |
122 | mValue = value;
123 | }
124 |
125 | public String getShortName() {
126 | return mShortName;
127 | }
128 |
129 | public String getFullName() {
130 | return mFullName;
131 | }
132 |
133 | public String getUnit() {
134 | return mUnit;
135 | }
136 |
137 | public Object getValue() {
138 | return mValue;
139 | }
140 |
141 | public String getValueWithUnit() {
142 | String unit = getUnit(), format = mFormat;
143 | unit = TextUtils.isEmpty(unit) ? "" : " " + unit;
144 |
145 | if (TextUtils.isEmpty(format))
146 | format = "%s";
147 |
148 | String result = getValue().toString();
149 | try {
150 | result = String.format(format, getValue());
151 | } catch (IllegalFormatException | NumberFormatException ignored) { }
152 |
153 | return result + unit;
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/engines/InfoItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2016 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.engines;
25 |
26 | import android.os.Bundle;
27 | import android.os.Parcel;
28 | import android.os.Parcelable;
29 |
30 | import com.nextgis.logger.util.LoggerConstants;
31 |
32 | import java.util.ArrayList;
33 |
34 | public class InfoItem implements Parcelable {
35 | private static final String TITLE = "title";
36 | private static final String DESC = "desc";
37 | private static final String COLUMNS = "columns";
38 |
39 | private ArrayList mColumns;
40 | private String mTitle, mDescription;
41 |
42 | public InfoItem(String title) {
43 | mTitle = title;
44 | mColumns = new ArrayList<>();
45 | }
46 |
47 | public InfoItem(String title, String description) {
48 | this(title);
49 | mDescription = description;
50 | }
51 |
52 | private InfoItem(Parcel in) {
53 | Bundle bundle = in.readBundle(getClass().getClassLoader());
54 | mTitle = bundle.getString(TITLE);
55 | mDescription = bundle.getString(DESC);
56 | mColumns = bundle.getParcelableArrayList(COLUMNS);
57 | }
58 |
59 | public static final Creator CREATOR = new Creator() {
60 | @Override
61 | public InfoItem createFromParcel(Parcel in) {
62 | return new InfoItem(in);
63 | }
64 |
65 | @Override
66 | public InfoItem[] newArray(int size) {
67 | return new InfoItem[size];
68 | }
69 | };
70 |
71 | @Override
72 | public int describeContents() {
73 | return 0;
74 | }
75 |
76 | @Override
77 | public void writeToParcel(Parcel dest, int flags) {
78 | Bundle bundle = new Bundle();
79 | bundle.putString(TITLE, mTitle);
80 | bundle.putString(DESC, mDescription);
81 | bundle.putParcelableArrayList(COLUMNS, mColumns);
82 | dest.writeBundle(bundle);
83 | }
84 |
85 | public String getTitle() {
86 | return mTitle;
87 | }
88 |
89 | public void setTitle(String title) {
90 | mTitle = title;
91 | }
92 |
93 | public String getDescription() {
94 | return mDescription;
95 | }
96 |
97 | /**
98 | * Add new column
99 | *
100 | * @param shortName Column short name
101 | * @param fullName Column full name
102 | * @param unit Column unit
103 | */
104 | public InfoItem addColumn(String shortName, String fullName, String unit) {
105 | mColumns.add(new InfoColumn(shortName, fullName, unit, LoggerConstants.NO_DATA));
106 | return this;
107 | }
108 |
109 | /**
110 | * Add new column
111 | *
112 | * @param shortName Column short name
113 | * @param fullName Column full name
114 | * @param unit Column unit
115 | * @param format Format for values
116 | */
117 | public InfoItem addColumn(String shortName, String fullName, String unit, String format) {
118 | mColumns.add(new InfoColumn(shortName, fullName, unit, LoggerConstants.NO_DATA, format));
119 | return this;
120 | }
121 |
122 | public ArrayList getColumns() {
123 | return mColumns;
124 | }
125 |
126 | /**
127 | * Get specific column
128 | * @param key Column short name
129 | */
130 | public InfoColumn getColumn(String key) {
131 | for (InfoColumn column : mColumns)
132 | if (column.getShortName().equals(key))
133 | return column;
134 |
135 | return null;
136 | }
137 |
138 | /**
139 | * Set value for specific column
140 | *
141 | * @param key Column short name
142 | * @param value Column value
143 | */
144 | public void setValue(String key, Object value) throws RuntimeException {
145 | for (InfoColumn column : mColumns)
146 | if (column.getShortName().equals(key)) {
147 | column.setValue(value);
148 | break;
149 | }
150 | }
151 |
152 | public int size() {
153 | return mColumns.size();
154 | }
155 |
156 | public ArrayList getShortNames() {
157 | ArrayList names = new ArrayList<>();
158 | for (InfoColumn column : mColumns)
159 | names.add(column.getShortName());
160 |
161 | return names;
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/engines/WiFiEngine.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Project: NextGIS Logger
3 | * Purpose: Productive data logger for Android
4 | * Authors: Stanislav Petriakov
5 | ******************************************************************************
6 | * Copyright © 2014 NextGIS
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 2 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with this program. If not, see .
20 | *****************************************************************************/
21 | package com.nextgis.logger.engines;
22 |
23 | import java.util.List;
24 |
25 | import android.content.BroadcastReceiver;
26 | import android.content.Context;
27 | import android.content.Intent;
28 | import android.content.IntentFilter;
29 | import android.net.wifi.ScanResult;
30 | import android.net.wifi.WifiManager;
31 |
32 | public class WiFiEngine {
33 | private BroadcastReceiver wifiReceiver;
34 | private Context ctx;
35 | List wifis;
36 |
37 | public WiFiEngine(final Context ctx) {
38 | this.ctx = ctx;
39 |
40 | wifiReceiver = new BroadcastReceiver() {
41 | public void onReceive(Context context, Intent intent) {
42 | wifis = ((WifiManager) context.getSystemService(Context.WIFI_SERVICE)).getScanResults();
43 | }
44 | };
45 |
46 | onResume();
47 | }
48 |
49 | public void onResume() {
50 | IntentFilter intentFilter = new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
51 | ctx.registerReceiver(wifiReceiver, intentFilter);
52 | }
53 |
54 | public void onPause() {
55 | ctx.unregisterReceiver(wifiReceiver);
56 | }
57 |
58 | public void scan() {
59 | ((WifiManager) ctx.getSystemService(Context.WIFI_SERVICE)).startScan();
60 | }
61 |
62 | public String getItem() {
63 | return wifis.get(0).SSID; // loop
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/livedata/InfoFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2016 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.livedata;
25 |
26 | import android.support.v4.app.Fragment;
27 |
28 | import com.nextgis.logger.engines.BaseEngine;
29 | import com.nextgis.logger.engines.InfoItem;
30 |
31 | import java.util.ArrayList;
32 |
33 | public class InfoFragment extends Fragment {
34 | protected BaseEngine mEngine;
35 | protected BaseEngine.EngineListener mListener;
36 |
37 | public void setEngine(BaseEngine engine) {
38 | if (mEngine != null)
39 | mEngine.removeListener(mListener);
40 |
41 | mEngine = engine;
42 |
43 | if (mEngine != null)
44 | mEngine.addListener(mListener);
45 |
46 | if (isAdded())
47 | onResume();
48 | }
49 |
50 | public boolean isConnected() {
51 | return mEngine != null;
52 | }
53 |
54 | public ArrayList getData() {
55 | return isConnected() ? mEngine.getData() : new ArrayList();
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/util/AccountAuthenticator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2016 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.util;
25 |
26 | import android.app.Service;
27 | import android.content.Intent;
28 | import android.os.IBinder;
29 |
30 | public class AccountAuthenticator extends Service {
31 | protected NGWAccountAuthenticator mAuthenticator;
32 |
33 | @Override
34 | public void onCreate() {
35 | super.onCreate();
36 | mAuthenticator = new NGWAccountAuthenticator(getApplicationContext());
37 | }
38 |
39 | @Override
40 | public IBinder onBind(Intent intent) {
41 | return mAuthenticator.getIBinder();
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/util/LoggerVectorLayer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2016-2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.util;
25 |
26 | import android.content.Context;
27 | import android.content.SyncResult;
28 | import android.os.SystemClock;
29 |
30 | import com.nextgis.logger.ui.activity.ProgressBarActivity;
31 | import com.nextgis.maplib.api.IGeometryCache;
32 | import com.nextgis.maplib.datasource.GeoPoint;
33 | import com.nextgis.maplib.datasource.GeometryPlainList;
34 | import com.nextgis.maplib.map.NGWVectorLayer;
35 | import com.nextgis.maplib.util.FeatureChanges;
36 |
37 | import java.io.File;
38 |
39 | public class LoggerVectorLayer extends NGWVectorLayer {
40 | public LoggerVectorLayer(Context context, File path) {
41 | super(context, path);
42 | }
43 |
44 | @Override
45 | protected IGeometryCache createNewCache() {
46 | return new GeometryPlainList();
47 | }
48 |
49 | @Override
50 | protected boolean checkPointOverlaps(GeoPoint pt, double tolerance) {
51 | return false;
52 | }
53 |
54 | @Override
55 | public boolean getChangesFromServer(String authority, SyncResult syncResult) {
56 | return true;
57 | }
58 |
59 | public void sync(final ProgressBarActivity.Sync sync) {
60 | final long max = FeatureChanges.getChangeCount(getChangeTableName());
61 | new Thread(new Runnable() {
62 | @Override
63 | public void run() {
64 | while (true) {
65 | long current = FeatureChanges.getChangeCount(getChangeTableName());
66 | if (current == 0)
67 | break;
68 |
69 | sync.publishProgress((int) max, (int) (max - current), mName);
70 | SystemClock.sleep(500);
71 | }
72 | }
73 | }).start();
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/util/MarkName.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2015-2016 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.util;
25 |
26 | public class MarkName {
27 | private int mId = -1;
28 | private String mCat = "Mark";
29 |
30 | public MarkName(int id, String cat) {
31 | mId = id;
32 | mCat = cat;
33 | }
34 |
35 | public int getId() {
36 | return mId;
37 | }
38 |
39 | public String getCat() {
40 | return mCat;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | return mId + "," + mCat;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/util/NGWAccountAuthenticator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2016-2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.util;
25 |
26 | import android.accounts.AbstractAccountAuthenticator;
27 | import android.accounts.Account;
28 | import android.accounts.AccountAuthenticatorResponse;
29 | import android.accounts.AccountManager;
30 | import android.accounts.NetworkErrorException;
31 | import android.content.Context;
32 | import android.content.Intent;
33 | import android.os.Bundle;
34 |
35 | import com.nextgis.logger.ui.activity.NGWLoginActivity;
36 | import com.nextgis.maplib.util.Constants;
37 |
38 | class NGWAccountAuthenticator extends AbstractAccountAuthenticator {
39 | private Context mContext;
40 |
41 | NGWAccountAuthenticator(Context context) {
42 | super(context);
43 | mContext = context;
44 | }
45 |
46 | @Override
47 | public Bundle editProperties(AccountAuthenticatorResponse accountAuthenticatorResponse, String s) {
48 | return null;
49 | }
50 |
51 | @Override
52 | public Bundle addAccount(AccountAuthenticatorResponse accountAuthenticatorResponse, String accountType, String authTokenType, String[] requiredFeatures,
53 | Bundle options) throws NetworkErrorException {
54 | final Intent intent = new Intent(mContext, NGWLoginActivity.class);
55 | intent.putExtra(Constants.NGW_ACCOUNT_TYPE, accountType);
56 | intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, accountAuthenticatorResponse);
57 | final Bundle bundle = new Bundle();
58 | if (options != null) {
59 | bundle.putAll(options);
60 | }
61 | bundle.putParcelable(AccountManager.KEY_INTENT, intent);
62 | return bundle;
63 | }
64 |
65 | @Override
66 | public Bundle confirmCredentials(AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, Bundle bundle) throws NetworkErrorException {
67 | return null;
68 | }
69 |
70 | @Override
71 | public Bundle getAuthToken(AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, String s,
72 | Bundle bundle) throws NetworkErrorException {
73 | return null;
74 | }
75 |
76 | @Override
77 | public String getAuthTokenLabel(String s) {
78 | return null;
79 | }
80 |
81 | @Override
82 | public Bundle updateCredentials(AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, String s,
83 | Bundle bundle) throws NetworkErrorException {
84 | return null;
85 | }
86 |
87 | @Override
88 | public Bundle hasFeatures(AccountAuthenticatorResponse accountAuthenticatorResponse, Account account, String[] strings) throws NetworkErrorException {
89 | return null;
90 | }
91 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/nextgis/logger/util/UiUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************
3 | * Project: NextGIS Logger
4 | * Purpose: Productive data logger for Android
5 | * Author: Stanislav Petriakov, becomeglory@gmail.com
6 | * *****************************************************************************
7 | * Copyright © 2016-2017 NextGIS
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 2 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with this program. If not, see .
21 | * *****************************************************************************
22 | */
23 |
24 | package com.nextgis.logger.util;
25 |
26 | import android.content.Context;
27 | import android.content.pm.PackageManager;
28 | import android.graphics.Color;
29 | import android.support.v4.content.ContextCompat;
30 | import android.text.SpannableString;
31 | import android.text.Spanned;
32 | import android.text.style.URLSpan;
33 | import android.widget.TextView;
34 |
35 | public final class UiUtil {
36 | public static int darkerColor(int color, float percent) {
37 | int r = Color.red(color);
38 | int b = Color.blue(color);
39 | int g = Color.green(color);
40 |
41 | return Color.rgb((int) (r * percent), (int) (g * percent), (int) (b * percent));
42 | }
43 |
44 | public static boolean isPermissionGranted(Context context, String permission) {
45 | return ContextCompat.checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED;
46 | }
47 |
48 | public static void highlightText(TextView textView) {
49 | final CharSequence text = textView.getText();
50 | final SpannableString spannableString = new SpannableString(text);
51 | spannableString.setSpan(new URLSpan(""), 0, spannableString.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
52 | textView.setText(spannableString, TextView.BufferType.SPANNABLE);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/rotation.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_arrow_back_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_arrow_back_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_bluetooth_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_bluetooth_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_cloud_upload_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_cloud_upload_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_delete_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_delete_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_insert_chart_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_insert_chart_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_ngw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_ngw.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_pause_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_pause_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_remove_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_remove_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_select_all_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_select_all_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_share_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_share_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_status_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_status_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_undo_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-hdpi/ic_undo_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_arrow_back_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_arrow_back_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_bluetooth_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_bluetooth_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_cloud_upload_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_cloud_upload_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_delete_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_delete_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_insert_chart_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_insert_chart_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_ngw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_ngw.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_pause_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_pause_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_remove_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_remove_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_select_all_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_select_all_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_share_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_share_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_status_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_status_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_undo_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-mdpi/ic_undo_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_arrow_back_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_bluetooth_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_bluetooth_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_cloud_upload_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_cloud_upload_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_delete_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_delete_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_insert_chart_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_insert_chart_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_ngw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_ngw.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_pause_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_pause_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_remove_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_remove_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_select_all_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_select_all_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_share_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_share_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_status_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_status_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_undo_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xhdpi/ic_undo_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_arrow_back_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_bluetooth_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_bluetooth_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_cloud_upload_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_cloud_upload_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_delete_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_delete_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_insert_chart_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_insert_chart_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_ngw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_ngw.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_pause_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_pause_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_remove_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_remove_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_select_all_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_select_all_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_share_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_share_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_status_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_status_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_undo_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxhdpi/ic_undo_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_arrow_back_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_bluetooth_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_bluetooth_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_cloud_upload_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_cloud_upload_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_delete_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_delete_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_insert_chart_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_insert_chart_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_pause_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_pause_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_remove_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_remove_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_select_all_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_select_all_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_share_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_share_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_undo_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable-xxxhdpi/ic_undo_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/nextgis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable/nextgis.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/nextgis_addition.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/app/src/main/res/drawable/nextgis_addition.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/title_strip.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
26 | -
30 |
31 |
32 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
29 |
30 |
34 |
35 |
40 |
41 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
27 |
28 |
32 |
33 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_intro.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
29 |
30 |
35 |
36 |
48 |
49 |
54 |
55 |
61 |
62 |
70 |
71 |
75 |
76 |
84 |
85 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_mark.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
29 |
30 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_ngid_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
31 |
32 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_ngw_login.xml:
--------------------------------------------------------------------------------
1 |
23 |
24 |
29 |
30 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_sessions.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
34 |
35 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_audio_calibrate.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
30 |
31 |
39 |
40 |
46 |
47 |
54 |
55 |
61 |
62 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_edit_mark.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
30 |
31 |
35 |
36 |
41 |
42 |
47 |
48 |
53 |
54 |
60 |
61 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fab.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
29 |
30 |
34 |
35 |
38 |
39 |
48 |
49 |
55 |
56 |
65 |
66 |
74 |
75 |
76 |
77 |
84 |
85 |
92 |
93 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_contacts.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
29 |
30 |
35 |
36 |
45 |
46 |
54 |
55 |
64 |
65 |
72 |
73 |
82 |
83 |
91 |
92 |
101 |
102 |
110 |
111 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_info_cell.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
30 |
31 |
38 |
39 |
44 |
45 |
51 |
52 |
57 |
58 |
64 |
65 |
66 |
72 |
73 |
82 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_info_external.xml:
--------------------------------------------------------------------------------
1 |
23 |
24 |
27 |
28 |
35 |
36 |
40 |
41 |
47 |
48 |
52 |
53 |
54 |
62 |
63 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_info_sensors.xml:
--------------------------------------------------------------------------------
1 |
23 |
24 |
27 |
28 |
35 |
36 |
40 |
41 |
46 |
47 |
48 |
56 |
57 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_intro.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
33 |
34 |
44 |
45 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_intro_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
29 |
30 |
37 |
38 |
46 |
47 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_ngid_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
30 |
31 |
35 |
36 |
45 |
46 |
54 |
55 |
64 |
65 |
70 |
71 |
75 |
76 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/info_cell_neighbour_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
31 |
32 |
39 |
40 |
48 |
49 |
53 |
54 |
57 |
58 |
59 |
60 |
65 |
66 |
70 |
71 |
75 |
76 |
80 |
81 |
84 |
85 |
86 |
87 |
91 |
92 |
95 |
96 |
99 |
100 |
103 |
104 |
105 |
110 |
111 |
114 |
115 |
118 |
119 |
123 |
124 |
125 |
126 |
130 |
131 |
134 |
135 |
138 |
139 |
142 |
143 |
144 |
145 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/info_external_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
32 |
33 |
36 |
37 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/info_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
35 |
36 |
40 |
41 |
45 |
46 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_value.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
26 |
27 |
32 |
36 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/mark.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
26 |
27 |
33 |
34 |
40 |
41 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/sessions.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
27 |
28 |
33 |
38 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 | ?android:attr/colorAccent
26 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
26 |
27 | - @string/mstdt
28 | - @string/mstds
29 | - @string/mssdt
30 | - @string/mssds
31 | - @string/gpx
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 | #0099CC
26 | #FFC107
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/loaders.xml:
--------------------------------------------------------------------------------
1 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
28 |
29 |
39 |
40 |
46 |
47 |
54 |
55 |
60 |
61 |
64 |
65 |
70 |
71 |
74 |
75 |
82 |
83 |
88 |
89 |
96 |
97 |
104 |
105 |
114 |
115 |
122 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/authenticator.xml:
--------------------------------------------------------------------------------
1 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/headers.xml:
--------------------------------------------------------------------------------
1 |
23 |
24 |
25 |
28 |
31 |
34 |
39 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
26 |
27 |
28 |
32 |
33 |
39 |
40 |
45 |
46 |
51 |
52 |
53 |
54 |
57 |
58 |
63 |
64 |
65 |
66 |
70 |
71 |
75 |
76 |
81 |
82 |
86 |
87 |
91 |
92 |
96 |
97 |
101 |
102 |
110 |
111 |
112 |
113 |
118 |
119 |
123 |
124 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
26 |
27 |
28 |
32 |
33 |
39 |
40 |
45 |
46 |
51 |
52 |
53 |
54 |
57 |
58 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences_ngid.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
27 |
30 |
33 |
36 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences_ngw.xml:
--------------------------------------------------------------------------------
1 |
23 |
25 |
26 |
29 |
30 |
34 |
35 |
40 |
41 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences_sensors.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
26 |
27 |
28 |
32 |
33 |
37 |
38 |
43 |
44 |
48 |
49 |
53 |
54 |
58 |
59 |
63 |
64 |
72 |
73 |
74 |
75 |
80 |
81 |
85 |
86 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/syncadapter.xml:
--------------------------------------------------------------------------------
1 |
23 |
24 |
--------------------------------------------------------------------------------
/arduino/sample_scheme.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/arduino/sample_scheme.png
--------------------------------------------------------------------------------
/arduino/sample_sketch.ino:
--------------------------------------------------------------------------------
1 | // Arduino Uno
2 |
3 | #include
4 | #include
5 |
6 | // DHT22 at pin 12
7 | #define DHTPIN 12;
8 | DHT dht(DHTPIN, DHT22);
9 |
10 | // Bluetooth at TX = 10, RX = 11
11 | SoftwareSerial bt(10, 11);
12 |
13 | // order, short and full name, unit of all sensors in json
14 | String pnp = "{\"0\":{\"short\":\"Temp\",\"full\":\"Temperature\",\"unit\":\"°C\"},\"1\":{\"short\":\"Hum\",\"full\":\"Humidity\",\"unit\":\"%\"}}";
15 |
16 | void setup() {
17 | bt.begin(9600);
18 | dht.begin();
19 | }
20 |
21 | void loop() {
22 | if (bt.available()) {
23 | int val = bt.read();
24 |
25 | // get json
26 | if (val == 'h' || val == 'H') {
27 | bt.println(pnp);
28 | }
29 |
30 | // get data
31 | if (val == 'd' || val == 'D') {
32 | // read data from sensors
33 | float h = dht.readHumidity();
34 | float t = dht.readTemperature();
35 |
36 | // send it to Bluetooth
37 | bt.print(t, 0); bt.print(';');
38 | bt.println(h, 0);
39 | }
40 | }
41 |
42 | // delay should be lesser than Android update interval
43 | // NextGIS Logger interval default 100
44 | delay(10);
45 | }
46 |
--------------------------------------------------------------------------------
/art/applicationIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | image/svg+xml
--------------------------------------------------------------------------------
/art/applicationIconNotification.svg:
--------------------------------------------------------------------------------
1 |
2 | image/svg+xml
3 |
4 | Layer 1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/art/logger_img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/art/logger_img.png
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | jcenter()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:2.2.3'
8 | }
9 | }
10 |
11 | allprojects {
12 | repositories {
13 | jcenter()
14 | maven { url "https://jitpack.io" }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nextgis/nextgislogger/07e15cd2cf718444f3b91dd7040e9bbe234d3d6c/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Oct 17 12:35:03 MSK 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':maplib'
2 |
--------------------------------------------------------------------------------