Skip to content

Commit dce4acd

Browse files
NRottmannNRottmannnicostudt
authored
Update 1.0.1 (#3)
* Update README.md * SSH access data now also storable in config * Add onBoarding Added onBoarding slides for check-in into the application. * Enable multiple dots for SSH IP * Onboarding Changes - Changed from Activity to Fragment - Added YoutubeView TODO: Add Choice of first Config Name * Try to setup numbering widgets * widget count dao * Update - Add Widget Count - Fixed Recycler View for Configs TODO: Start Config Name * Solved Initial Config Issue * Corrected Pull Request - port validation from SSH in viewmodel - list loading from Infrofragment in viewmodel * Little Cleanup * Update intro_gps.png Co-authored-by: NRottmann <nils.rottmann@rib.uni-luebeck.de> Co-authored-by: Nico <nico.studt@student.uni-luebeck.de>
1 parent 716c2bc commit dce4acd

53 files changed

Lines changed: 1244 additions & 194 deletions

Some content is hidden

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

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.idea/jarRepositories.xml

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 0 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/render.experimental.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/statistic.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
ROS-Mobile is an [Android](https://www.android.com/) application designed for dynamic control and visualization of mobile robotic system operated by the Robot Operating System ([ROS](http://wiki.ros.org/)). The application uses ROS nodes initializing publisher and subscriber with standard ROS messages. The overall code architecture pattern is Model View ViewModel ([MVVM]([https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel](https://en.wikipedia.org/wiki/Model–view–viewmodel))), which stabilizes the application and makes it highly customizable. For a detailed overview of the functionality, we refer to our [wiki](https://github.com/ROS-Mobile/ROS-Mobile-Android/wiki).
44

5-
- Current stable Version: 1.0
5+
- Current stable Version: 1.0.1
66

77
## Requirements
88

app/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ dependencies {
4040
implementation 'com.google.android.material:material:1.1.0'
4141
implementation "androidx.viewpager2:viewpager2:1.0.0"
4242

43+
implementation "com.android.support:support-core-utils:28.0.0"
44+
4345
// ROS
4446
implementation "org.ros.rosjava_core:rosjava:0.3.6"
4547
implementation "org.ros.rosjava_messages:diagnostic_msgs:1.12.7"
@@ -60,4 +62,7 @@ dependencies {
6062

6163
// Open Street Maps (e.g. for GPS)
6264
implementation 'org.osmdroid:osmdroid-android:6.1.6'
65+
66+
// Playing Youtube Videos
67+
implementation 'com.pierfrancescosoffritti.androidyoutubeplayer:core:10.0.5'
6368
}

app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest
3-
xmlns:android="http://schemas.android.com/apk/res/android"
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
43
xmlns:tools="http://schemas.android.com/tools"
54
package="com.schneewittchen.rosandroid">
65

7-
<uses-permission android:name="android.permission.INTERNET"/>
6+
<uses-permission android:name="android.permission.INTERNET" />
87
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
9-
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
8+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
109
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
11-
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
10+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
1211

1312
<application
14-
tools:replace="android:icon"
1513
android:allowBackup="false"
1614
android:icon="@mipmap/ic_launcher"
1715
android:label="@string/app_name"
1816
android:supportsRtl="true"
1917
android:theme="@style/AppTheme"
20-
tools:ignore="GoogleAppIndexingWarning">
21-
18+
tools:ignore="GoogleAppIndexingWarning"
19+
tools:replace="android:icon">
2220
<activity
2321
android:name=".ui.activity.MainActivity"
22+
android:windowSoftInputMode="adjustResize"
2423
android:screenOrientation="portrait">
2524

2625
<intent-filter>
@@ -35,7 +34,6 @@
3534
<action android:name="org.ros.android.NodeMainExecutorService" />
3635
</intent-filter>
3736
</service>
38-
3937
</application>
4038

4139
</manifest>

app/src/main/java/com/schneewittchen/rosandroid/domain/RosDomain.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.schneewittchen.rosandroid.domain;
22

33
import android.app.Application;
4-
import android.util.Log;
54

65
import androidx.annotation.NonNull;
76
import androidx.lifecycle.LiveData;
@@ -12,10 +11,10 @@
1211
import com.schneewittchen.rosandroid.model.repositories.ConfigRepositoryImpl;
1312
import com.schneewittchen.rosandroid.model.repositories.ConnectionType;
1413
import com.schneewittchen.rosandroid.model.repositories.RosRepository;
14+
import com.schneewittchen.rosandroid.utility.LambdaTask;
1515
import com.schneewittchen.rosandroid.widgets.base.BaseData;
1616
import com.schneewittchen.rosandroid.widgets.base.BaseEntity;
1717

18-
import java.lang.reflect.InvocationTargetException;
1918
import java.util.List;
2019

2120
/**
@@ -28,6 +27,8 @@
2827
* @modified by Nico Studt
2928
* @updated on 15.05.20
3029
* @modified by Nico Studt
30+
* @updated on 27.07.20
31+
* @modified by Nils Rottmann
3132
*/
3233
public class RosDomain {
3334

@@ -44,7 +45,6 @@ public class RosDomain {
4445
private LiveData<List<BaseEntity>> currentWidgets;
4546
private LiveData<MasterEntity> currentMaster;
4647

47-
4848
private RosDomain(@NonNull Application application) {
4949
this.rosRepo = RosRepository.getInstance(application);
5050
this.configRepository = ConfigRepositoryImpl.getInstance(application);
@@ -65,7 +65,6 @@ public static RosDomain getInstance(Application application) {
6565
if (mInstance == null) {
6666
mInstance = new RosDomain(application);
6767
}
68-
6968
return mInstance;
7069
}
7170

@@ -75,7 +74,7 @@ public void informWidgetDataChange(BaseData data) {
7574
}
7675

7776
public void createWidget(String widgetType) {
78-
configRepository.createWidget(widgetType);
77+
new LambdaTask(() -> configRepository.createWidget(widgetType)).execute();
7978
}
8079

8180
public void addWidget(BaseEntity widget) {

app/src/main/java/com/schneewittchen/rosandroid/model/db/ConfigDao.java

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
import com.schneewittchen.rosandroid.model.entities.ConfigEntity;
1414
import com.schneewittchen.rosandroid.model.entities.MasterEntity;
15+
import com.schneewittchen.rosandroid.model.entities.SSHEntity;
16+
import com.schneewittchen.rosandroid.model.entities.WidgetCountEntity;
1517
import com.schneewittchen.rosandroid.model.entities.WidgetEntity;
1618

1719
import java.util.List;
@@ -23,8 +25,10 @@
2325
* @author Nico Studt
2426
* @version 1.0.1
2527
* @created on 31.01.20
26-
* @updated on 05.02.20
27-
* @modified by
28+
* @updated on 04.06.20
29+
* @modified by Nils Rottmann
30+
* @updated on 27.07.20
31+
* @modified by Nils Rottmann
2832
*/
2933
@Dao
3034
public abstract class ConfigDao implements BaseDao<ConfigEntity>{
@@ -49,6 +53,22 @@ public void insertComplete(ConfigEntity config) {
4953
insert(config.master);
5054
}
5155

56+
if (config.ssh != null) {
57+
// Update SSH config id
58+
config.ssh.configId = configId;
59+
60+
// Save SSH
61+
insert(config.ssh);
62+
}
63+
64+
if (config.widgetCounts != null) {
65+
// Update widgetCount config id and save
66+
for(int i=0; i<config.widgetCounts.size(); i++) {
67+
config.widgetCounts.get(i).configId = configId;
68+
insert(config.widgetCounts.get(i));
69+
}
70+
}
71+
5272
for (WidgetEntity widget: config.widgets) {
5373
insert(widget);
5474
}
@@ -76,5 +96,11 @@ public void insertComplete(ConfigEntity config) {
7696
@Insert(onConflict = OnConflictStrategy.REPLACE)
7797
abstract void insert(WidgetEntity widgetEntity);
7898

99+
@Insert(onConflict = OnConflictStrategy.REPLACE)
100+
abstract void insert(WidgetCountEntity widgetCountEntity);
101+
102+
@Insert(onConflict = OnConflictStrategy.REPLACE)
103+
abstract void insert(SSHEntity ssh);
104+
79105

80106
}

0 commit comments

Comments
 (0)