BackupAgent.OnQuotaExceeded(Int64, Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Notification that the application's current backup operation causes it to exceed the maximum size permitted by the transport.
[Android.Runtime.Register("onQuotaExceeded", "(JJ)V", "GetOnQuotaExceeded_JJHandler", ApiSince=24)]
public virtual void OnQuotaExceeded (long backupDataBytes, long quotaBytes);
[<Android.Runtime.Register("onQuotaExceeded", "(JJ)V", "GetOnQuotaExceeded_JJHandler", ApiSince=24)>]
abstract member OnQuotaExceeded : int64 * int64 -> unit
override this.OnQuotaExceeded : int64 * int64 -> unit
Parameters
- backupDataBytes
- Int64
The amount of data measured while initializing the backup operation, if the total exceeds the app's alloted quota. If initial measurement suggested that the data would fit but then too much data was actually submitted as part of the operation, then this value is the amount of data that had been streamed into the transport at the time the quota was reached.
- quotaBytes
- Int64
The maximum data size that the transport currently permits this application to store as a backup.
- Attributes
Remarks
Notification that the application's current backup operation causes it to exceed the maximum size permitted by the transport. The ongoing backup operation is halted and rolled back: any data that had been stored by a previous backup operation is still intact. Typically the quota-exceeded state will be detected before any data is actually transmitted over the network.
The quotaBytes
value is the total data size currently permitted for this application. If desired, the application can use this as a hint for determining how much data to store. For example, a messaging application might choose to store only the newest messages, dropping enough older content to stay under the quota.
<p class="note">Note that the maximum quota for the application can change over time. In particular, in the future the quota may grow. Applications that adapt to the quota when deciding what data to store should be aware of this and implement their data storage mechanisms in a way that can take advantage of additional quota.
Java documentation for android.app.backup.BackupAgent.onQuotaExceeded(long, long)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.