AndroidAppUri | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Methods | Inherited Methods | [Expand All]
public final class

# AndroidAppUri

extends Object

java.lang.Object
↳ | com.google.android.gms.appindexing.AndroidAppUri

## Class Overview

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. See the App Indexing documentation for more information.

## Summary

Public Methods
boolean | equals(Object object)
Uri | getDeepLinkUri()
String | getPackageName()
int | hashCode()
static AndroidAppUri | newAndroidAppUri(Uri uri) Creates a new `AndroidAppUri` object.
static AndroidAppUri | newAndroidAppUri(String packageName, Uri deepLink) Creates a new `AndroidAppUri` object.
String | toString()
Uri | toUri()

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## 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 ()

##### Returns

- package name.

#### public int hashCode ()

#### public static AndroidAppUri newAndroidAppUri (Uri uri)

Creates a new `AndroidAppUri` object.

##### Parameters

uri | `Uri` with android-app scheme.

##### Returns

- new `AndroidAppUri` object.

##### Throws

IllegalArgumentException | if the provided URI is not a valid android-app URI.

#### public static AndroidAppUri newAndroidAppUri (String packageName, Uri deepLink)

Creates a new `AndroidAppUri` object.

##### Parameters

packageName | package name for android-app `Uri`.
deepLink | deep link for android-app `Uri`.

##### Returns

- new `AndroidAppUri` object.

##### Throws

IllegalArgumentException | if the provided packageName or deepLink is not valid.

#### public String toString ()

#### public Uri toUri ()

##### Returns

- `Uri` form.