StansAssets / com.stansassets.android-native

Android Native Plugin Wiki
https://api.stansassets.com/android-native/
10 stars 1 forks source link
3rd-party-plugins android android-native-plugin api convention csharp stansassets unity unity3d

Android Native Pro

The asset goal is simple. We want to build the best Android Native plugin on the Unity Asset Store. The plugin contains all the Android features you can think of, but in case you miss something, do not hesitate to get in touch.

Get from The Asset Store | Scripting Reference | Wiki | Forum | Support

About Us

We are committed to developing high quality and engaging entertainment software. Our mission has been to bring a reliable and high-quality Unity Development service to companies and individuals around the globe. At Stan's Assets, we make Plugins, SDKs, Games, VR & AR Applications. Do not hesitate do get in touch, whether you have a question, want to build something or just to say hi :) Let's Talk!

Website | LinkedIn | Youtube | Github | AssetStore

Plugin Build principles

Apart from all the statements above, the Ultimate Mobile will inherit all the pro-line plugins development principles:

API Convention

We do not want you to learn "another 3rd party plugin" API, that's why Android Native plugin API is mirroring the Google official Java API in a CSharp-ish manner. As an example see the sample how to share text content.

Google Java API. Sample from Send text content guide.

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");

Intent shareIntent = Intent.createChooser(sendIntent, null);
startActivity(shareIntent);

Android Native plugin (C#)

using SA.Android.App;
using SA.Android.Content;
...

AN_Intent sendIntent = new AN_Intent();
sendIntent.SetAction(AN_Intent.ACTION_SEND);
sendIntent.PutExtra(AN_Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.SetType("text/plain");
AN_MainActivity.Instance.StartActivity(sendIntent);