Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into feat/grpc_newssources
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasjungmann authored Sep 18, 2023
2 parents 9ccfbaf + 598fd74 commit d796da1
Show file tree
Hide file tree
Showing 111 changed files with 504 additions and 3,956 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand Down
13 changes: 5 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ dependencies {
implementation "androidx.room:room-runtime:$room_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
implementation 'android.arch.lifecycle:reactivestreams:1.1.1'
implementation 'android.arch.work:work-runtime-ktx:1.0.1'
implementation 'androidx.appcompat:appcompat:1.4.2'
Expand All @@ -120,10 +121,10 @@ dependencies {
implementation "com.google.android.play:core-ktx:$play_core_services_kotlin_extension"

// Firebase
implementation 'com.google.firebase:firebase-core:20.1.2'
implementation 'com.google.firebase:firebase-core:21.1.1'
implementation 'com.google.firebase:firebase-messaging:23.0.6'
implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.9'
implementation 'com.google.firebase:firebase-analytics-ktx:20.1.2'
implementation 'com.google.firebase:firebase-analytics-ktx:21.3.0'

// Helpers
implementation 'com.google.code.gson:gson:2.9.0'
Expand All @@ -136,11 +137,11 @@ dependencies {

// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.anko:anko:0.10.8"
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.fragment:fragment-ktx:1.4.1'
// Note: fix for internal androidx libraries using outdated WorkManager causing a crash
implementation "androidx.work:work-runtime-ktx:2.7.1"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1'

// RxJava
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
Expand Down Expand Up @@ -186,7 +187,7 @@ dependencies {
testImplementation "commons-io:commons-io:2.11.0"

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.5.11'
testImplementation 'org.mockito:mockito-core:5.5.0'
testImplementation 'org.assertj:assertj-core:3.17.1'
testImplementation "androidx.room:room-testing:$room_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
Expand All @@ -196,10 +197,6 @@ dependencies {
testImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
testImplementation 'org.robolectric:robolectric:4.10.3'


// TicketSale
implementation 'com.stripe:stripe-android:8.1.0'

// gRPC backend
implementation 'io.grpc:grpc-okhttp:1.43.2' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.43.2' // CURRENT_GRPC_VERSION
Expand Down
95 changes: 0 additions & 95 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@
android:configChanges="orientation|screenSize"
android:label="@string/person_information">
</activity>
<activity
android:name=".component.tumui.roomfinder.RoomFinderDetailsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/roomfinder"
android:theme="@style/AppTheme.NoDrawerLayout">
</activity>
<activity
android:name=".component.ui.search.SearchActivity"
android:configChanges="orientation|screenSize"
Expand Down Expand Up @@ -349,18 +343,6 @@
android:label="@string/activity_create_event_title"
android:parentActivityName=".component.tumui.calendar.CalendarActivity">
</activity>

<activity
android:name=".component.ui.chat.activity.JoinRoomScanActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.chat.activity.ChatRoomsActivity"
android:theme="@style/AppThemeFullscreen">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.tum.in.tumcampusapp.component.ui.chat.activity.ChatRoomsActivity" />
</activity>
<activity
android:name=".component.ui.alarm.AlarmActivity"
android:configChanges="orientation|screenSize"
Expand All @@ -384,12 +366,6 @@
android:label="@string/contact_person"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.barrierfree.BarrierFreeInfoActivity" />
<activity
android:name=".component.ui.barrierfree.BarrierFreeFacilitiesActivity"
android:configChanges="orientation|screenSize"
android:label="@string/facilities"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.barrierfree.BarrierFreeInfoActivity" />
<activity
android:name=".component.ui.barrierfree.BarrierFreeMoreInfoActivity"
android:configChanges="orientation|screenSize"
Expand All @@ -403,15 +379,6 @@
android:launchMode="singleTop"
android:parentActivityName=".component.tumui.feedback.FeedbackActivity"
android:theme="@style/AppTheme.NoDrawerLayout" />
<activity
android:name=".component.ui.chat.AddChatMemberActivity"
android:label="Add Participant"
android:parentActivityName=".component.ui.chat.activity.ChatActivity"
android:theme="@style/AppTheme.NoDrawerLayout">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".component.ui.chat.activity.ChatActivity" />
</activity> <!-- receiver for the mensaWidget -->
<receiver
android:name=".component.ui.cafeteria.widget.MensaWidget"
android:label="@string/mensa_widget"
Expand Down Expand Up @@ -529,68 +496,6 @@
</intent-filter>
</receiver>

<activity
android:name=".component.ui.ticket.activity.ShowTicketActivity"
android:configChanges="keyboardHidden|screenSize"
android:label="@string/your_ticket"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.tufilm.KinoActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".component.ui.overview.MainActivity" />
</activity>
<activity
android:name=".component.ui.ticket.activity.BuyTicketActivity"
android:configChanges="orientation|screenSize"
android:label="@string/order_summary"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.tufilm.KinoActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".component.ui.overview.MainActivity" />
</activity>
<activity
android:name=".component.ui.ticket.activity.EventsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/events_tickets"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.overview.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".component.ui.overview.MainActivity" />
</activity>
<activity
android:name=".component.ui.ticket.activity.EventDetailsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/events"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.ticket.activity.EventsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".component.ui.ticket.activity.EventsActivity" />
</activity>
<activity
android:name=".component.ui.ticket.activity.StripePaymentActivity"
android:configChanges="orientation|screenSize"
android:label="@string/enter_card_info_title"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.ticket.activity.BuyTicketActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".component.ui.overview.MainActivity" />
</activity>
<activity
android:name=".component.ui.ticket.activity.PaymentConfirmationActivity"
android:configChanges="orientation|screenSize"
android:label="@string/payment_confirmation"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.ticket.activity.StripePaymentActivity"
android:theme="@style/AppTheme.NoDrawerLayout">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".component.ui.ticket.activity.StripePaymentActivity" />
</activity>

<receiver android:name=".component.notifications.receivers.NotificationReceiver" />
<receiver android:name=".component.notifications.receivers.NotificationAlarmReceiver" />
<receiver android:name=".component.tumui.grades.GradeNotificationDeleteReceiver" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package de.tum.`in`.tumcampusapp.api.app

import com.google.protobuf.Empty
import de.tum.`in`.tumcampusapp.BuildConfig
import de.tum.`in`.tumcampusapp.api.backend.CampusGrpc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.tum.in.tumcampusapp.api.app;

import java.util.HashMap;
import java.util.List;

import de.tum.in.tumcampusapp.api.app.model.DeviceRegister;
Expand All @@ -9,25 +8,20 @@
import de.tum.in.tumcampusapp.api.app.model.TUMCabeStatus;
import de.tum.in.tumcampusapp.api.app.model.TUMCabeVerification;
import de.tum.in.tumcampusapp.api.app.model.UploadStatus;
import de.tum.in.tumcampusapp.component.other.locations.model.BuildingToGps;
import de.tum.in.tumcampusapp.component.tumui.feedback.model.Feedback;
import de.tum.in.tumcampusapp.component.tumui.feedback.model.FeedbackResult;
import de.tum.in.tumcampusapp.component.tumui.roomfinder.model.RoomFinderCoordinate;
import de.tum.in.tumcampusapp.component.tumui.roomfinder.model.RoomFinderMap;
import de.tum.in.tumcampusapp.component.tumui.roomfinder.model.RoomFinderRoom;
import de.tum.in.tumcampusapp.component.tumui.roomfinder.model.RoomFinderSchedule;
import de.tum.in.tumcampusapp.component.ui.alarm.model.FcmNotification;
import de.tum.in.tumcampusapp.component.ui.alarm.model.FcmNotificationLocation;
import de.tum.in.tumcampusapp.component.ui.barrierfree.model.BarrierFreeContact;
import de.tum.in.tumcampusapp.component.ui.barrierfree.model.BarrierFreeMoreInfo;
import de.tum.in.tumcampusapp.component.ui.cafeteria.model.Cafeteria;
import de.tum.in.tumcampusapp.component.ui.openinghour.model.Location;
import de.tum.in.tumcampusapp.component.ui.chat.model.ChatMember;
import de.tum.in.tumcampusapp.component.ui.chat.model.ChatMessage;
import de.tum.in.tumcampusapp.component.ui.chat.model.ChatRoom;
import de.tum.in.tumcampusapp.component.ui.news.model.News;
import de.tum.in.tumcampusapp.component.ui.news.model.NewsAlert;
import de.tum.in.tumcampusapp.component.ui.news.model.NewsSources;
import de.tum.in.tumcampusapp.component.ui.openinghour.model.Location;
import de.tum.in.tumcampusapp.component.ui.studyroom.model.StudyRoomGroup;
import de.tum.in.tumcampusapp.component.ui.ticket.model.Event;
import de.tum.in.tumcampusapp.component.ui.ticket.model.Ticket;
Expand All @@ -49,12 +43,8 @@
import retrofit2.http.Path;

import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_BARRIER_FREE;
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_BARRIER_FREE_BUILDINGS_TO_GPS;
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_BARRIER_FREE_CONTACT;
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_BARRIER_FREE_LIST_OF_ELEVATORS;
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_BARRIER_FREE_LIST_OF_TOILETS;
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_BARRIER_FREE_MORE_INFO;
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_BARRIER_FREE_NERBY_FACILITIES;
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_CAFETERIAS;
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_CHAT_MEMBERS;
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_CHAT_ROOMS;
Expand All @@ -75,46 +65,11 @@
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_TICKET;

public interface TUMCabeAPIService {

//Group chat
@POST(API_CHAT_ROOMS)
Call<ChatRoom> createRoom(@Body TUMCabeVerification verification);

@GET(API_CHAT_ROOMS + "{room}")
Call<ChatRoom> getChatRoom(@Path("room") int id);

@POST(API_CHAT_ROOMS + "{room}/leave/")
Call<ChatRoom> leaveChatRoom(@Path("room") int roomId, @Body TUMCabeVerification verification);

@POST(API_CHAT_ROOMS + "{room}/add/{member}")
Call<ChatRoom> addUserToChat(@Path("room") int roomId, @Path("member") int userId, @Body TUMCabeVerification verification);

//Get/Update single message
@PUT(API_CHAT_ROOMS + "{room}/message/")
Observable<ChatMessage> sendMessage(@Path("room") int roomId, @Body TUMCabeVerification message);

@PUT(API_CHAT_ROOMS + "{room}/message/{message}/")
Observable<ChatMessage> updateMessage(@Path("room") int roomId, @Path("message") int messageId, @Body TUMCabeVerification message);

//Get all recent messages or older ones
@POST(API_CHAT_ROOMS + "{room}/messages/{page}/")
Observable<List<ChatMessage>> getMessages(@Path("room") int roomId, @Path("page") long messageId, @Body TUMCabeVerification verification);

@POST(API_CHAT_ROOMS + "{room}/messages/")
Observable<List<ChatMessage>> getNewMessages(@Path("room") int roomId, @Body TUMCabeVerification verification);

@POST(API_CHAT_MEMBERS)
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Call<ChatMember> createMember(@Body ChatMember chatMember);

@GET(API_CHAT_MEMBERS + "{lrz_id}/")
Call<ChatMember> getMember(@Path("lrz_id") String lrzId);

@GET(API_CHAT_MEMBERS + "search/{query}/")
Call<List<ChatMember>> searchMemberByName(@Path("query") String nameQuery);

@POST(API_CHAT_MEMBERS + "{memberId}/rooms/")
Call<List<ChatRoom>> getMemberRooms(@Path("memberId") int memberId, @Body TUMCabeVerification verification);

@POST(API_MEMBERS + "uploadIds/{lrzId}/")
Observable<TUMCabeStatus> uploadObfuscatedIds(@Path("lrzId") String lrzId, @Body ObfuscatedIdsUpload ids);

Expand Down Expand Up @@ -148,35 +103,6 @@ public interface TUMCabeAPIService {
@GET(API_BARRIER_FREE + API_BARRIER_FREE_MORE_INFO)
Call<List<BarrierFreeMoreInfo>> getMoreInfoList();

// Barrier free toilets list
@GET(API_BARRIER_FREE + API_BARRIER_FREE_LIST_OF_TOILETS)
Call<List<RoomFinderRoom>> getListOfToilets();

// Barrier free elevator list
@GET(API_BARRIER_FREE + API_BARRIER_FREE_LIST_OF_ELEVATORS)
Call<List<RoomFinderRoom>> getListOfElevators();

// Barrier free nearby list
@GET(API_BARRIER_FREE + API_BARRIER_FREE_NERBY_FACILITIES + "{buildingId}/")
Call<List<RoomFinderRoom>> getListOfNearbyFacilities(@Path("buildingId") String buildingId);

// building to gps information
@GET(API_BARRIER_FREE + API_BARRIER_FREE_BUILDINGS_TO_GPS)
Call<List<BuildingToGps>> getBuilding2Gps();

//RoomFinder maps
@GET(API_ROOM_FINDER + API_ROOM_FINDER_AVAILABLE_MAPS + "{archId}")
Call<List<RoomFinderMap>> fetchAvailableMaps(@Path("archId") String archId);

//RoomFinder cordinates
@GET(API_ROOM_FINDER + API_ROOM_FINDER_COORDINATES + "{archId}")
Call<RoomFinderCoordinate> fetchCoordinates(@Path("archId") String archId);

//RoomFinder schedule
@GET(API_ROOM_FINDER + API_ROOM_FINDER_SCHEDULE + "{roomId}" + "/" + "{start}" + "/" + "{end}")
Call<List<RoomFinderSchedule>> fetchSchedule(@Path("roomId") String archId,
@Path("start") String start, @Path("end") String end);

@POST(API_FEEDBACK)
Call<FeedbackResult> sendFeedback(@Body Feedback feedback);

Expand Down Expand Up @@ -204,30 +130,35 @@ Call<List<RoomFinderSchedule>> fetchSchedule(@Path("roomId") String archId,
// Getting Event information

@GET(API_EVENTS + "list")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Observable<List<Event>> getEvents();

// Getting Ticket information
@POST(API_EVENTS + API_TICKET + "my")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Observable<List<Ticket>> getTickets(@Body TUMCabeVerification verification);

@POST(API_EVENTS + API_TICKET + "{ticketID}")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Call<Ticket> getTicket(@Path("ticketID") int ticketID, @Body TUMCabeVerification verification);

@GET(API_EVENTS + API_TICKET + "type/{eventID}")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Observable<List<TicketType>> getTicketTypes(@Path("eventID") int eventID);

// Ticket reservation
@POST(API_EVENTS + API_TICKET + "reserve/multiple")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Call<TicketReservationResponse> reserveTicket(@Body TUMCabeVerification verification);

// Ticket purchase
@POST(API_EVENTS + API_TICKET + "payment/stripe/purchase/multiple")
Call<List<Ticket>> purchaseTicketStripe(@Body TUMCabeVerification verification);

@POST(API_EVENTS + API_TICKET + "payment/stripe/ephemeralkey")
Call<HashMap<String, Object>> retrieveEphemeralKey(@Body TUMCabeVerification verification);

@GET(API_EVENTS + API_TICKET + "status/{event}")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Single<List<TicketStatus>> getTicketStats(@Path("event") int event);

// Opening Hours
Expand Down
Loading

0 comments on commit d796da1

Please sign in to comment.