From e39b62c04d2650424af2be50a1b7cdd0b6e41886 Mon Sep 17 00:00:00 2001 From: Mila <107142260+milaGGL@users.noreply.github.com> Date: Thu, 13 Aug 2026 12:30:43 -0400 Subject: [PATCH 1/3] [ModelDownloader] Update the deprecation message --- firebase-ml-modeldownloader/CHANGELOG.md | 2 + firebase-ml-modeldownloader/api.txt | 116 ++++++++-------- .../ml/modeldownloader/CustomModel.java | 36 ++--- .../CustomModelDownloadConditions.java | 54 ++++---- .../ml/modeldownloader/DownloadType.java | 24 ++-- .../modeldownloader/FirebaseMlException.java | 131 +++++++++--------- .../FirebaseModelDownloader.java | 48 +++---- .../ml/modeldownloader/ModelDownloader.kt | 6 +- 8 files changed, 208 insertions(+), 209 deletions(-) diff --git a/firebase-ml-modeldownloader/CHANGELOG.md b/firebase-ml-modeldownloader/CHANGELOG.md index 978b078c11a..2ce5f532b77 100644 --- a/firebase-ml-modeldownloader/CHANGELOG.md +++ b/firebase-ml-modeldownloader/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +- [changed] Updated the Firebase ML deprecation message to link to the Firebase ML documentation for migration options. + # 26.1.0 - [deprecated] Firebase ML is deprecated and will be shut down on June 15, 2027. diff --git a/firebase-ml-modeldownloader/api.txt b/firebase-ml-modeldownloader/api.txt index f693f42c9f7..196dc000a79 100644 --- a/firebase-ml-modeldownloader/api.txt +++ b/firebase-ml-modeldownloader/api.txt @@ -1,79 +1,79 @@ // Signature format: 3.0 package com.google.firebase.ml.modeldownloader { - public class CustomModel { - method public long getDownloadId(); - method public java.io.File? getFile(); - method public String getModelHash(); - method public String getName(); - method public long getSize(); + @Deprecated public class CustomModel { + method @Deprecated public long getDownloadId(); + method @Deprecated public java.io.File? getFile(); + method @Deprecated public String getModelHash(); + method @Deprecated public String getName(); + method @Deprecated public long getSize(); } - public class CustomModelDownloadConditions { - method public boolean isChargingRequired(); - method public boolean isDeviceIdleRequired(); - method public boolean isWifiRequired(); + @Deprecated public class CustomModelDownloadConditions { + method @Deprecated public boolean isChargingRequired(); + method @Deprecated public boolean isDeviceIdleRequired(); + method @Deprecated public boolean isWifiRequired(); } - public static class CustomModelDownloadConditions.Builder { - ctor public CustomModelDownloadConditions.Builder(); - method public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions build(); - method @RequiresApi(android.os.Build.VERSION_CODES.N) public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireCharging(); - method @RequiresApi(android.os.Build.VERSION_CODES.N) public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireDeviceIdle(); - method public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireWifi(); + @Deprecated public static class CustomModelDownloadConditions.Builder { + ctor @Deprecated public CustomModelDownloadConditions.Builder(); + method @Deprecated public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions build(); + method @Deprecated @RequiresApi(android.os.Build.VERSION_CODES.N) public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireCharging(); + method @Deprecated @RequiresApi(android.os.Build.VERSION_CODES.N) public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireDeviceIdle(); + method @Deprecated public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireWifi(); } - public enum DownloadType { - enum_constant public static final com.google.firebase.ml.modeldownloader.DownloadType LATEST_MODEL; - enum_constant public static final com.google.firebase.ml.modeldownloader.DownloadType LOCAL_MODEL; - enum_constant public static final com.google.firebase.ml.modeldownloader.DownloadType LOCAL_MODEL_UPDATE_IN_BACKGROUND; + @Deprecated public enum DownloadType { + enum_constant @Deprecated public static final com.google.firebase.ml.modeldownloader.DownloadType LATEST_MODEL; + enum_constant @Deprecated public static final com.google.firebase.ml.modeldownloader.DownloadType LOCAL_MODEL; + enum_constant @Deprecated public static final com.google.firebase.ml.modeldownloader.DownloadType LOCAL_MODEL_UPDATE_IN_BACKGROUND; } - public class FirebaseMlException extends com.google.firebase.FirebaseException { - method @com.google.firebase.ml.modeldownloader.FirebaseMlException.Code public int getCode(); - field public static final int ABORTED = 10; // 0xa - field public static final int ALREADY_EXISTS = 6; // 0x6 - field public static final int CANCELLED = 1; // 0x1 - field public static final int DEADLINE_EXCEEDED = 4; // 0x4 - field public static final int DOWNLOAD_URL_EXPIRED = 121; // 0x79 - field public static final int FAILED_PRECONDITION = 9; // 0x9 - field public static final int INTERNAL = 13; // 0xd - field public static final int INVALID_ARGUMENT = 3; // 0x3 - field public static final int MODEL_HASH_MISMATCH = 102; // 0x66 - field public static final int NOT_ENOUGH_SPACE = 101; // 0x65 - field public static final int NOT_FOUND = 5; // 0x5 - field public static final int NO_NETWORK_CONNECTION = 17; // 0x11 - field public static final int OUT_OF_RANGE = 11; // 0xb - field public static final int PERMISSION_DENIED = 7; // 0x7 - field public static final int RESOURCE_EXHAUSTED = 8; // 0x8 - field public static final int UNAUTHENTICATED = 16; // 0x10 - field public static final int UNAVAILABLE = 14; // 0xe - field public static final int UNIMPLEMENTED = 12; // 0xc - field public static final int UNKNOWN = 2; // 0x2 + @Deprecated public class FirebaseMlException extends com.google.firebase.FirebaseException { + method @Deprecated @com.google.firebase.ml.modeldownloader.FirebaseMlException.Code public int getCode(); + field @Deprecated public static final int ABORTED = 10; // 0xa + field @Deprecated public static final int ALREADY_EXISTS = 6; // 0x6 + field @Deprecated public static final int CANCELLED = 1; // 0x1 + field @Deprecated public static final int DEADLINE_EXCEEDED = 4; // 0x4 + field @Deprecated public static final int DOWNLOAD_URL_EXPIRED = 121; // 0x79 + field @Deprecated public static final int FAILED_PRECONDITION = 9; // 0x9 + field @Deprecated public static final int INTERNAL = 13; // 0xd + field @Deprecated public static final int INVALID_ARGUMENT = 3; // 0x3 + field @Deprecated public static final int MODEL_HASH_MISMATCH = 102; // 0x66 + field @Deprecated public static final int NOT_ENOUGH_SPACE = 101; // 0x65 + field @Deprecated public static final int NOT_FOUND = 5; // 0x5 + field @Deprecated public static final int NO_NETWORK_CONNECTION = 17; // 0x11 + field @Deprecated public static final int OUT_OF_RANGE = 11; // 0xb + field @Deprecated public static final int PERMISSION_DENIED = 7; // 0x7 + field @Deprecated public static final int RESOURCE_EXHAUSTED = 8; // 0x8 + field @Deprecated public static final int UNAUTHENTICATED = 16; // 0x10 + field @Deprecated public static final int UNAVAILABLE = 14; // 0xe + field @Deprecated public static final int UNIMPLEMENTED = 12; // 0xc + field @Deprecated public static final int UNKNOWN = 2; // 0x2 } - @IntDef({com.google.firebase.ml.modeldownloader.FirebaseMlException.CANCELLED, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNKNOWN, com.google.firebase.ml.modeldownloader.FirebaseMlException.INVALID_ARGUMENT, com.google.firebase.ml.modeldownloader.FirebaseMlException.DEADLINE_EXCEEDED, com.google.firebase.ml.modeldownloader.FirebaseMlException.NOT_FOUND, com.google.firebase.ml.modeldownloader.FirebaseMlException.ALREADY_EXISTS, com.google.firebase.ml.modeldownloader.FirebaseMlException.PERMISSION_DENIED, com.google.firebase.ml.modeldownloader.FirebaseMlException.RESOURCE_EXHAUSTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.FAILED_PRECONDITION, com.google.firebase.ml.modeldownloader.FirebaseMlException.ABORTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.OUT_OF_RANGE, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNIMPLEMENTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.INTERNAL, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNAVAILABLE, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNAUTHENTICATED, com.google.firebase.ml.modeldownloader.FirebaseMlException.NO_NETWORK_CONNECTION, com.google.firebase.ml.modeldownloader.FirebaseMlException.NOT_ENOUGH_SPACE, com.google.firebase.ml.modeldownloader.FirebaseMlException.MODEL_HASH_MISMATCH, com.google.firebase.ml.modeldownloader.FirebaseMlException.DOWNLOAD_URL_EXPIRED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public static @interface FirebaseMlException.Code { + @Deprecated @IntDef({com.google.firebase.ml.modeldownloader.FirebaseMlException.CANCELLED, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNKNOWN, com.google.firebase.ml.modeldownloader.FirebaseMlException.INVALID_ARGUMENT, com.google.firebase.ml.modeldownloader.FirebaseMlException.DEADLINE_EXCEEDED, com.google.firebase.ml.modeldownloader.FirebaseMlException.NOT_FOUND, com.google.firebase.ml.modeldownloader.FirebaseMlException.ALREADY_EXISTS, com.google.firebase.ml.modeldownloader.FirebaseMlException.PERMISSION_DENIED, com.google.firebase.ml.modeldownloader.FirebaseMlException.RESOURCE_EXHAUSTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.FAILED_PRECONDITION, com.google.firebase.ml.modeldownloader.FirebaseMlException.ABORTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.OUT_OF_RANGE, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNIMPLEMENTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.INTERNAL, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNAVAILABLE, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNAUTHENTICATED, com.google.firebase.ml.modeldownloader.FirebaseMlException.NO_NETWORK_CONNECTION, com.google.firebase.ml.modeldownloader.FirebaseMlException.NOT_ENOUGH_SPACE, com.google.firebase.ml.modeldownloader.FirebaseMlException.MODEL_HASH_MISMATCH, com.google.firebase.ml.modeldownloader.FirebaseMlException.DOWNLOAD_URL_EXPIRED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public static @interface FirebaseMlException.Code { } - public class FirebaseModelDownloader { - method public com.google.android.gms.tasks.Task deleteDownloadedModel(String); - method public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getInstance(); - method public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getInstance(com.google.firebase.FirebaseApp); - method public com.google.android.gms.tasks.Task getModel(String, com.google.firebase.ml.modeldownloader.DownloadType, com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions?); - method public com.google.android.gms.tasks.Task getModelDownloadId(String, com.google.android.gms.tasks.Task?); - method public com.google.android.gms.tasks.Task!> listDownloadedModels(); - method public void setModelDownloaderCollectionEnabled(Boolean?); + @Deprecated public class FirebaseModelDownloader { + method @Deprecated public com.google.android.gms.tasks.Task deleteDownloadedModel(String); + method @Deprecated public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getInstance(); + method @Deprecated public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getInstance(com.google.firebase.FirebaseApp); + method @Deprecated public com.google.android.gms.tasks.Task getModel(String, com.google.firebase.ml.modeldownloader.DownloadType, com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions?); + method @Deprecated public com.google.android.gms.tasks.Task getModelDownloadId(String, com.google.android.gms.tasks.Task?); + method @Deprecated public com.google.android.gms.tasks.Task!> listDownloadedModels(); + method @Deprecated public void setModelDownloaderCollectionEnabled(Boolean?); } public final class ModelDownloaderKt { - method public static operator java.io.File? component1(com.google.firebase.ml.modeldownloader.CustomModel); - method public static operator long component2(com.google.firebase.ml.modeldownloader.CustomModel); - method public static operator long component3(com.google.firebase.ml.modeldownloader.CustomModel); - method public static operator String component4(com.google.firebase.ml.modeldownloader.CustomModel); - method public static operator String component5(com.google.firebase.ml.modeldownloader.CustomModel); - method public static com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions customModelDownloadConditions(kotlin.jvm.functions.Function1 init); - method public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getModelDownloader(com.google.firebase.Firebase); - method public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader modelDownloader(com.google.firebase.Firebase, com.google.firebase.FirebaseApp app); + method @Deprecated public static operator java.io.File? component1(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static operator long component2(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static operator long component3(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static operator String component4(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static operator String component5(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions customModelDownloadConditions(kotlin.jvm.functions.Function1 init); + method @Deprecated public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getModelDownloader(com.google.firebase.Firebase); + method @Deprecated public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader modelDownloader(com.google.firebase.Firebase, com.google.firebase.FirebaseApp app); } } diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java index ddc442924fa..82b94c0b7a9 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java @@ -31,9 +31,9 @@ * downloaded, the original model file will be removed once it is safe to do so. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public class CustomModel { @@ -112,9 +112,9 @@ public CustomModel( * * @return The name of the model. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -130,9 +130,9 @@ public String getName() { * progress, returns null. If a file update is in progress, returns the last * fully downloaded model. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Nullable @Deprecated @@ -183,9 +183,9 @@ boolean isModelFilePresent() { * * @return The local model size. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public long getSize() { @@ -197,9 +197,9 @@ public long getSize() { * * @return The model hash * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -214,9 +214,9 @@ public String getModelHash() { * * @return The download ID (if download in progress), otherwise returns 0. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public long getDownloadId() { diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java index a50f8e75ac5..b89a68be2dd 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java @@ -24,9 +24,9 @@ * Conditions to allow download of custom models. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public class CustomModelDownloadConditions { @@ -44,9 +44,9 @@ private CustomModelDownloadConditions( /** * @return True if charging is required for download. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public boolean isChargingRequired() { @@ -56,9 +56,9 @@ public boolean isChargingRequired() { /** * @return True if wifi is required for download. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public boolean isWifiRequired() { @@ -68,9 +68,9 @@ public boolean isWifiRequired() { /** * @return True if device idle is required for download. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public boolean isDeviceIdleRequired() { @@ -81,9 +81,9 @@ public boolean isDeviceIdleRequired() { * Builder of {@link CustomModelDownloadConditions}. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static class Builder { @@ -95,9 +95,9 @@ public static class Builder { * Sets charging as required. Only works on Android N and above. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @RequiresApi(VERSION_CODES.N) @@ -112,9 +112,9 @@ public Builder requireCharging() { * Sets wifi as required. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -132,9 +132,9 @@ public Builder requireWifi() { *

