Explorer for Android - Opening custom pop up links in separate app

926
2
Jump to solution
04-26-2020 06:00 PM
NathanDuncan
New Contributor III

Hi,

I've built a web map which contains mapped footpath defects. We manage our defects using a separate asset management system which has an app and can be navigated to via a web link. I've configured the pop up to include a dynamic link to the specific defect which when clicked opens the app to the defect no problem.

The issue I'm finding is that on the Android devices we've tested it will open the web link in the app, but the app itself will be within the explorer window, and not it's own separate window. Testing within iOS seems to show that the clicked link opens within the app, separate to the explorer app.

I've attempted to create custom popups with a HTML link with a target="_blank" parameter (which seems to be the default set up anyway) but this doesn't work. I've also checked the default app settings, which are correct, and set the android OS to prompt for the app selection when the link is clicked (as seen on the left in the first screenshot) but this doesn't resolve the issue.

Are there any workarounds to this? Is this related to the explorer app at all or is this due to the other app we're working with? Any help or information is appreciated.

Cheers

Nathan

Ben Van Kesteren

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hey Nathan Duncan

It appears as the app you're working with is not specifying their launch mode to open as a single task. This may be an intentional choice by the application you're integrating with. More details below...

After looking at closer, it appears like the application you're working with from Explorer is launching an activity that has standard launch mode  |  Android Developers  This allows the activity to be opened within another apps context. This is useful for some activities, such as the Camera, that can be used inside other apps without having to actually switch to the camera app. Now, depending on the application your opening this may be intended, but based on what you're describing it sounds like there is some undesirable behavior. 

I can easily reproduce this by creating a sample app what has an intent filter set up for "https://myapplication.app" for an activity that has a standard launchMode. If I switch the launchMode to "singleTask" (first line of code below), the activity is launched within its own task (not Explorer). 

<activity android:name=".MainActivity" android:launchMode="singleTask">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="https" android:host="myapplication.app" />
    </intent-filter>
</activity>

Joel

View solution in original post

2 Replies
by Anonymous User
Not applicable

Hey Nathan Duncan

It appears as the app you're working with is not specifying their launch mode to open as a single task. This may be an intentional choice by the application you're integrating with. More details below...

After looking at closer, it appears like the application you're working with from Explorer is launching an activity that has standard launch mode  |  Android Developers  This allows the activity to be opened within another apps context. This is useful for some activities, such as the Camera, that can be used inside other apps without having to actually switch to the camera app. Now, depending on the application your opening this may be intended, but based on what you're describing it sounds like there is some undesirable behavior. 

I can easily reproduce this by creating a sample app what has an intent filter set up for "https://myapplication.app" for an activity that has a standard launchMode. If I switch the launchMode to "singleTask" (first line of code below), the activity is launched within its own task (not Explorer). 

<activity android:name=".MainActivity" android:launchMode="singleTask">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="https" android:host="myapplication.app" />
    </intent-filter>
</activity>

Joel

NathanDuncan
New Contributor III

Brilliant, thanks for the detailed reply Joel. I'll get in touch with the developers of the app and go from there.

0 Kudos