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

Shorten app-invite links #708

Open
tasomaniac opened this issue Oct 30, 2016 · 0 comments
Open

Shorten app-invite links #708

tasomaniac opened this issue Oct 30, 2016 · 0 comments

Comments

@tasomaniac
Copy link
Member

tasomaniac commented Oct 30, 2016

Firebase finally allows dynamic long urls to be shorten via a REST api.
Unfortunately this is not available in the SDK yet. But it is not hard to do.
Hopefully this will make our share urls a little bit nicer.

Here is more info: https://firebase.google.com/docs/dynamic-links/short-links

I think a best way to do it would be to display a ProgressDialog to shorten the url. Then we can fire share intent.

This example with SHORT param would be feasible. As an API_KEY, our web api key from BuildConfig can be used.

POST https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=api_key
Content-Type: application/json

{
   "longDynamicLink": "https://abc123.app.goo.gl/?link=http://example.com/&apn=com.example.android&ibi=com.example.ios",
   "suffix": { "option": "SHORT" }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant