aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/WebExternalActivity.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-17 15:32:57 -0700
committerAllan Wang <me@allanwang.ca>2017-06-17 15:32:57 -0700
commit377c96d36418fa1a5709df5ebf4ef87c9cef46c5 (patch)
treec96e9cad924e3fa9c803ba960e4f63ae7ba02d8b /app/src/main/kotlin/com/pitchedapps/frost/WebExternalActivity.kt
parent125cd16f844a27722c947de8be04c4a885c8b6d4 (diff)
downloadfrost-377c96d36418fa1a5709df5ebf4ef87c9cef46c5.tar.gz
frost-377c96d36418fa1a5709df5ebf4ef87c9cef46c5.tar.bz2
frost-377c96d36418fa1a5709df5ebf4ef87c9cef46c5.zip
Add proper external link parsing
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/WebExternalActivity.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/WebExternalActivity.kt51
1 files changed, 51 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/WebExternalActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/WebExternalActivity.kt
new file mode 100644
index 00000000..0f429252
--- /dev/null
+++ b/app/src/main/kotlin/com/pitchedapps/frost/WebExternalActivity.kt
@@ -0,0 +1,51 @@
+package com.pitchedapps.frost
+
+import android.content.Intent
+import android.os.Bundle
+import android.os.PersistableBundle
+import android.support.v7.app.AppCompatActivity
+import ca.allanwang.kau.utils.toast
+import com.jude.swipbackhelper.SwipeBackHelper
+import com.pitchedapps.frost.utils.L
+
+/**
+ * Created by Allan Wang on 2017-06-17.
+ */
+class WebExternalActivity : AppCompatActivity() {
+
+ val url: String?
+ get() = intent?.dataString
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ L.d("Create wea")
+ L.d("URL $url")
+ toast(url!!)
+ SwipeBackHelper.onCreate(this)
+ SwipeBackHelper.getCurrentPage(this)
+ .setSwipeBackEnable(true)
+ .setSwipeSensitivity(0.5f)
+ .setSwipeRelateEnable(true)
+ .setSwipeRelateOffset(300)
+ }
+
+ override fun onNewIntent(intent: Intent?) {
+ super.onNewIntent(intent)
+ L.d("Intent wea")
+ }
+
+ override fun onStart() {
+ super.onStart()
+ L.d("Start")
+ }
+
+ override fun onPostCreate(savedInstanceState: Bundle?) {
+ super.onPostCreate(savedInstanceState)
+ SwipeBackHelper.onPostCreate(this)
+ }
+
+ override fun onDestroy() {
+ super.onDestroy()
+ SwipeBackHelper.onDestroy(this)
+ }
+} \ No newline at end of file