-2

I am trying to implement branch.io, and its SDK says I need to declare my launcher activity as singleTask. But when I try, it does not open from the market, it gets stuck on launch screen. The mechanics beyond branch.io links is build in such a way, that it seems to use Google Play for opening an activity from the link, so it does not work now.

Is it normal that the splash screen cannot be declared as single task?

Katie Hurley
  • 179
  • 9

1 Answers1

1

Well, it's a bug, it's in Jira: https://jira.appcelerator.org/browse/TIMOB-15253

I managed to launch it in single task mode by adding onResume in alloy.js to my currentActivity (which happens to be the launcher at that time) and relaunching my index from that place.

    if (OS_ANDROID)
    {
        function resumeLauncher() {
          Alloy.createController('index',{
             });
        }
       if (Ti.Android.currentActivity)
       {
          Ti.Android.currentActivity.setOnResume(resumeLauncher)
       }
    }