Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile onboarding #55

Open
ArinCantCode opened this issue Nov 20, 2020 · 3 comments · May be fixed by #86
Open

Mobile onboarding #55

ArinCantCode opened this issue Nov 20, 2020 · 3 comments · May be fixed by #86
Labels
enhancement New feature or request

Comments

@ArinCantCode
Copy link

Is there a way i can use the onboard process for mobile users and redirect them directly to the app store / android?

@addragoninc
Copy link

Agreed

@hshar7
Copy link

hshar7 commented Feb 16, 2021

Why isn't this added !?! It's a no brainer

@Gudahtt Gudahtt added the enhancement New feature or request label Jun 3, 2021
@trapped
Copy link
Contributor

trapped commented Jul 2, 2021

Just quickly skimmed the code, but it should be possible to detect iOS/Android here:

static _detectBrowser() {
const browserInfo = Bowser.parse(window.navigator.userAgent);
if (browserInfo.browser.name === 'Firefox') {
return 'FIREFOX';
} else if (
['Chrome', 'Chromium'].includes(browserInfo.browser.name || '')
) {
return 'CHROME';
}
return null;
}

or in a separate method, then using the result here:

const browser = Onboarding._detectBrowser();
if (browser) {
this.downloadUrl = EXTENSION_DOWNLOAD_URL[browser];
} else {
this.downloadUrl = EXTENSION_DOWNLOAD_URL.DEFAULT;
}

to redirect to App Store/Play Store deep links.

That said, as far as I know the way MetaMask works on mobile is opening the dApp in a WebView inside the MetaMask app, which doesn't share the browser session, so this could break assumptions by dApp devs.

kneirinck pushed a commit to kneirinck/metamask-onboarding that referenced this issue Feb 11, 2022
@kneirinck kneirinck linked a pull request Feb 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
5 participants