AndroidAppUri

public final classAndroidAppUri extendsObject

Represents an Android app URI.

An Android app URI can refer to an Android app or a deep link into an Android app. The following format is used: android-app://{package_id}/{scheme}/{host_path}, where the scheme and host_path parts are optional.

This class helps with extracting referrer URIs from various sources, including Chrome, Google App, Googlebot and etc. SeeExtract Referrer Information section for more information.

Public Method Summary

boolean
equals(Object object)
Uri
String
int
staticAndroidAppUri
newAndroidAppUri(Uri uri)
Creates a newAndroidAppUri object.
String

Inherited Method Summary

From class java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
finalClass<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

Public Methods

public booleanequals(Object object)

publicUrigetDeepLinkUri()

Returns
  • deep linkUri ornull, if it does not have a deep link.

publicStringgetPackageName()

Returns
  • package name.

public inthashCode()

public staticAndroidAppUrinewAndroidAppUri(Uri uri)

Creates a newAndroidAppUri object.

Parameters
uriUri with android-app scheme.
Returns
Throws
IllegalArgumentExceptionif the provided URI is not a valid android-app URI.

publicStringtoString()

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2021-02-11 UTC.