Add handling for extra "android::action:onReceive:intentUrl"

This commit is contained in:
Michael Zöller
2020-02-17 10:23:58 +01:00
committed by Jannis Mattheis
parent f8422f4ef1
commit 668e050add

View File

@@ -222,6 +222,17 @@ public class WebSocketService extends Service {
Intent intent; Intent intent;
String intentUrl =
Extras.getNestedValue(
String.class, extras, "android::action", "onReceive", "intentUrl");
if (intentUrl != null) {
intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(intentUrl));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
String url = String url =
Extras.getNestedValue(String.class, extras, "client::notification", "click", "url"); Extras.getNestedValue(String.class, extras, "client::notification", "click", "url");