Commit 0aebba4
committed
fix(messages): Improve reliability of opening the default SMS app
This commit adds a fallback mechanism to the `openTextMessagesApp` function.
Previously, the function relied solely on a generic `CATEGORY_APP_MESSAGING` intent, which could fail. Now, if the initial attempt fails, it will try to get the default SMS package using `Telephony.Sms.getDefaultSmsPackage(this)` and launch it directly. This increases the chances of successfully opening the user's chosen text messaging application.1 parent 739c407 commit 0aebba4
File tree
1 file changed
+13
-2
lines changed- app/src/main/java/com/github/codeworkscreativehub/common
1 file changed
+13
-2
lines changedLines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
136 | 147 | | |
137 | 148 | | |
138 | 149 | | |
| |||
0 commit comments