mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
Add Xamarin support to the ORT nuget packages. - Update C# code to support Xamarin builds for iOS and Android - refactor some things to split out common code - include iOS and Android ORT native shared library in native nuget package
19 lines
628 B
Text
19 lines
628 B
Text
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
|
|
{
|
|
protected override void OnCreate (Bundle bundle)
|
|
{
|
|
base.OnCreate (bundle);
|
|
|
|
InputStream input = Assets.Open ("my_asset.txt");
|
|
}
|
|
}
|
|
|
|
Additionally, some Android functions will automatically load asset files:
|
|
|
|
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|