-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
3 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
.../java/euromsg/com/euromobileandroid/notification/NotificationActionBroadcastReceiver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package euromsg.com.euromobileandroid.notification; | ||
|
||
import android.content.BroadcastReceiver; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
|
||
public class NotificationActionBroadcastReceiver extends BroadcastReceiver { | ||
private final NotificationActionListener callback; | ||
|
||
public NotificationActionBroadcastReceiver(NotificationActionListener callback) { | ||
this.callback = callback; | ||
} | ||
@Override | ||
public void onReceive(Context context, Intent intent) { | ||
String linkUri = ""; | ||
if (intent != null && "ACTION_CLICK".equals(intent.getAction())) { | ||
linkUri = intent.getStringExtra("KEY_ACTION_ITEM"); | ||
} | ||
|
||
callback.onNotificationActionClicked(linkUri); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
.../src/main/java/euromsg/com/euromobileandroid/notification/NotificationActionListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package euromsg.com.euromobileandroid.notification; | ||
|
||
public interface NotificationActionListener { | ||
void onNotificationActionClicked(String link); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters