diff --git a/app/build.gradle b/app/build.gradle index dd0a15f..4f454dd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,7 +10,7 @@ android { applicationId "com.uam.wmi.findmytutor" minSdkVersion 22 targetSdkVersion 27 - versionCode 2 + versionCode 17 versionName "0.9.2-alpha" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true @@ -34,6 +34,8 @@ dependencies { implementation "ch.acra:acra-http:$acraVersion" implementation "ch.acra:acra-toast:$acraVersion" implementation "ch.acra:acra-notification:$acraVersion" + implementation "ch.acra:acra-limiter:$acraVersion" + implementation fileTree(include: ['*.jar'], dir: 'libs') diff --git a/app/release/release/app.aab b/app/release/release/app.aab index c0a50db..aa09d96 100644 Binary files a/app/release/release/app.aab and b/app/release/release/app.aab differ diff --git a/app/src/main/java/com/uam/wmi/findmytutor/FindMyTutor.java b/app/src/main/java/com/uam/wmi/findmytutor/FindMyTutor.java index 763c4b5..0c2298f 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/FindMyTutor.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/FindMyTutor.java @@ -7,6 +7,7 @@ import android.content.res.Configuration; import static org.acra.ReportField.*; import org.acra.ACRA; +import org.acra.annotation.AcraLimiter; import org.acra.annotation.AcraNotification; import org.acra.config.CoreConfigurationBuilder; import org.acra.config.HttpSenderConfigurationBuilder; @@ -20,6 +21,7 @@ import java.util.Map; @AcraNotification(resText = R.string.notification_text, resTitle = R.string.notification_title, resChannelName = R.string.notification_channel) +@AcraLimiter(failedReportLimit = 2) public class FindMyTutor extends Application { @Override protected void attachBaseContext(Context base) { diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java index 91cf913..189f28a 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java @@ -149,9 +149,9 @@ public class LoginActivity extends AppCompatActivity { private void loginProcess(String email, String password) { ValidateUser user = new ValidateUser(email, password); -// LdapUser fakeUser = new LdapUser(email, password,"wmi","tutor",email,"Fałszywy",email); -// disposable.add(ldapService.fakeValidate(fakeUser) + //LdapUser fakeUser = new LdapUser(email, password,"wmi","tutor",email,"Fałszywy",email); disposable.add(ldapService.validate(user) + //disposable.add(ldapService.fakeValidate(fakeUser) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::handleResponse, this::handleError)); diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java index 0d8b299..d355d2e 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java @@ -4,6 +4,8 @@ import android.Manifest; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.annotation.SuppressLint; +import android.app.Dialog; +import android.graphics.drawable.ColorDrawable; import android.location.Location; import android.os.Bundle; import android.os.Handler; @@ -11,11 +13,14 @@ import android.support.v4.content.ContextCompat; import android.support.v7.app.AlertDialog; import android.text.TextUtils; import android.util.Log; +import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.animation.LinearInterpolator; import android.widget.Button; import android.widget.EditText; +import android.widget.LinearLayout; +import android.widget.PopupWindow; import android.widget.TextView; import android.widget.Toast; @@ -47,6 +52,7 @@ import com.uam.wmi.findmytutor.service.CoordinateService; import com.uam.wmi.findmytutor.service.PredefinedStatusesService; import com.uam.wmi.findmytutor.service.UserService; import com.uam.wmi.findmytutor.utils.ApproximatedLocalization; +import com.uam.wmi.findmytutor.utils.InfoHelperUtils; import com.uam.wmi.findmytutor.utils.ManualLocationUtils; import com.uam.wmi.findmytutor.utils.MapMarker; import com.uam.wmi.findmytutor.utils.MapUtils; @@ -67,6 +73,8 @@ import io.reactivex.schedulers.Schedulers; import okhttp3.ResponseBody; import timber.log.Timber; +import static com.mapbox.mapboxsdk.Mapbox.getApplicationContext; + public class MapActivity extends BaseActivity implements PermissionsListener, OnMapReadyCallback { @@ -123,7 +131,7 @@ public class MapActivity extends BaseActivity }; - + findViewById(R.id.mapInfoImageButton).setOnClickListener(v-> InfoHelperUtils.infoPopUp(v, R.layout.info_popup_map)); selectLocationButton = findViewById(R.id.select_location_button); removeLocationButton = findViewById(R.id.remove_location_button); mapView = findViewById(R.id.mapView); @@ -134,6 +142,7 @@ public class MapActivity extends BaseActivity handleBackgroundTaskLifeCycle(); manualLocationUtils = new ManualLocationUtils(MapActivity.this); approximatedLocalization = new ApproximatedLocalization(MapUtils.loadJsonFromAsset(getApplicationContext(), "building.geojson")); + } @Override @@ -727,4 +736,5 @@ public class MapActivity extends BaseActivity public void adjustMapToSearch(Integer zoom) { MapUtils.setZoom(mapboxMap, zoom); } -} + +} \ No newline at end of file diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/TutorTab.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/TutorTab.java index d98a4f5..f96a2b0 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/TutorTab.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/TutorTab.java @@ -18,6 +18,7 @@ import com.uam.wmi.findmytutor.model.User; import com.uam.wmi.findmytutor.network.ApiClient; import com.uam.wmi.findmytutor.service.TutorTabApi; import com.uam.wmi.findmytutor.service.UserService; +import com.uam.wmi.findmytutor.utils.InfoHelperUtils; import com.uam.wmi.findmytutor.utils.PrefUtils; import com.uam.wmi.findmytutor.utils.RestApiHelper; @@ -60,6 +61,7 @@ public class TutorTab extends AppCompatActivity { TextView userEmail = findViewById(R.id.userEmail); TextView department = findViewById(R.id.userDepartment); Button saveButon = findViewById(R.id.saveButon); + findViewById(R.id.contentTutorTabInfoImageButton).setOnClickListener(v-> InfoHelperUtils.infoPopUp(v,R.layout.info_popup_tutor_tab)); userName.setText(String.format("%s %s", PrefUtils.getUserFirstName(getApplicationContext()), PrefUtils.getUserLastName(getApplicationContext()))); disposable.add( diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/UsersListFragment.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/UsersListFragment.java index 4430e89..f034f44 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/UsersListFragment.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/UsersListFragment.java @@ -15,6 +15,7 @@ import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; +import android.widget.Toast; import com.annimon.stream.Stream; import com.jakewharton.retrofit2.adapter.rxjava2.HttpException; @@ -27,6 +28,7 @@ import com.uam.wmi.findmytutor.model.User; import com.uam.wmi.findmytutor.network.ApiClient; import com.uam.wmi.findmytutor.service.TutorTabApi; import com.uam.wmi.findmytutor.service.UserService; +import com.uam.wmi.findmytutor.utils.InfoHelperUtils; import com.uam.wmi.findmytutor.utils.MyDividerItemDecoration; import com.uam.wmi.findmytutor.utils.RecyclerTouchListener; import com.uam.wmi.findmytutor.utils.RestApiHelper; @@ -76,11 +78,13 @@ public class UsersListFragment extends Fragment { mAdapter = new TutorsListAdapter(getActivity().getApplicationContext(), tutorsFiltered); View view = inflater.inflate(R.layout.users_list, container, false); view.setBackgroundColor(getResources().getColor(android.R.color.white)); + return view; } public void onViewCreated(View view, Bundle savedInstanceState) { ButterKnife.bind(this, view); + view.findViewById(R.id.userListInfoImageButton).setOnClickListener(v -> InfoHelperUtils.infoPopUp(v,R.layout.info_popup_userlist)); userService = ApiClient.getClient(getApplicationContext()) .create(UserService.class); @@ -151,11 +155,11 @@ public class UsersListFragment extends Fragment { List dutyHoursList = Stream.of(tutorTabViewModel.getDutyHours()) .map(DutyHourViewModel::getSummary).toList(); - if(dutyHoursList.isEmpty()){ + if (dutyHoursList.isEmpty()) { dutyHoursList.add(getString(R.string.lack_duty_hours)); } - if(tutorTabViewModel.getNote().isEmpty()){ + if (tutorTabViewModel.getNote().isEmpty()) { userNoteText = getString(R.string.lack_note); } @@ -210,6 +214,7 @@ public class UsersListFragment extends Fragment { @Override public void onSuccess(List users) { tutorsList.clear(); + tutorsFiltered.clear(); tutorsList.addAll(users); tutorsFiltered.addAll(users); mAdapter.notifyDataSetChanged(); @@ -225,7 +230,7 @@ public class UsersListFragment extends Fragment { private int sortByUserName(User t1, User t2) { - return plCollator.compare(t1.getLastName(),t2.getLastName()); + return plCollator.compare(t1.getLastName(), t2.getLastName()); } private void showError(Throwable e) { @@ -234,7 +239,7 @@ public class UsersListFragment extends Fragment { if (e instanceof HttpException) { ResponseBody responseBody = ((HttpException) e).response().errorBody(); message = RestApiHelper.getErrorMessage(responseBody); - }else{ + } else { message = "Network Error !"; } diff --git a/app/src/main/java/com/uam/wmi/findmytutor/model/Coordinate.java b/app/src/main/java/com/uam/wmi/findmytutor/model/Coordinate.java index 0323cfd..7a75d9d 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/model/Coordinate.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/model/Coordinate.java @@ -20,9 +20,6 @@ public class Coordinate extends BaseResponse { private Range longtitudeRange = Const.buildingLongitudeRange; private List allowedApproximatedLocations = Const.validApproximatedLocations; - @SerializedName("coordinateId") - private UUID coordinateId = null; - @SerializedName("latitude") private Double latitude; @@ -66,23 +63,9 @@ public class Coordinate extends BaseResponse { } public Coordinate coordinateId(UUID coordinateId) { - this.coordinateId = coordinateId; return this; } - /** - * Get coordinateId - * @return coordinateId - **/ - @ApiModelProperty(required = true, value = "") - public UUID getCoordinateId() { - return coordinateId; - } - - public void setCoordinateId(UUID coordinateId) { - this.coordinateId = coordinateId; - } - public Coordinate latitude(Double latitude) { this.latitude = latitude; return this; @@ -236,8 +219,7 @@ public class Coordinate extends BaseResponse { return false; } Coordinate coordinate = (Coordinate) o; - return Objects.equals(this.coordinateId, coordinate.coordinateId) && - Objects.equals(this.latitude, coordinate.latitude) && + return Objects.equals(this.latitude, coordinate.latitude) && Objects.equals(this.longitude, coordinate.longitude) && Objects.equals(this.altitude, coordinate.altitude) && Objects.equals(this.userId, coordinate.userId) && @@ -249,7 +231,7 @@ public class Coordinate extends BaseResponse { @Override public int hashCode() { - return Objects.hash(coordinateId, latitude, longitude, altitude, userId, approximatedLocation, displayMode, timeStamp, label); + return Objects.hash( latitude, longitude, altitude, userId, approximatedLocation, displayMode, timeStamp, label); } @@ -258,7 +240,6 @@ public class Coordinate extends BaseResponse { StringBuilder sb = new StringBuilder(); sb.append("class Coordinate {\n"); - sb.append(" coordinateId: ").append(toIndentedString(coordinateId)).append("\n"); sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n"); sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n"); sb.append(" altitude: ").append(toIndentedString(altitude)).append("\n"); diff --git a/app/src/main/java/com/uam/wmi/findmytutor/service/BackgroundLocalizationService.java b/app/src/main/java/com/uam/wmi/findmytutor/service/BackgroundLocalizationService.java index 3377a35..3d3bdef 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/service/BackgroundLocalizationService.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/service/BackgroundLocalizationService.java @@ -25,6 +25,7 @@ import android.util.Log; import com.annimon.stream.Stream; import com.google.android.gms.location.FusedLocationProviderClient; import com.google.android.gms.location.LocationServices; +import com.jakewharton.retrofit2.adapter.rxjava2.HttpException; import com.mapbox.geojson.Point; import com.mapbox.mapboxsdk.geometry.LatLng; import com.uam.wmi.findmytutor.model.Coordinate; @@ -32,6 +33,7 @@ import com.uam.wmi.findmytutor.network.ApiClient; import com.uam.wmi.findmytutor.utils.ApproximatedLocalization; import com.uam.wmi.findmytutor.utils.MapUtils; import com.uam.wmi.findmytutor.utils.PrefUtils; +import com.uam.wmi.findmytutor.utils.RestApiHelper; import com.uam.wmi.findmytutor.utils.SharingLevel; import org.apache.commons.collections4.queue.CircularFifoQueue; @@ -42,8 +44,10 @@ import java.util.concurrent.atomic.AtomicReference; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; +import io.reactivex.observers.DisposableCompletableObserver; import io.reactivex.observers.DisposableSingleObserver; import io.reactivex.schedulers.Schedulers; +import okhttp3.ResponseBody; import static com.uam.wmi.findmytutor.utils.Const.offlineBackgroundLocationInterval; import static com.uam.wmi.findmytutor.utils.Const.onlineBackgroundLocationInterval; @@ -51,6 +55,7 @@ import static com.uam.wmi.findmytutor.utils.Const.presenceApproximatedName; import static com.uam.wmi.findmytutor.utils.Const.presenceLatitude; import static com.uam.wmi.findmytutor.utils.Const.presenceLongitude; import static com.uam.wmi.findmytutor.utils.PrefUtils.storeBackgroundLocationStatus; +import static java.lang.String.valueOf; public class BackgroundLocalizationService extends Service { @@ -353,18 +358,21 @@ public class BackgroundLocalizationService extends Service { disposable.add( coordinateService - .postCoordinate(coordinate) + .putCoordinate(coordinate, PrefUtils.getUserId(getApplicationContext())) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribeWith(new DisposableSingleObserver() { + .subscribeWith(new DisposableCompletableObserver() { + @Override - public void onSuccess(Coordinate coordinate) { - Log.e(TAG, String.valueOf(coordinate)); + public void onComplete() { + Log.e(TAG, "CoordinateSuccess"); } @Override public void onError(Throwable e) { - Log.e(TAG, e.getMessage()); + + Log.e(TAG,"onErr" + valueOf(e)); + } })); } catch (IllegalArgumentException e) { diff --git a/app/src/main/java/com/uam/wmi/findmytutor/service/CoordinateService.java b/app/src/main/java/com/uam/wmi/findmytutor/service/CoordinateService.java index 18ec984..d49dded 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/service/CoordinateService.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/service/CoordinateService.java @@ -3,6 +3,7 @@ package com.uam.wmi.findmytutor.service; import com.uam.wmi.findmytutor.model.Coordinate; import java.util.List; +import io.reactivex.Completable; import io.reactivex.Single; import retrofit2.http.Body; import retrofit2.http.DELETE; @@ -36,9 +37,9 @@ public interface CoordinateService { Single postCoordinate(@Body Coordinate coordinate); @PUT("api/coordinates/{id}") - Single putCoordinatesById(@Path("id") String id); + Completable putCoordinate(@Body Coordinate coordinate, @Path("id") String id); @DELETE("api/coordinates/{id}") - Single deleteCoordinatesById(@Path("id") String id); + Completable deleteCoordinatesById(@Path("id") String id); } diff --git a/app/src/main/java/com/uam/wmi/findmytutor/utils/InfoHelperUtils.java b/app/src/main/java/com/uam/wmi/findmytutor/utils/InfoHelperUtils.java new file mode 100644 index 0000000..232e3ae --- /dev/null +++ b/app/src/main/java/com/uam/wmi/findmytutor/utils/InfoHelperUtils.java @@ -0,0 +1,42 @@ +package com.uam.wmi.findmytutor.utils; + +import android.app.Activity; +import android.content.Context; +import android.graphics.drawable.ColorDrawable; +import android.support.v7.app.AlertDialog; +import android.view.Gravity; +import android.view.LayoutInflater; +import android.view.View; +import android.view.WindowManager; +import android.widget.Button; +import android.widget.LinearLayout; +import android.widget.PopupWindow; +import android.widget.Toast; + + +import com.uam.wmi.findmytutor.R; + +import static com.mapbox.mapboxsdk.Mapbox.getApplicationContext; + +public class InfoHelperUtils { + + + + public static void infoPopUp(View anchorView, int layoutId) { + LayoutInflater layoutInflater = (LayoutInflater)getApplicationContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE ); + View popupView = layoutInflater.inflate(layoutId, null); + + PopupWindow popupWindow = new PopupWindow(popupView, + LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); + // If the PopupWindow should be focusable + popupWindow.setFocusable(true); + // If you need the PopupWindow to dismiss when when touched outside + popupWindow.setBackgroundDrawable(new ColorDrawable()); + int location[] = new int[2]; + // Get the View's(the one that was clicked in the Fragment) location + anchorView.getLocationOnScreen(location); + // Using location, the PopupWindow will be displayed right under anchorView + popupWindow.showAtLocation(anchorView, Gravity.NO_GRAVITY, + location[0] + anchorView.getWidth() / 2, location[1] + anchorView.getHeight()); + } +} diff --git a/app/src/main/java/com/uam/wmi/findmytutor/utils/SharingInfoPopupButtonPreference.java b/app/src/main/java/com/uam/wmi/findmytutor/utils/SharingInfoPopupButtonPreference.java new file mode 100644 index 0000000..88aad9d --- /dev/null +++ b/app/src/main/java/com/uam/wmi/findmytutor/utils/SharingInfoPopupButtonPreference.java @@ -0,0 +1,44 @@ +package com.uam.wmi.findmytutor.utils; + +import android.content.Context; +import android.graphics.drawable.ColorDrawable; +import android.preference.Preference; +import android.util.AttributeSet; +import android.view.Gravity; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; +import android.widget.ImageButton; +import android.widget.LinearLayout; +import android.widget.PopupWindow; +import android.widget.Toast; + +import com.uam.wmi.findmytutor.R; + +import static com.mapbox.mapboxsdk.Mapbox.getApplicationContext; + +public class SharingInfoPopupButtonPreference extends Preference { + + public SharingInfoPopupButtonPreference(Context context, AttributeSet attrs) { + super(context, attrs); + setWidgetLayoutResource(R.layout.preference_popup_info_button_widget); + } + @Override + protected View onCreateView(ViewGroup parent) { + View view = super.onCreateView(parent); +// LayoutInflater li = (LayoutInflater)getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE ); +// View temp =li.inflate( R.layout.preference_button_widget, parent, false); + return view; + } + @Override + protected void onBindView(View view) + { + super.onBindView(view); + ImageButton button = view.findViewById(R.id.sharingTabInfoImageButton); + button.setOnClickListener(v-> { + InfoHelperUtils.infoPopUp(v,R.layout.info_popup_sharing_tab); + }); + } + +} diff --git a/app/src/main/res/drawable-hdpi/outline_info_white_18.png b/app/src/main/res/drawable-hdpi/outline_info_white_18.png new file mode 100644 index 0000000..0f0e6e3 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/outline_info_white_18.png differ diff --git a/app/src/main/res/drawable-hdpi/outline_info_white_24.png b/app/src/main/res/drawable-hdpi/outline_info_white_24.png new file mode 100644 index 0000000..e84735d Binary files /dev/null and b/app/src/main/res/drawable-hdpi/outline_info_white_24.png differ diff --git a/app/src/main/res/drawable-hdpi/outline_info_white_36.png b/app/src/main/res/drawable-hdpi/outline_info_white_36.png new file mode 100644 index 0000000..51bee06 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/outline_info_white_36.png differ diff --git a/app/src/main/res/drawable-hdpi/outline_info_white_48.png b/app/src/main/res/drawable-hdpi/outline_info_white_48.png new file mode 100644 index 0000000..a726e63 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/outline_info_white_48.png differ diff --git a/app/src/main/res/drawable-mdpi/outline_info_white_18.png b/app/src/main/res/drawable-mdpi/outline_info_white_18.png new file mode 100644 index 0000000..b642d34 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/outline_info_white_18.png differ diff --git a/app/src/main/res/drawable-mdpi/outline_info_white_24.png b/app/src/main/res/drawable-mdpi/outline_info_white_24.png new file mode 100644 index 0000000..3cd3871 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/outline_info_white_24.png differ diff --git a/app/src/main/res/drawable-mdpi/outline_info_white_36.png b/app/src/main/res/drawable-mdpi/outline_info_white_36.png new file mode 100644 index 0000000..e84735d Binary files /dev/null and b/app/src/main/res/drawable-mdpi/outline_info_white_36.png differ diff --git a/app/src/main/res/drawable-mdpi/outline_info_white_48.png b/app/src/main/res/drawable-mdpi/outline_info_white_48.png new file mode 100644 index 0000000..dbbbea8 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/outline_info_white_48.png differ diff --git a/app/src/main/res/drawable-xhdpi/outline_info_white_18.png b/app/src/main/res/drawable-xhdpi/outline_info_white_18.png new file mode 100644 index 0000000..e84735d Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/outline_info_white_18.png differ diff --git a/app/src/main/res/drawable-xhdpi/outline_info_white_24.png b/app/src/main/res/drawable-xhdpi/outline_info_white_24.png new file mode 100644 index 0000000..dbbbea8 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/outline_info_white_24.png differ diff --git a/app/src/main/res/drawable-xhdpi/outline_info_white_36.png b/app/src/main/res/drawable-xhdpi/outline_info_white_36.png new file mode 100644 index 0000000..a726e63 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/outline_info_white_36.png differ diff --git a/app/src/main/res/drawable-xhdpi/outline_info_white_48.png b/app/src/main/res/drawable-xhdpi/outline_info_white_48.png new file mode 100644 index 0000000..9baf6dc Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/outline_info_white_48.png differ diff --git a/app/src/main/res/drawable-xxhdpi/outline_info_white_18.png b/app/src/main/res/drawable-xxhdpi/outline_info_white_18.png new file mode 100644 index 0000000..51bee06 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/outline_info_white_18.png differ diff --git a/app/src/main/res/drawable-xxhdpi/outline_info_white_24.png b/app/src/main/res/drawable-xxhdpi/outline_info_white_24.png new file mode 100644 index 0000000..a726e63 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/outline_info_white_24.png differ diff --git a/app/src/main/res/drawable-xxhdpi/outline_info_white_36.png b/app/src/main/res/drawable-xxhdpi/outline_info_white_36.png new file mode 100644 index 0000000..3c7c30c Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/outline_info_white_36.png differ diff --git a/app/src/main/res/drawable-xxhdpi/outline_info_white_48.png b/app/src/main/res/drawable-xxhdpi/outline_info_white_48.png new file mode 100644 index 0000000..192361b Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/outline_info_white_48.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/outline_info_white_18.png b/app/src/main/res/drawable-xxxhdpi/outline_info_white_18.png new file mode 100644 index 0000000..a726e63 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/outline_info_white_18.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/outline_info_white_24.png b/app/src/main/res/drawable-xxxhdpi/outline_info_white_24.png new file mode 100644 index 0000000..9baf6dc Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/outline_info_white_24.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/outline_info_white_36.png b/app/src/main/res/drawable-xxxhdpi/outline_info_white_36.png new file mode 100644 index 0000000..192361b Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/outline_info_white_36.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/outline_info_white_48.png b/app/src/main/res/drawable-xxxhdpi/outline_info_white_48.png new file mode 100644 index 0000000..d3213de Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/outline_info_white_48.png differ diff --git a/app/src/main/res/drawable/ic_info_black_24dp.xml b/app/src/main/res/drawable/ic_info_black_24dp.xml index 34b8202..d63bdac 100644 --- a/app/src/main/res/drawable/ic_info_black_24dp.xml +++ b/app/src/main/res/drawable/ic_info_black_24dp.xml @@ -1,9 +1,9 @@ - +android:width="24dp" +android:height="24dp" +android:viewportHeight="24.0" +android:viewportWidth="24.0"> + diff --git a/app/src/main/res/drawable/layout_bg.xml b/app/src/main/res/drawable/layout_bg.xml new file mode 100644 index 0000000..574781c --- /dev/null +++ b/app/src/main/res/drawable/layout_bg.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/outline_info_24.xml b/app/src/main/res/drawable/outline_info_24.xml new file mode 100644 index 0000000..b23561d --- /dev/null +++ b/app/src/main/res/drawable/outline_info_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/activity_map.xml b/app/src/main/res/layout/activity_map.xml index bdf45f3..20477f0 100644 --- a/app/src/main/res/layout/activity_map.xml +++ b/app/src/main/res/layout/activity_map.xml @@ -2,7 +2,6 @@ + + + tools:layout_editor_absoluteY="0dp"> diff --git a/app/src/main/res/layout/content_tutor_tab.xml b/app/src/main/res/layout/content_tutor_tab.xml index 8bc6144..dae766a 100644 --- a/app/src/main/res/layout/content_tutor_tab.xml +++ b/app/src/main/res/layout/content_tutor_tab.xml @@ -1,5 +1,6 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/info_popup_sharing_tab.xml b/app/src/main/res/layout/info_popup_sharing_tab.xml new file mode 100644 index 0000000..9022593 --- /dev/null +++ b/app/src/main/res/layout/info_popup_sharing_tab.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/info_popup_tutor_tab.xml b/app/src/main/res/layout/info_popup_tutor_tab.xml new file mode 100644 index 0000000..7f5feb8 --- /dev/null +++ b/app/src/main/res/layout/info_popup_tutor_tab.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/info_popup_userlist.xml b/app/src/main/res/layout/info_popup_userlist.xml new file mode 100644 index 0000000..b06a52c --- /dev/null +++ b/app/src/main/res/layout/info_popup_userlist.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/pref_sharing.xml b/app/src/main/res/layout/pref_sharing.xml index 23f1d06..f5f41de 100644 --- a/app/src/main/res/layout/pref_sharing.xml +++ b/app/src/main/res/layout/pref_sharing.xml @@ -1,12 +1,13 @@ + + diff --git a/app/src/main/res/layout/preference_popup_info_button_widget.xml b/app/src/main/res/layout/preference_popup_info_button_widget.xml new file mode 100644 index 0000000..0a12f86 --- /dev/null +++ b/app/src/main/res/layout/preference_popup_info_button_widget.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/app/src/main/res/layout/users_list.xml b/app/src/main/res/layout/users_list.xml index 397f01e..e87d8be 100644 --- a/app/src/main/res/layout/users_list.xml +++ b/app/src/main/res/layout/users_list.xml @@ -1,15 +1,22 @@ - + + diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index db10ac8..bac8b17 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -160,13 +160,59 @@ Błąd podczas pobierania danych. Błąd podczas pobierania statusów. Upss. Coś poszło nie tak. Pracujemy nad tym! - Brak informacji o dyzurze. + Brak informacji o dyżurze. Brak notatki. Wyszukiwarka Nie przeszkadzać Czekam na studentów Na wakacjach Status + + + Na mapie wyświetlane są markery reprezentujące profesorów udostępniających w tej chwili swoją lokalizację. + Po kliknięciu w marker możemy sprawdzić kto udostępnia lokalizację, oraz status opisowy (jeśli profesor go ustawił). + W aplikacji dostępne są 3 rodzaje lokalizacji, które reprezentowane są przez markery różnego koloru. + lokalizacja dokładna (udostępniana z GPS telefonu) + lokalizacja przybliżona + lokalizacja manualna (wybrana ręcznie) + + + W tym panelu możesz dodać użytkowników do swojej czarnej listy. Użytkownicy z czarnej listy nie będą widzieć żadnych danych które udostępniasz - lokalizacji, twojego statusu online, czy informacji o obecności. + Jedyną informacją która wciąż będzie udostępniana wszystkim jest notka w Twoim profilu. + Za pomocą powyższego przycisku możesz włączyć lub wyłączyć używanie czarnej listy. Czarna lista nie może być aktywna jednocześnie z białą listą. + + + W tym panelu możesz dodać użytkowników do swojej białej listy. Użytkownicy SPOZA listy nie będą widzieć żadnych danych które udostępniasz - lokalizacji, twojego statusu online, czy informacji o obecności. + Jedyną informacją która wciąż będzie udostępniana wszystkim jest notka w Twoim profilu. + Za pomocą powyższego przycisku możesz włączyć lub wyłączyć używanie białej listy. Biała lista nie może być aktywna jednocześnie z czarną listą. + + + W tej zakładce możesz edytować swój profil widoczny dla wszystkich użytkowników. + Jeśli zakładka jest pusta lub zawiera nieaktualne dane, możesz je ręcznie uaktualnić. + W każdej chwili możesz przywrócić dane ze strony WMI za pomocą przycisku (jeśli są dostępne na stronie). + Dodatkowo możesz uzupełnić notkę, aby przekazać jakąś informację widoczną dla wszystkich studentów: np. “dzisiejszy dyżur odwołany” itp. + + + W tej zakładce możesz włączyć/wyłączyć udostępnianie swojej lokalizacji oraz ją skonfigurować. + Niektóre zmiany mogą nie być widoczne od razu! Odświeżanie informacji zajmuje do 2 minut. + Udostępniać możesz na jednym z 4 poziomów: + dokładny - lokalizacja wyświetlana na mapie na podstawie GPS + przybliżony - przybliżona lokalizacja wyświetlana na podstawie GPS + manualny - udostępnianie z ręcznie wybranego punktu na mapie + tylko obecność - udostępnianie jedynie informacji o pojawieniu się na wydziale (aktywny na liście), bez udostępniania lokalizacji + Każdy poziom z wyjątkiem manualnie wybranej lokalizacji automatycznie zaczyna udostępniać po wejściu na wydział i przestaje udostępniać po jego opuszczeniu. Wystarczy włączyć udostępnianie, a lokalizacja nie będzie udostępniana tylko przy obecności na wydziale. + Udostępnianie w dowolnym momencie można wyłączyć za pomocą przełącznika. + Dodatkowo, do Twojej lokalizacji możesz dodać status opisowy (będzie on widoczny dla użytkowników po kliknięciu w marker). + Zarówno manualne lokalizacje jak i statusy możesz dodać do listy, które potem możesz wybrać w wygodny sposób. + + + W tym panelu znajduje się listę profesorów. + Ich status symbolizowany jest przez kolorowe kropki: + - użytkownik jest obecnie online + - użytkownik jest obecnie offline + - użytkownik jest nieaktywny + (nie udostępnił żadnych danych o lokalizacji od conajmniej tygodnia) + diff --git a/app/src/main/res/values/attrs_info_button.xml b/app/src/main/res/values/attrs_info_button.xml new file mode 100644 index 0000000..b5dfdad --- /dev/null +++ b/app/src/main/res/values/attrs_info_button.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f848cbc..ad51adb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -246,4 +246,55 @@ No note. Search mock location string + + + Allow to send raport to developers is ON + Allow to send raport to developers is OFF + App issues reporting + + + On the map there are markers which represents tutors sharing their location right now. + After clicking on a marker, you can check who is sharing it and the descriptive status (if the tutor have set one). + In the app there are 3 possible types of localization, represented by various colors. + exact localization (from mobile GPS) + approximated localization + manual localization (manually picked) + + + In this panel you can add users to your blacklist. Users from the blacklist can’t see any data that you share - localization, online status, or information about presence. + The only thing which remains public is the note in your profile. + With the switch you can turn on/off usage of the blacklist. Blacklist and whitelist cannot be active at the same time. + + + In this panel you can add users to your whitelist. Users OUT OF the whitelist can’t see any data that you share - localization, online status, or information about presence. + The only thing which remains public is the note in your profile. + With the switch you can turn on/off usage of the whitelist. Blacklist and whitelist cannot be active at the same time. + + + In this tab you can edit you profile visible for all the users. + If the tab is empty or contains outdated information, you can update them manually. + Any time you can restore data from the WMI website with the button (if the data is available). + Additionally, you can fill your note, to share a message visible for all the users: for example “today’s duty hours are cancelled” etc. + + + In this tab you can turn on/off sharing your localization and configure it. + Some of the changes may not happen immediately! Refreshing information takes up to 2 minutes. + You can share your localization on one of the 4 levels: + exact - localization displayed on a map, based on GPS + approximated - approximated localization based on GPS + manual - sharing from manually picked point + presence only - sharing only information whether you are present on the faculty or not, without sharing your localization + Each level, except from manual, will be automatically turned on when entering, and turn off when leaving the faculty. You only need to make sure that sharing is on, and the localization will be shared only when on the faculty. + Sharing can be turned off at any time with the switch. + Additionally, you can add descriptive status to your localization (visible for users after clicking on a marker). + Both manual localizations and statuses can be added to a list, and then used them in a convenient way. + + + This panel contains the list of tutors. + Their status is represented by colorful dots: + - user is currently online + - user is currently offline + - user is inactive + (didn’t share any localization data since 7 days) +