Only works on Android N and above. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @RequiresApi(VERSION_CODES.N) @@ -149,9 +149,9 @@ public Builder requireDeviceIdle() { * Builds {@link CustomModelDownloadConditions}. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java index 87fcd10f57d..a72667c718b 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java @@ -16,9 +16,9 @@ /** * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public enum DownloadType { @@ -26,9 +26,9 @@ public enum DownloadType { * Use local model when present, otherwise download and return latest model * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated LOCAL_MODEL, @@ -37,9 +37,9 @@ public enum DownloadType { * download and return latest model. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated LOCAL_MODEL_UPDATE_IN_BACKGROUND, @@ -48,9 +48,9 @@ public enum DownloadType { * returning. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated LATEST_MODEL diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java index 83043319fb2..0b7305b7faa 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java @@ -26,9 +26,8 @@ * mappings should remain consistent with the original firebase_ml_sdk whenever possible. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public class FirebaseMlException extends FirebaseException { @@ -36,9 +35,9 @@ public class FirebaseMlException extends FirebaseException { * The operation was cancelled (typically by the caller). * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int CANCELLED = 1; @@ -46,9 +45,9 @@ public class FirebaseMlException extends FirebaseException { * Unknown error or an error from a different error domain. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int UNKNOWN = 2; @@ -58,9 +57,9 @@ public class FirebaseMlException extends FirebaseException { * the state of the system (for example, an invalid field name). * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int INVALID_ARGUMENT = 3; @@ -71,9 +70,9 @@ public class FirebaseMlException extends FirebaseException { * deadline to expire. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int DEADLINE_EXCEEDED = 4; @@ -81,9 +80,9 @@ public class FirebaseMlException extends FirebaseException { * Some requested resource was not found. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int NOT_FOUND = 5; @@ -91,9 +90,9 @@ public class FirebaseMlException extends FirebaseException { * Some resource that we attempted to create already exists. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int ALREADY_EXISTS = 6; @@ -101,9 +100,9 @@ public class FirebaseMlException extends FirebaseException { * The caller does not have permission to execute the specified operation. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int PERMISSION_DENIED = 7; @@ -112,9 +111,9 @@ public class FirebaseMlException extends FirebaseException { * is out of space. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int RESOURCE_EXHAUSTED = 8; @@ -123,9 +122,9 @@ public class FirebaseMlException extends FirebaseException { * execution. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int FAILED_PRECONDITION = 9; @@ -133,9 +132,9 @@ public class FirebaseMlException extends FirebaseException { * The operation was aborted, typically due to a concurrency issue like transaction aborts, etc. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int ABORTED = 10; @@ -143,9 +142,9 @@ public class FirebaseMlException extends FirebaseException { * Operation was attempted past the valid range. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int OUT_OF_RANGE = 11; @@ -153,9 +152,9 @@ public class FirebaseMlException extends FirebaseException { * Operation is not implemented or not supported/enabled. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int UNIMPLEMENTED = 12; @@ -164,9 +163,9 @@ public class FirebaseMlException extends FirebaseException { * one of these errors, something is very broken. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int INTERNAL = 13; @@ -177,9 +176,9 @@ public class FirebaseMlException extends FirebaseException { *

In ML Model Downloader, this error is mostly about the models being not available yet. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int UNAVAILABLE = 14; @@ -187,9 +186,9 @@ public class FirebaseMlException extends FirebaseException { * The request does not have valid authentication credentials for the operation. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int UNAUTHENTICATED = 16; @@ -197,9 +196,9 @@ public class FirebaseMlException extends FirebaseException { * There is no network connection. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int NO_NETWORK_CONNECTION = 17; @@ -209,9 +208,9 @@ public class FirebaseMlException extends FirebaseException { * There is not enough space left on the device. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int NOT_ENOUGH_SPACE = 101; @@ -219,9 +218,9 @@ public class FirebaseMlException extends FirebaseException { * The downloaded model's hash doesn't match the expected value. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int MODEL_HASH_MISMATCH = 102; @@ -230,9 +229,9 @@ public class FirebaseMlException extends FirebaseException { * will be performed before this is returned. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int DOWNLOAD_URL_EXPIRED = 121; @@ -242,9 +241,9 @@ public class FirebaseMlException extends FirebaseException { * error codes for Google APIs * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @IntDef({ CANCELLED, @@ -283,9 +282,9 @@ public FirebaseMlException(@NonNull String detailMessage, @Code int code) { * Gets the error code for the Firebase ML operation that failed. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Code @Deprecated diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java index e28ddf91ea8..976a42dba4a 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java @@ -43,9 +43,9 @@ * Firebase Model Downloader. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public class FirebaseModelDownloader { @@ -91,9 +91,9 @@ public class FirebaseModelDownloader { * * @return A {@link FirebaseModelDownloader} instance * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -108,9 +108,9 @@ public static FirebaseModelDownloader getInstance() { * @param app A custom {@link FirebaseApp} * @return A {@link FirebaseModelDownloader} instance * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -152,9 +152,9 @@ public static FirebaseModelDownloader getInstance(@NonNull FirebaseApp app) { * @param conditions {@link CustomModelDownloadConditions} to be used during file download. * @return Custom model * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -458,9 +458,9 @@ private Task finishModelDownload(@NonNull String modelName) { * * @return The set of all models that are downloaded to this device. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -479,9 +479,9 @@ public Task> listDownloadedModels() { * * @param modelName Name of the model. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -519,9 +519,9 @@ private boolean deleteModelDetails(@NonNull String modelName) { * @param enabled Turns the logging state on or off. To revert to using the Firebase-wide data * collection switch, set this value to null. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public void setModelDownloaderCollectionEnabled(@Nullable Boolean enabled) { @@ -543,9 +543,9 @@ public void setModelDownloaderCollectionEnabled(@Nullable Boolean enabled) { * @param getModelTask The most recent getModel task associated with the model name. * @return Download ID associated with Android DownloadManager. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/ModelDownloader.kt b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/ModelDownloader.kt index 073874f1a59..3d064289883 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/ModelDownloader.kt +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/ModelDownloader.kt @@ -24,10 +24,8 @@ import java.io.File internal const val DEPRECATION_MESSAGE = "Firebase ML is deprecated and will be shut down on June 15, 2027. To " + - "host custom models, you must migrate to another solution. You can " + - "use Cloud Storage for Firebase as an alternative for hosting custom " + - "models. For more information about migration options, see the " + - "notification banner in the " + + "host custom models, you must migrate to another solution. For more " + + "information about migration options, see the notification banner in the " + "[Firebase ML documentation](https://firebase.google.com/docs/ml)." /** Returns the [FirebaseModelDownloader] instance of the default [FirebaseApp]. */ From b1bfff42f2f26ef6e87b9f3c96942f30540a967e Mon Sep 17 00:00:00 2001 From: Mila <107142260+milaGGL@users.noreply.github.com> Date: Thu, 13 Aug 2026 12:30:54 -0400 Subject: [PATCH 2/3] Update FirebaseMlException.java --- .../google/firebase/ml/modeldownloader/FirebaseMlException.java | 1 + 1 file changed, 1 insertion(+) diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java index 0b7305b7faa..64653581c5a 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java @@ -27,6 +27,7 @@ * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. For more information about migration options, see the + * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated From 9cbdb808fd0372f194706cddf5903512fefbc0d7 Mon Sep 17 00:00:00 2001 From: Mila <107142260+milaGGL@users.noreply.github.com> Date: Thu, 13 Aug 2026 12:40:20 -0400 Subject: [PATCH 3/3] update the comments --- .../ml/modeldownloader/CustomModel.java | 18 +++-- .../CustomModelDownloadConditions.java | 27 +++++--- .../ml/modeldownloader/DownloadType.java | 12 ++-- .../modeldownloader/FirebaseMlException.java | 66 ++++++++++++------- .../FirebaseModelDownloader.java | 24 ++++--- .../ml/modeldownloader/ModelDownloader.kt | 6 +- 6 files changed, 102 insertions(+), 51 deletions(-) diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java index 82b94c0b7a9..a933cac55b1 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java @@ -31,7 +31,8 @@ * downloaded, the original model file will be removed once it is safe to do so. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -112,7 +113,8 @@ public CustomModel( * * @return The name of the model. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -130,7 +132,8 @@ public String getName() { * progress, returns null. If a file update is in progress, returns the last * fully downloaded model. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -183,7 +186,8 @@ boolean isModelFilePresent() { * * @return The local model size. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -197,7 +201,8 @@ public long getSize() { * * @return The model hash * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -214,7 +219,8 @@ public String getModelHash() { * * @return The download ID (if download in progress), otherwise returns 0. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java index b89a68be2dd..0d0ebbdc89c 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java @@ -24,7 +24,8 @@ * Conditions to allow download of custom models. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -44,7 +45,8 @@ private CustomModelDownloadConditions( /** * @return True if charging is required for download. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -56,7 +58,8 @@ public boolean isChargingRequired() { /** * @return True if wifi is required for download. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -68,7 +71,8 @@ public boolean isWifiRequired() { /** * @return True if device idle is required for download. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -81,7 +85,8 @@ public boolean isDeviceIdleRequired() { * Builder of {@link CustomModelDownloadConditions}. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -95,7 +100,8 @@ public static class Builder { * Sets charging as required. Only works on Android N and above. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -112,7 +118,8 @@ public Builder requireCharging() { * Sets wifi as required. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -132,7 +139,8 @@ public Builder requireWifi() { *

Only works on Android N and above. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -149,7 +157,8 @@ public Builder requireDeviceIdle() { * Builds {@link CustomModelDownloadConditions}. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java index a72667c718b..8701ab99572 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java @@ -16,7 +16,8 @@ /** * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -26,7 +27,8 @@ public enum DownloadType { * Use local model when present, otherwise download and return latest model * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -37,7 +39,8 @@ public enum DownloadType { * download and return latest model. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -48,7 +51,8 @@ public enum DownloadType { * returning. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java index 64653581c5a..db426710593 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java @@ -26,7 +26,8 @@ * mappings should remain consistent with the original firebase_ml_sdk whenever possible. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -36,7 +37,8 @@ public class FirebaseMlException extends FirebaseException { * The operation was cancelled (typically by the caller). * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -46,7 +48,8 @@ public class FirebaseMlException extends FirebaseException { * Unknown error or an error from a different error domain. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -58,7 +61,8 @@ public class FirebaseMlException extends FirebaseException { * the state of the system (for example, an invalid field name). * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -71,7 +75,8 @@ public class FirebaseMlException extends FirebaseException { * deadline to expire. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -81,7 +86,8 @@ public class FirebaseMlException extends FirebaseException { * Some requested resource was not found. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -91,7 +97,8 @@ public class FirebaseMlException extends FirebaseException { * Some resource that we attempted to create already exists. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -101,7 +108,8 @@ public class FirebaseMlException extends FirebaseException { * The caller does not have permission to execute the specified operation. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -112,7 +120,8 @@ public class FirebaseMlException extends FirebaseException { * is out of space. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -123,7 +132,8 @@ public class FirebaseMlException extends FirebaseException { * execution. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -133,7 +143,8 @@ public class FirebaseMlException extends FirebaseException { * The operation was aborted, typically due to a concurrency issue like transaction aborts, etc. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -143,7 +154,8 @@ public class FirebaseMlException extends FirebaseException { * Operation was attempted past the valid range. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -153,7 +165,8 @@ public class FirebaseMlException extends FirebaseException { * Operation is not implemented or not supported/enabled. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -164,7 +177,8 @@ public class FirebaseMlException extends FirebaseException { * one of these errors, something is very broken. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -177,7 +191,8 @@ public class FirebaseMlException extends FirebaseException { *

In ML Model Downloader, this error is mostly about the models being not available yet. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -187,7 +202,8 @@ public class FirebaseMlException extends FirebaseException { * The request does not have valid authentication credentials for the operation. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -197,7 +213,8 @@ public class FirebaseMlException extends FirebaseException { * There is no network connection. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -209,7 +226,8 @@ public class FirebaseMlException extends FirebaseException { * There is not enough space left on the device. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -219,7 +237,8 @@ public class FirebaseMlException extends FirebaseException { * The downloaded model's hash doesn't match the expected value. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -230,7 +249,8 @@ public class FirebaseMlException extends FirebaseException { * will be performed before this is returned. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -242,7 +262,8 @@ public class FirebaseMlException extends FirebaseException { * error codes for Google APIs * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -283,7 +304,8 @@ public FirebaseMlException(@NonNull String detailMessage, @Code int code) { * Gets the error code for the Firebase ML operation that failed. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java index 976a42dba4a..ae519941223 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java @@ -43,7 +43,8 @@ * Firebase Model Downloader. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -91,7 +92,8 @@ public class FirebaseModelDownloader { * * @return A {@link FirebaseModelDownloader} instance * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -108,7 +110,8 @@ public static FirebaseModelDownloader getInstance() { * @param app A custom {@link FirebaseApp} * @return A {@link FirebaseModelDownloader} instance * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -152,7 +155,8 @@ public static FirebaseModelDownloader getInstance(@NonNull FirebaseApp app) { * @param conditions {@link CustomModelDownloadConditions} to be used during file download. * @return Custom model * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -458,7 +462,8 @@ private Task finishModelDownload(@NonNull String modelName) { * * @return The set of all models that are downloaded to this device. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -479,7 +484,8 @@ public Task> listDownloadedModels() { * * @param modelName Name of the model. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -519,7 +525,8 @@ private boolean deleteModelDetails(@NonNull String modelName) { * @param enabled Turns the logging state on or off. To revert to using the Firebase-wide data * collection switch, set this value to null. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @@ -543,7 +550,8 @@ public void setModelDownloaderCollectionEnabled(@Nullable Boolean enabled) { * @param getModelTask The most recent getModel task associated with the model name. * @return Download ID associated with Android DownloadManager. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. For more information about migration options, see the + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the * notification banner in the * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/ModelDownloader.kt b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/ModelDownloader.kt index 3d064289883..073874f1a59 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/ModelDownloader.kt +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/ModelDownloader.kt @@ -24,8 +24,10 @@ import java.io.File internal const val DEPRECATION_MESSAGE = "Firebase ML is deprecated and will be shut down on June 15, 2027. To " + - "host custom models, you must migrate to another solution. For more " + - "information about migration options, see the notification banner in the " + + "host custom models, you must migrate to another solution. You can " + + "use Cloud Storage for Firebase as an alternative for hosting custom " + + "models. For more information about migration options, see the " + + "notification banner in the " + "[Firebase ML documentation](https://firebase.google.com/docs/ml)." /** Returns the [FirebaseModelDownloader] instance of the default [FirebaseApp]. */