- Please Review Your External Storage Boxes
- Please Review Your External Storage Hard Drive
- Best External Storage
OWC Envoy Express review: Roll-your-own external Thunderbolt 3 storage This rugged Thunderbolt 3 enclosure allows you to leverage budget M.2 NVMe SSDs for affordable external storage. In an era when 50GB of iCloud storage is 99 cents per month, and trim, slim external SSDs are getting cheaper, external hard drives might appear less essential than they once were. But modern ones.
The Storage Situation: Removable Storage
Back in 2014, I wrote a series of blog posts to try to clear up confusionaround where you can read and write files in Android. I updated them in2017 to reflect changes in Android… but Android keeps changing.
This post is an updatededition of the 2017 post on removable storage.
Working with files on the filesystem in Android is seriously confusing.It was confusing in 2008, and it has only gotten more confusing as the yearsrolled on. Thereare countless Stack Overflow questions and the like where they clearly do notquite grok the various pieces of Android's storage model.
This is the third post in a series covering this storage model, to helpclarify what is going on. Earlier, we looked atinternal storage andexternal storage.Today, we will look at removable storage, the sourceof an unfortunate amount of angst.
What Your Users Think 'Removable Storage' Means
Many of your users will have a device that has some sort of removable media.Often times this is a micro SD card. Some tablets or docks have a full SD card slot.Plus, USB mass storage is possible via USB On-The-Go and USB Type C connectors (not to mentiondevices or docks with a full USB host port).
Your users will think that they can work with removable storage much like theycan with a desktop or notebook.
Unfortunately, your users are largely mistaken, and are even more mistakenwith Android 4.4+. That's because Google's approach towards removable storage is…unconventional.
What Google Thinks 'Removable Storage' Means
In the beginning, external storage was often in the formof a removable micro SD card. At that time, many developers got in the habit ofthinking that external storage removable storage.
However, as Android 3.0 and higher started rolling out en masse, developers soonstarted to realize two things:
External storage != removable storage on most of those devices
There's nothing in the Android SDK for removable storage
Wait, Wut?
That's right: until Android 4.4, there was no official support for removable mediain Android. Quoting Dianne Hackborn:
…keep in mind: until Android 4.4, the official Android platform has not supported SD cards at all except for two special cases: the old school storage layout where external storage is an SD card (which is still supported by the platform today), and a small feature added to Android 3.0 where it would scan additional SD cards and add them to the media provider and give apps read-only access to their files (which is also still supported in the platform today).
Android 4.4 is the first release of the platform that has actually allowed applications to use SD cards for storage. Any access to them prior to that was through private, unsupported APIs. We now have a quite rich API in the platform that allows applications to make use of SD cards in a supported way, in better ways than they have been able to before: they can make free use of their app-specific storage area without requiring any permissions in the app, and can access any other files on the SD card as long as they go through the file picker, again without needing any special permissions.
But… But… But… What About All These Apps That Used Removable Media?
They fall into three buckets:
Some are just relying on
MediaStore
indexing. So, for example, a video player canfind out about videos on all available media by querying theMediaStore
, and ifthe device manufacturer hasn't broken theMediaStore
indexing of removable media,the player will be able to play back videos on removable media. This strategy isbroken on Android 10 and higher.Some are apps that ship with the hardware. The hardware manufacturer knows thedevice and what the rules of the game are for that device. The hardware manufactureris also far less concerned about cross-device compatibility, as their apps aren't(usually) shipping on the Play Store. Hence, a hardware manufacturer has carte blancheto work with removable media.
Some are apps written by developers who decided to go past the boundaries ofthe Android SDK. There are various recipes online for examining various Linuxsystem files (and file-like substances) to determine what 'mount points' exist,and from there apply some heuristics to determine what represents removable media.While reliability across devices could easily be an issue, beyond that, thesetechniques at least sorta worked… until Android 4.4, when everything changed.
What Happened in Android 4.4
Starting with Android 4.2, there was a request from Google for device manufacturers tolock down removable media. Generally, this was ignored.
For Android 4.4+, Google amended the Compatibility Test Suite (CTS) that device manufacturersmust comply with in order to ship a device containing Google's proprietary apps(e.g., Play Store, Maps, Gmail; otherwise known as 'GMS'). QuotingDave Smith:
However, new tests were added in CTS for 4.4 that validate whether or not secondary storage has the proper read-only permissions in non app-specific directories, presumably because of the new APIs to finally expose those paths to application developers. As soon as CTS includes these rules, OEMs have to support them to keep shipping devices with GMS (Google Play, etc.) on-board.
As a result, apps were able to read files on removable media using the various undocumentedand unsupported tricks for finding removable media. However, apps cannot write to orotherwise modify such removable storage. Note that device manufacturers themselvesmay have ways of dealing with this, but ordinary app developers do not.
However, we were given getExternalFilesDirs()
and getExternalCacheDirs()
inAndroid 4.4. Android 5.0 added getExternalMediaDirs()
. These methods give uslocations on external and removable storage into which our apps can write. Wedo not need any permissions to use them — not even the runtime permissions fromAndroid 6.0. However, the filesystem locations are a bit user-hostile and the contentthat we place in those directories will be removed when the app is uninstalled.
What Happened in Android 10
Removable storage, like external storage, was largely locked down. We stillhave access to the locations from the aforementioned methods. However, any other'back door' approaches that developers used were completely shut down.
This blog posthas much more detail on what Android 10 did to external storage, and all thatalso applies to removable storage.
Should I Hardcode Paths in My App?
No.
Other Posts in This Series
This series includes:
- A post on internal storage
- A post on external storage
- This post on removable storage
Need Android app development training for your team? Mark Murphy has trained hundreds! Learn more!
-->This article helps you understand and review the bill for your pay-as-you-go or Visual Studio Azure subscription, including pay-as-you-go and Visual Studio. For each billing period, you normally receive an invoice in email. The invoice is a representation of your Azure bill. The same cost information on the invoice is available in the Azure portal. In this tutorial you will compare your invoice with the detailed daily usage file and with cost analysis in the Azure portal.
This tutorial applies only to Azure customers with an individual subscription. Common individual subscriptions are those with pay-as-you-go rates purchased directly from the Azure website.
If you need help understanding unexpected charges, see Analyze unexpected charges. Or, if you need to cancel your Azure subscription, see Cancel your Azure subscription.
In this tutorial, you learn how to:
- Compare invoiced charges with usage file
- Compare charges and usage in cost analysis
Prerequisites
You must have a paid Microsoft Online Services Program billing account. The account is created when you sign up for Azure through the Azure website. For example, if you have an account with pay-as-you-go rates or if you are a Visual Studio subscriber.
Invoices for Azure Free Accounts are created only when the monthly credit amount is exceeded.
It must be more than 30 days from the day that you subscribed to Azure. Azure bills you at the end of your invoice period.
Sign in to Azure
Please Review Your External Storage Boxes
- Sign in to the Azure portal at https://portal.azure.com.
Compare billed charges with your usage file
The first step to compare usage and costs is to download your invoice and usage files. Generic dvr viewer. The detailed usage CSV file shows your charges by billing period and daily usage. It doesn't include any tax information. In order to download the files, you must be an account administrator or have the Owner role.
In the Azure portal, type subscriptions in the search box and then click Subscriptions.
In the list of subscriptions, click the subscription.
Under Billing, click Invoices.
In the list of invoices, look for the one that you want to download then click the download symbol. You might need to change the timespan to view older invoices. It might take a few minutes to generate the usage details file and invoice.
In the Download Usage + Charges window, click Download csv and Download invoice.
If it says Not available there are several reasons that you don't see usage details or an invoice:
- It's less than 30 days from the day you subscribed to Azure.
- There's no usage for the billing period.
- An invoice isn't generated yet. Wait until the end of the billing period.
- You don't have permission to view invoices. You might not see old invoices unless you're the Account Administrator.
- If you have a Free Trial or a monthly credit amount with your subscription that you didn't exceed, you won't get an invoice unless you have a Microsoft Customer Agreement.
Next, you review the charges. Your invoice shows values for taxes and your usage charges.
Open the CSV usage file that you downloaded. At the end of the file, sum the value for all items in the Cost column.
The summed Cost value should match precisely to the usage charges cost on your invoice.
Your usage charges are displayed at the meter level. The following terms mean the same thing in both the invoice and the detailed usage file. For example, the billing cycle on the invoice is the same as the billing period shown in the detailed usage file.
Please Review Your External Storage Hard Drive
Invoice (PDF) | Detailed usage (CSV) |
---|---|
Billing cycle | BillingPeriodStartDate BillingPeriodEndDate |
Name | Meter Category |
Type | Meter Subcategory |
Resource | MeterName |
Region | MeterRegion |
Consumed | Quantity |
Included | Included Quantity |
Billable | Overage Quantity |
Rate | EffectivePrice |
Value | Cost |
The Usage Charges section of your invoice shows the total value (cost) for each meter that was consumed during your billing period. For example, the following image shows a usage charge for the Azure Storage service for the P10 Disks resource.
In your CSV usage file, filter by MeterName for the corresponding Resource shown on you invoice. Then, sum the Cost value for items in the column. Here's an example that focuses on the meter name (P10 disks) that corresponds to the same line item on the invoice.
The summed Cost value should match precisely to the usage charges cost for the individual resource charged on your invoice.
Compare billed charges and usage in cost analysis
Cost analysis in the Azure portal can also help you verify your charges. To get a quick overview of your invoiced usage and charges, select your subscription from the Subscriptions page in the Azure portal. Next, click Cost analysis and then in the views list, click Invoice details.
Next, in the date range list, select a time period for you invoice. Add a filter for invoice number and then select the InvoiceNumber that matches the one on your invoice. Cost analysis shows cost details for your invoiced items.
Costs shown in cost analysis should match precisely to the usage charges cost for the individual resource charged on your invoice.
External Marketplace services are billed separately
External services or marketplace charges are for resources that have been created by third-party software vendors. Those resources are available for use from the Azure Marketplace. For example, a Barracuda Firewall is an Azure Marketplace resource offered by a third-party. All charges for the firewall and its corresponding meters appear as external service charges.
External service charges are billed separately. The charges don't show up on your Azure invoice.
Resources are billed by usage meters
Azure doesn't directly bill based on the resource cost. Charges for a resource are calculated by using one or more meters. Meters are used to track a resource's usage throughout its lifetime. These meters are then used to calculate the bill.
When you create a single Azure resource, like a virtual machine, it has one or more meter instances created. Meters are used to track the usage of the resource over time. Each meter emits usage records that are used by Azure to calculate the bill.
For example, a single virtual machine (VM) created in Azure may have the following meters created to track its usage:
- Compute Hours
- IP Address Hours
- Data Transfer In
- Data Transfer Out
- Standard Managed Disk
- Standard Managed Disk Operations
- Standard IO-Disk
- Standard IO-Block Blob Read
- Standard IO-Block Blob Write
- Standard IO-Block Blob Delete
External services or marketplace charges are for resources that have been created by third-party software vendors. Those resources are available for use from the Azure Marketplace. For example, a Barracuda Firewall is an Azure Marketplace resource offered by a third-party. All charges for the firewall and its corresponding meters appear as external service charges.
External service charges are billed separately. The charges don't show up on your Azure invoice.
Resources are billed by usage meters
Azure doesn't directly bill based on the resource cost. Charges for a resource are calculated by using one or more meters. Meters are used to track a resource's usage throughout its lifetime. These meters are then used to calculate the bill.
When you create a single Azure resource, like a virtual machine, it has one or more meter instances created. Meters are used to track the usage of the resource over time. Each meter emits usage records that are used by Azure to calculate the bill.
For example, a single virtual machine (VM) created in Azure may have the following meters created to track its usage:
- Compute Hours
- IP Address Hours
- Data Transfer In
- Data Transfer Out
- Standard Managed Disk
- Standard Managed Disk Operations
- Standard IO-Disk
- Standard IO-Block Blob Read
- Standard IO-Block Blob Write
- Standard IO-Block Blob Delete
When the VM is created, each meter begins emitting usage records. This usage and the meter's price is tracked in the Azure metering system.
You can see the meters that were used to calculate your bill in the usage CSV file, like in the earlier example.
Pay your bill
If you set up a credit card as your payment method, the payment is charged automatically within 10 days after the billing period ends. On your credit card statement, the line item would say MSFT Azure.
To change the credit card that's charged, see Add, update, or remove a credit card for Azure.
Next steps
Best External Storage
In this tutorial, you learned how to:
- Compare invoiced charges with usage file
- Compare charges and usage in cost analysis
Complete the quickstart to start using cost analysis.