mirror of https://github.com/grpc/grpc.git
The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
625 B
20 lines
625 B
6 years ago
|
Any raw assets you want to be deployed with your application can be placed in
|
||
|
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
||
|
|
||
|
These files will be deployed with your package and will be accessible using Android's
|
||
|
AssetManager, like this:
|
||
|
|
||
|
public class ReadAsset : Activity
|
||
|
{
|
||
4 years ago
|
protected override void OnCreate (Bundle bundle)
|
||
|
{
|
||
|
base.OnCreate (bundle);
|
||
6 years ago
|
|
||
4 years ago
|
InputStream input = Assets.Open ("my_asset.txt");
|
||
|
}
|
||
6 years ago
|
}
|
||
|
|
||
|
Additionally, some Android functions will automatically load asset files:
|
||
|
|
||
|
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|