1

I'm currently working on an android instant app. I used firebase hosting, to verify the app links.

This works fine for https links: https://xyz.firebaseapp.com/.well-known/assetlinks.json. But when I want to release the instant app, google forces me to support http routing aswell: https://xyz.firebaseapp.com/.well-known/assetlinks.json.

The Problem with http is, that firebase hosting automatically reroutes http requests to https and app linking doesn't support rerouting for the assetlinks url.

Is there a possibility to disable https rerouting and to get this working with firebase hosting ? Do you know any alternatives to firebase hosting ?

Oliver
  • 503
  • 1
  • 3
  • 13

2 Answers2

2

Firebase Hosting absolutely requires HTTPS for security purposes.

Any traffic coming in on HTTP is redirected to the corresponding HTTPS URL. There is no way to change this behavior.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
2

Checking on https://developer.android.com/topic/google-play-instant/faqs, I found:

  • Are there any limitations on how an instant app handles network traffic?

    All the network traffic from inside instant apps must use HTTPS. Instant apps doesn't support HTTP.

For app link to instant apps its different. All intent filters used as app links in your instant app must support both HTTP and HTTPS.

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="http" android:host="www.example.com" />
    <data android:scheme="https" />
</intent-filter>

If you are trying to connect to a local IP addess with Instant Apps, then check this post: Connecting to a local IP address with Instant apps

Finally, Since App Links are regular URLs, apps can force them to be opened inside an in-app browser; therefore, do consider using someting linke Firebase Dynamic Links to wrap your URLs and guarantee that clicks on your links always take users to your instant app.

If this doesn't provide you with an expected answer, please let me know so I can remove this answer.

acarlstein
  • 1,799
  • 2
  • 13
  • 21