I've been using firebase dynamic links for my app and recently encountered the issue where when clicking on the link, instead of opening a choice view for what to use to open the app (where I can just choose my app) it's instead launching the browser first for a split second, then there's a small loading screen and then the app is launched.
This results a very unpleasant jitter that didn't happen before and I'm not sure what might suddenly cause this (I haven't changed the code). The only changes from before this issue and after is updating my phone to android version 12, and updating the gradle to use compileSdkVersion and targetSdkVersion 30.
Just in case, the code where I build the link for sending:
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND)
.setType("text/plain")
.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
// Construct dynamic link
String link = ParametersConventions.PREFIX
+ "&"
+ ParametersConventions.PARAMETER
+ "="
+ DATA
+ ParametersConventions.POSTFIX;
DynamicLink.Builder builder = FirebaseDynamicLinks.getInstance().createDynamicLink();
builder.setLink(Uri.parse(link));
builder.setAndroidParameters(new DynamicLink.AndroidParameters.Builder("com.my.package").build());
builder.setDomainUriPrefix(ParametersConventions.DOMAIN_PREFIX);
DynamicLink.SocialMetaTagParameters.Builder metaTagsBuilder = new DynamicLink.SocialMetaTagParameters.Builder();
metaTagsBuilder.setTitle("title");
metaTagsBuilder.setDescription("descp");
builder.buildShortDynamicLink().addOnSuccessListener(shortDynamicLink -> {
sendIntent.putExtra(Intent.EXTRA_TEXT, shortDynamicLink.getShortLink().toString());
Intent shareIntent = Intent.createChooser(sendIntent, null);
startActivity(shareIntent);
}).addOnFailureListener(e -> {
});
If anyone encountered it \ has an idea how I might fix it I would greatly appreciate the help. Could this be related to the fact the app isn't yet on Google appstore?