-
Notifications
You must be signed in to change notification settings - Fork 619
Edit java docs for Firebase App Distribution #3393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,37 +19,38 @@ | |
import com.google.firebase.FirebaseException; | ||
import com.google.firebase.appdistribution.Constants.ErrorMessages; | ||
|
||
/** Possible exceptions thrown in FirebaseAppDistribution */ | ||
/** The class for all Exceptions thrown by {@link FirebaseAppDistribution}. */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are great! |
||
public class FirebaseAppDistributionException extends FirebaseException { | ||
/** Enum for potential error statuses that caused the {@link FirebaseAppDistributionException}. */ | ||
public enum Status { | ||
/** Unknown error. */ | ||
UNKNOWN, | ||
|
||
/** Authentication failed */ | ||
/** The authentication process failed. */ | ||
AUTHENTICATION_FAILURE, | ||
|
||
/** Authentication canceled */ | ||
/** The authentication process was canceled. */ | ||
AUTHENTICATION_CANCELED, | ||
|
||
/** No Network available to make requests or the request timed out */ | ||
/** No network is available to make requests or the request timed out. */ | ||
NETWORK_FAILURE, | ||
|
||
/** Download failed */ | ||
/** The new release failed to download. */ | ||
DOWNLOAD_FAILURE, | ||
|
||
/** Installation failed */ | ||
/** The new release failed to install. */ | ||
INSTALLATION_FAILURE, | ||
|
||
/** Installation canceled */ | ||
/** The installation was canceled. */ | ||
INSTALLATION_CANCELED, | ||
|
||
/** Update not available for the current tester and app */ | ||
/** An update is not available for the current tester and app. */ | ||
UPDATE_NOT_AVAILABLE, | ||
|
||
/** App is in production */ | ||
/** The app is running in production. */ | ||
APP_RUNNING_IN_PRODUCTION, | ||
|
||
/** Host activity for confirmation dialog destroyed or pushed to the backstack */ | ||
/** The host activity for a confirmation dialog was destroyed or pushed to the backstack. */ | ||
HOST_ACTIVITY_INTERRUPTED, | ||
} | ||
|
||
|
@@ -86,12 +87,13 @@ public enum Status { | |
this.release = release; | ||
} | ||
|
||
/** Get cached release when error was thrown */ | ||
/** Returns the release that was ready to be installed when the error was thrown. */ | ||
@Nullable | ||
public AppDistributionRelease getRelease() { | ||
return release; | ||
} | ||
|
||
/** Returns the {@link FirebaseAppDistributionException.Status} that caused the exception. */ | ||
@NonNull | ||
public Status getErrorCode() { | ||
return status; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
import androidx.annotation.Nullable; | ||
import com.google.auto.value.AutoValue; | ||
|
||
/** Data class to get download progress for APKs and the status of the update. Used in updateApp. */ | ||
/** Represents a progress update or a final state from updating an app. */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice description |
||
@AutoValue | ||
public abstract class UpdateProgress { | ||
|
||
|
@@ -28,21 +28,25 @@ static UpdateProgress.Builder builder() { | |
} | ||
|
||
/** | ||
* The number of bytes downloaded so far for the APK. Returns -1 if called on an AAB or if no new | ||
* release is available. | ||
* The number of bytes downloaded so far for an APK. | ||
* | ||
* @returns the number of bytes downloaded, or -1 if called when updating to an AAB or if no new | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, and this should be |
||
* release is available. | ||
*/ | ||
@NonNull | ||
public abstract long getApkBytesDownloaded(); | ||
|
||
/** | ||
* The file size of the APK file to download in bytes. Returns -1 if called on an AAB or if no new | ||
* release is available. | ||
* The file size of the APK file to download in bytes. | ||
* | ||
* @returns the file size in bytes, or -1 if called when updating to an AAB or if no new release | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, and this should be |
||
* is available. | ||
*/ | ||
@NonNull | ||
public abstract long getApkFileTotalBytes(); | ||
|
||
/** Returns the current {@link UpdateStatus} of the update. */ | ||
@NonNull | ||
/** returns the current state of the update */ | ||
public abstract UpdateStatus getUpdateStatus(); | ||
|
||
/** Builder for {@link UpdateProgress}. */ | ||
|
Uh oh!
There was an error while loading. Please reload this page.