Home > Net >  When packageName is different between dev env and prd env (flutter flavor), how to set dynamic link
When packageName is different between dev env and prd env (flutter flavor), how to set dynamic link

Time:11-29

I'm using flutter flavor. Android packagename is defferent between dev env and prd env.

I set firebase dynamic link for Android, When the app is not installed, move user to Google PlayStore app page.

In PRD env it works very well. But in DEV env is does not work.

I guess the reason is packageName. PRD packageName(androidPackageName=com.XXX.OOO) is applied to PlayStore, but Dev packageName(androidPackageName=com.XXX.OOO.dev) is not applied.

(BTW iOS app move user to AppStore, regardless of flavor(prd, dev both work well)

How to move dev env test user to PlayStore from dynamic link? Is it possible linking dev packageName with prd packageName?

CodePudding user response:

Remove MainActivity from the android/app/src/main/AndroidManifest.xml and put it in android/app/src/prod/AndroidManifest.xml and android/app/src/dev/AndroidManifest.xml.

In dev's manifest, you can change the 'host' to your dev url.

CodePudding user response:

1]Remove MainActivity from the android/app/src/main/AndroidManifest.xml.
2]put it in android/app/src/prod/AndroidManifest.xml.
3]android/app/src/dev/AndroidManifest.xml.
4]In dev's manifest, you can change the 'host' to your dev URL.
  • Related