diff --git a/README.md b/README.md
index 5de8756..2861a7c 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
# ntfy Android App
-This is the Android app for [ntfy](https://github.com/binwiederhier/ntfy) ([ntfy.sh](https://ntfy.sh)).
-**It is very much work in progress. Also: I'm new to Android development, so I'm still learning.**
+This is the Android app for [ntfy](https://github.com/binwiederhier/ntfy) ([ntfy.sh](https://ntfy.sh)).
-## ...
-...
+## Current limitations
+* The app on the Play store only works with ntfy.sh, not with other hosts, due to the fact that background services in
+ Android are pretty much impossible to implement.
## License
Made with ❤️ by [Philipp C. Heckel](https://heckel.io), distributed under the [Apache License 2.0](LICENSE).
@@ -13,5 +13,6 @@ Thank you to these fantastic resources:
* [Just another Hacker News Android client](https://github.com/manoamaro/another-hacker-news-client) (MIT)
* [Android Room with a View](https://github.com/googlecodelabs/android-room-with-a-view/tree/kotlin) (Apache 2.0)
* [Firebase Messaging Example](https://github.com/firebase/quickstart-android/blob/7147f60451b3eeaaa05fc31208ffb67e2df73c3c/messaging/app/src/main/java/com/google/firebase/quickstart/fcm/kotlin/MyFirebaseMessagingService.kt) (Apache 2.0)
+* [Designing a logo with Inkscape](https://www.youtube.com/watch?v=r2Kv61cd2P4)
Thanks to these projects for allowing me to copy-paste a lot.
diff --git a/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt b/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt
index a8b0615..50f200a 100644
--- a/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt
+++ b/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt
@@ -88,6 +88,8 @@ class MainActivity : AppCompatActivity() {
val subscription = Subscription(id = Random.nextLong(), baseUrl = baseUrl, topic = topic, notifications = 0, lastActive = Date().time/1000)
viewModel.add(subscription)
FirebaseMessaging.getInstance().subscribeToTopic(topic) // FIXME ignores baseUrl
+
+ onSubscriptionItemClick(subscription) // Add to detail view after adding it
}
private fun onSubscriptionItemClick(subscription: Subscription) {
diff --git a/app/src/main/res/layout/main_activity.xml b/app/src/main/res/layout/main_activity.xml
index dde3d90..fd1709c 100644
--- a/app/src/main/res/layout/main_activity.xml
+++ b/app/src/main/res/layout/main_activity.xml
@@ -10,6 +10,7 @@
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
+ android:layout_marginTop="10dp"
android:background="?android:attr/selectableItemBackground"
app:layoutManager="LinearLayoutManager" android:visibility="gone"/>
+
+
-
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 009f7d1..437928f 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -20,6 +20,8 @@
%1$d notifications received
Add subscription
It looks like you don\'t have any subscriptions yet.
+ Click the button below to create or subscribe to a topic. After that, you can send messages via PUT or POST and you\'ll receive notifications on your phone.
+ For more detailed instructions, check out the ntfy.sh website and documentation.
Subscribe to topic
@@ -41,5 +43,5 @@
Send test notification
- Delete topic
+ Unsubscribe