AndroidAppUri
Stay organized with collections
Save and categorize content based on your preferences.
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. See Extract
Referrer Information section for more information.
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
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 boolean equals (Object object)
public Uri getDeepLinkUri ()
Returns
- deep link
Uri
or
null
, if it does not have a deep link.
public String getPackageName ()
public static AndroidAppUri
newAndroidAppUri (Uri
uri)
Parameters
uri |
Uri with
android-app scheme. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-11 UTC.
[null,null,["Last updated 2021-02-11 UTC."],[],[],null,["# AndroidAppUri\n\npublic final class **AndroidAppUri** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nRepresents an Android app URI.\n\nAn Android app URI can refer to an Android app or a deep link into an Android app. The\nfollowing format is used: android-app://{package_id}/{scheme}/{host_path}, where the scheme\nand host_path parts are optional.\n\nThis class helps with extracting referrer URIs from various sources, including Chrome,\nGoogle App, Googlebot and etc. See [Extract\nReferrer Information](//firebase.google.com/docs/app-indexing/android/measure#extract-referrer-information) section for more information. \n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri#equals(java.lang.Object))([Object](//developer.android.com/reference/java/lang/Object.html) object) |\n| [Uri](//developer.android.com/reference/android/net/Uri.html) | [getDeepLinkUri](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri#getDeepLinkUri())() |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getPackageName](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri#getPackageName())() |\n| int | [hashCode](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri#hashCode())() |\n| static [AndroidAppUri](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri) | [newAndroidAppUri](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri#newAndroidAppUri(android.net.Uri))([Uri](//developer.android.com/reference/android/net/Uri.html) uri) Creates a new [AndroidAppUri](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri) object. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri#toString())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public boolean **equals** ([Object](//developer.android.com/reference/java/lang/Object.html) object)\n\n#### public [Uri](//developer.android.com/reference/android/net/Uri.html) **getDeepLinkUri** ()\n\n##### Returns\n\n- deep link [Uri](//developer.android.com/reference/android/net/Uri.html) or `null`, if it does not have a deep link. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getPackageName** ()\n\n##### Returns\n\n- package name. \n\n#### public int **hashCode** ()\n\n#### public static [AndroidAppUri](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri)\n**newAndroidAppUri** ([Uri](//developer.android.com/reference/android/net/Uri.html) uri)\n\nCreates a new [AndroidAppUri](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri)\nobject. \n\n##### Parameters\n\n| uri | [Uri](//developer.android.com/reference/android/net/Uri.html) with android-app scheme. |\n|-----|----------------------------------------------------------------------------------------|\n\n##### Returns\n\n- new [AndroidAppUri](/docs/reference/android/com/google/firebase/appindexing/AndroidAppUri) object. \n\n##### Throws\n\n| [IllegalArgumentException](//developer.android.com/reference/java/lang/IllegalArgumentException.html) | if the provided URI is not a valid android-app URI. |\n|-------------------------------------------------------------------------------------------------------|-----------------------------------------------------|\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **toString** ()"]]