Chromium Code Reviews| Index: Application/src/main/java/org/chromium/customtabsclient/BrowserActionsReceiver.java |
| diff --git a/Application/src/main/java/org/chromium/customtabsclient/BrowserActionsReceiver.java b/Application/src/main/java/org/chromium/customtabsclient/BrowserActionsReceiver.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bd4f5bf3e7317e578b2acb28851713d429840dd2 |
| --- /dev/null |
| +++ b/Application/src/main/java/org/chromium/customtabsclient/BrowserActionsReceiver.java |
| @@ -0,0 +1,17 @@ |
| +package org.chromium.customtabsclient; |
|
Yusuf
2017/07/07 21:36:35
copyright missing
ltian
2017/07/10 18:45:55
Done.
|
| + |
| +import android.content.BroadcastReceiver; |
| +import android.content.Context; |
| +import android.content.Intent; |
| +import android.widget.Toast; |
| + |
| +/** |
| + * A {@link BroadcastReceiver} that handles the callback if default menu items are chosen from Browser Actions. |
| + */ |
| +public class BrowserActionsReceiver extends BroadcastReceiver { |
| + @Override |
| + public void onReceive(Context context, Intent intent) { |
| + String toastMsg = "Chosen item Id: " + intent.getDataString(); |
| + Toast.makeText(context, toastMsg, Toast.LENGTH_SHORT).show(); |
| + } |
| +} |