1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-12-22 19:08:03 +01:00

Handle Intent.Action.Main in handleIntent()

This commit is contained in:
vanitasvitae 2016-10-01 01:30:58 +02:00
parent e0e8adac19
commit d8cbe480ad

View file

@ -182,8 +182,10 @@ public class MainActivity extends AppCompatActivity
});
if(!appSettings.hasPodDomain()) {
AppLog.d(this, "We have no pod. Show PodSelectionFragment");
showFragment(getFragment(PodSelectionFragment.TAG));
} else {
AppLog.d(this, "Pod found. Handle intents.");
//Handle intent
Intent intent = getIntent();
if (intent != null && intent.getAction() != null) {
@ -386,7 +388,9 @@ public class MainActivity extends AppCompatActivity
String type = intent.getType();
String loadUrl = null;
AppLog.v(this, "Action: " + action + " Type: " + type);
if (ACTION_OPEN_URL.equals(action)) {
if (Intent.ACTION_MAIN.equals(action)) {
loadUrl = urls.getStreamUrl();
} else if (ACTION_OPEN_URL.equals(action)) {
loadUrl = intent.getStringExtra(URL_MESSAGE);
} else if (Intent.ACTION_VIEW.equals(action) && intent.getDataString() != null) {
Uri data = intent.getData();