Skip to content

Commit

Permalink
Fix notifications on Android 14
Browse files Browse the repository at this point in the history
  • Loading branch information
c99koder committed Jul 15, 2024
1 parent 18e28a5 commit 7c76427
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ android {
namespace "com.irccloud.android"

defaultConfig {
versionCode 360
versionCode 361
versionName "4.33"
minSdkVersion 22
targetSdkVersion 34
Expand Down
1 change: 1 addition & 0 deletions src/com/irccloud/android/activity/QuickReplyActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ public boolean onKey(View view, int keyCode, KeyEvent event) {
public void onClick(View view) {
if (message.getText() != null && message.getText().length() > 0) {
Intent i = new Intent(RemoteInputService.ACTION_REPLY);
i.setPackage(getPackageName());
i.setComponent(new ComponentName(getPackageName(), RemoteInputService.class.getName()));
i.putExtras(getIntent());
i.putExtra("reply", message.getText().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ private void showOtherNotifications() {
ticker = n.getNick() + " is trying to contact you on " + n.getNetwork();

Intent i = new Intent(RemoteInputService.ACTION_REPLY);
i.setPackage(IRCCloudApplication.getInstance().getPackageName());
i.setComponent(new ComponentName(IRCCloudApplication.getInstance().getApplicationContext().getPackageName(), RemoteInputService.class.getName()));
i.putExtra("cid", n.getCid());
i.putExtra("eid", n.getEid());
Expand All @@ -461,6 +462,7 @@ private void showOtherNotifications() {
text = n.getNick() + " has been added to your accept list";
ticker = n.getNick() + " has been added to your accept list on " + n.getNetwork();
Intent i = new Intent(RemoteInputService.ACTION_REPLY);
i.setPackage(IRCCloudApplication.getInstance().getPackageName());
i.setComponent(new ComponentName(IRCCloudApplication.getInstance().getApplicationContext().getPackageName(), RemoteInputService.class.getName()));
i.putExtra("cid", n.getCid());
i.putExtra("eid", n.getEid());
Expand Down Expand Up @@ -861,6 +863,7 @@ public int compare(Notification notification, Notification t1) {
title = last.getNetwork();

Intent replyIntent = new Intent(RemoteInputService.ACTION_REPLY);
replyIntent.setPackage(IRCCloudApplication.getInstance().getPackageName());
replyIntent.putExtra("bid", last.getBid());
replyIntent.putExtra("cid", last.getCid());
replyIntent.putExtra("eids", eids);
Expand Down Expand Up @@ -1011,6 +1014,7 @@ public void onImageFetched(Bitmap image) {
title = last.getNetwork();

Intent replyIntent = new Intent(RemoteInputService.ACTION_REPLY);
replyIntent.setPackage(IRCCloudApplication.getInstance().getPackageName());
replyIntent.putExtra("bid", last.getBid());
replyIntent.putExtra("cid", last.getCid());
replyIntent.putExtra("network", last.getNetwork());
Expand Down

0 comments on commit 7c76427

Please sign in to comment.