This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
open nav.tum.sexy to show location (#1443)
* open nav.tum.sexy to show location * calender detail call navigatumactivity * add NavigatumActivity to manifest * create NavigatumActivity * remove unused import * change namestyle Co-authored-by: Frank Elsinga <[email protected]> * change namestyle Co-authored-by: Frank Elsinga <[email protected]> * change namestyle Co-authored-by: Frank Elsinga <[email protected]> Co-authored-by: Frank Elsinga <[email protected]>
- Loading branch information
1 parent
ed5ac75
commit 082b4c5
Showing
3 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
app/src/main/java/de/tum/in/tumcampusapp/component/tumui/calendar/NavigatumActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package de.tum.`in`.tumcampusapp.component.tumui.calendar | ||
|
||
import android.annotation.SuppressLint | ||
import androidx.appcompat.app.AppCompatActivity | ||
import android.os.Bundle | ||
import android.webkit.WebView | ||
|
||
class NavigaTUMActivity : AppCompatActivity() { | ||
@SuppressLint("SetJavaScriptEnabled") | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
val intent = getIntent() | ||
val location = intent.getStringExtra("location") | ||
val encoded_location = java.net.URLEncoder.encode(location, "utf-8") | ||
val url = "https://nav.tum.sexy/search?q=${encoded_location}" | ||
val webview = WebView(this) | ||
setContentView(webview) | ||
webview.settings.javaScriptEnabled = true | ||
webview.loadUrl(url) | ||
} | ||
} |