Skip to content

Commit 909004a

Browse files
fix the app messaging and developer message
1 parent 3a8aa48 commit 909004a

File tree

3 files changed

+36
-12
lines changed

3 files changed

+36
-12
lines changed

app/src/main/java/com/blurr/voice/MainActivity.kt

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ class MainActivity : AppCompatActivity() {
365365
}
366366

367367
val recipient = "ayush0000ayush@gmail.com"
368-
val subject = "Please increase limits"
369-
val body = "Hello,\n\nPlease increase the task limits for my account: $userEmail\n\nThank you."
368+
val subject = "I am facing issue in"
369+
val body = "Hello,\n\nI am facing issue for my account: $userEmail\n <issue-content>.... \n\nThank you."
370370

371371
val intent = Intent(Intent.ACTION_SENDTO).apply {
372372
data = Uri.parse("mailto:") // Only email apps should handle this
@@ -502,16 +502,11 @@ class MainActivity : AppCompatActivity() {
502502
}
503503
tasksRemainingTextView.visibility = View.VISIBLE
504504
goProButton.visibility = View.VISIBLE
505-
506-
if (tasksLeft <= 10) {
507-
increaseLimitsLink.visibility = View.VISIBLE
508-
} else {
509-
increaseLimitsLink.visibility = View.GONE
510-
}
505+
increaseLimitsLink.visibility = View.VISIBLE
511506

512507
} else {
513508
tasksRemainingTextView.visibility = View.GONE
514-
increaseLimitsLink.visibility = View.GONE
509+
increaseLimitsLink.visibility = View.VISIBLE
515510
goProButton.visibility = View.VISIBLE
516511
}
517512
}
@@ -751,4 +746,33 @@ class MainActivity : AppCompatActivity() {
751746
}
752747
}
753748

749+
private fun displayDeveloperMessage() {
750+
lifecycleScope.launch {
751+
try {
752+
val db = Firebase.firestore
753+
val docRef = db.collection("settings").document("freemium")
754+
755+
docRef.get().addOnSuccessListener { document ->
756+
if (document != null && document.exists()) {
757+
val message = document.getString("developerMessage")
758+
if (!message.isNullOrEmpty()) {
759+
val developerMessageTextView = findViewById<TextView>(R.id.developer_message_textview)
760+
developerMessageTextView.text = message
761+
developerMessageTextView.visibility = View.VISIBLE
762+
Logger.d("MainActivity", "Developer message displayed: $message")
763+
} else {
764+
Logger.d("MainActivity", "Developer message is empty")
765+
}
766+
} else {
767+
Logger.d("MainActivity", "Developer message document does not exist")
768+
}
769+
}.addOnFailureListener { exception ->
770+
Logger.e("MainActivity", "Error fetching developer message", exception)
771+
}
772+
} catch (e: Exception) {
773+
Logger.e("MainActivity", "Exception in displayDeveloperMessage", e)
774+
}
775+
}
776+
}
777+
754778
}

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
android:clickable="true"
215215
android:focusable="true"
216216
android:padding="8dp"
217-
android:text="Ran out of tasks? Request more."
217+
android:text="Email the Developer with your problems!"
218218
android:textColor="#5880F7"
219219
android:textSize="14sp"
220220
android:visibility="gone"

version.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Do not modify manually - use Gradle tasks to update versions
44

55
# Current version code (integer - increments by 1 each release)
6-
VERSION_CODE=46
6+
VERSION_CODE=47
77

88
# Current version name (semantic version - increments patch number each release)
9-
VERSION_NAME=1.0.46
9+
VERSION_NAME=1.0.47

0 commit comments

Comments
 (0)