mozilla / webmaker-core

React-based core for Webmaker shared across all platforms
https://foundation.mozilla.org/en/artifacts/webmaker/
Mozilla Public License 2.0
64 stars 39 forks source link

Links to URLs - can we intercept links to projects? #844

Open xmatthewx opened 8 years ago

xmatthewx commented 8 years ago

When a user adds a link to URL, they could drop in a link to a project or user. Can we intercept and load these before going to the browser? Easy or hard to implement?

gvn commented 8 years ago

Not sure about difficulty, but I was just noticing that we don't open any Webmaker URL schemes in the app on Android (at least in Marshmallow), which seems like a missed opportunity.

See: Settings -> Apps -> Webmaker -> Open By Default -> Supported links

gvn commented 8 years ago

In theory it does seem like we should be able to "hack" in-app links to other projects in this fashion. Good call!

Any thoughts on implementing this @ryanw-se ?

xmatthewx commented 8 years ago

@k88hudson might know the history. There was a problem that made this difficult for some reason.

xmatthewx commented 8 years ago

cc @alanmoo

gvn commented 8 years ago

FWIW: I was talking about inbound links outside of Webmaker being intercepted in the OS and re-directed into the app automagically (similar to app:// URLs on iOS).

gvn commented 8 years ago

Ideally, though, we should do both inbound and outbound Webmaker project link "hijacking". :+1:

ryanwarsaw commented 8 years ago

@gvn I actually really like that idea, here are my thoughts: I can implement a feature in the new router that will allow you to hook onto the router.callExt(url) method and we can see whats being opened from there, if its a Webmaker project we can handle it within the app.

xmatthewx commented 8 years ago

We'll keep this conversation open. Things to consider:

ryanwarsaw commented 8 years ago

I went ahead and implemented a hook within router.openExternal(url), we can use this for users running pre-android 6 devices, and also provide the enhanced experience for Android 6 and above users.

ryanwarsaw commented 8 years ago

Related: Deep link support in Android Marshmallow, #685.