本文整理汇总了C#中UnityEngine.AndroidJavaObject.CallStatic方法的典型用法代码示例。如果您正苦于以下问题:C# AndroidJavaObject.CallStatic方法的具体用法?C# AndroidJavaObject.CallStatic怎么用?C# AndroidJavaObject.CallStatic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine.AndroidJavaObject
的用法示例。
在下文中一共展示了AndroidJavaObject.CallStatic方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public static void Init()
{
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
if (jc == null)
return;
AndroidJavaObject joactivety = jc.GetStatic<AndroidJavaObject>("currentActivity");
if (joactivety == null)
return;
AndroidJavaObject context = joactivety.Call<AndroidJavaObject>("getApplicationContext");
// 初始化HttpDns
AndroidJavaObject joDnsClass = new AndroidJavaObject("com.tencent.msdk.dns.MSDKDnsResolver");
Debug.Log(" WGGetHostByName ===========" + joDnsClass);
if (joDnsClass == null)
return;
m_dnsJo = joDnsClass.CallStatic<AndroidJavaObject>("getInstance");
Debug.Log(" WGGetHostByName ===========" + m_dnsJo);
if (m_dnsJo == null)
return;
m_dnsJo.Call("init", context);
// 初始化灯塔
AndroidJavaObject joBeaconClass = new AndroidJavaObject("com.tencent.beacon.event.UserAction");
if (joBeaconClass == null)
return;
m_dnsJo.Call("initUserAction", context);
}
示例2: toAndroidJavaObject
public override AndroidJavaObject toAndroidJavaObject(AndroidJavaObject jniUnityStoreAssets)
{
AndroidJavaObject jniHashMap = jniUnityStoreAssets.CallStatic<AndroidJavaObject>("createStringIntegerHashMap");
foreach(KeyValuePair<string, int> kvp in currencyValue)
{
jniUnityStoreAssets.CallStatic("voidPutIntoStringIntegerHashMap", jniHashMap, kvp.Key, kvp.Value);
}
return new AndroidJavaObject("com.soomla.store.domain.data.StaticPriceModel", jniHashMap);
}
示例3: toAndroidJavaObject
public override AndroidJavaObject toAndroidJavaObject(AndroidJavaObject jniUnityStoreAssets)
{
AndroidJavaObject jniArrayListHashMap = jniUnityStoreAssets.CallStatic<AndroidJavaObject>("createStringIntegerHashMapArrayList");
foreach(Dictionary<string, int> curval in currencyValuePerBalance) {
AndroidJavaObject jniHashMap = jniUnityStoreAssets.CallStatic<AndroidJavaObject>("createStringIntegerHashMap");
foreach(KeyValuePair<string, int> kvp in curval)
{
jniUnityStoreAssets.CallStatic("voidPutIntoStringIntegerHashMap", jniHashMap, kvp.Key, kvp.Value);
}
jniArrayListHashMap.Call<bool>("add", jniHashMap);
}
return new AndroidJavaObject("com.soomla.store.domain.data.BalanceDrivenPriceModel", jniArrayListHashMap);
}
示例4: Settings
public void Settings(string json)
{
using (AndroidJavaObject settingsWrapper = new AndroidJavaObject("com.fyber.unity.settings.SettingsWrapper"))
{
settingsWrapper.CallStatic("perform", json);
}
}
示例5: Report
public void Report(string json)
{
using (AndroidJavaObject reportWrapper = new AndroidJavaObject("com.fyber.unity.reporters.ReporterWrapper"))
{
reportWrapper.CallStatic("report", json);
}
}
示例6: toAndroidJavaObject
public AndroidJavaObject toAndroidJavaObject(AndroidJavaObject jniUnityStoreAssets)
{
return jniUnityStoreAssets.CallStatic<AndroidJavaObject>("createGoogleMarketItem"
, this.ProductId
, (int)(this.consumable)
, this.Price);
}
示例7: Cache
public void Cache(string action)
{
using (AndroidJavaObject cacheManager = new AndroidJavaObject("com.fyber.unity.cache.CacheWrapper"))
{
cacheManager.CallStatic(action);
}
}
示例8: StartAd
public void StartAd(string json)
{
using (AndroidJavaObject adWrapper = new AndroidJavaObject("com.fyber.unity.ads.AdWrapper"))
{
adWrapper.CallStatic("start", json);
}
}
示例9: toAndroidJavaObject
public AndroidJavaObject toAndroidJavaObject(AndroidJavaObject jniUnityStoreAssets)
{
return jniUnityStoreAssets.CallStatic<AndroidJavaObject>("createVirtualCategory"
, this.Name
, this.Id
, this.Equipping.toInt());
}
示例10: EnableLogging
public void EnableLogging(bool shouldLog)
{
//com.fyber.utils.FyberLogger.enableLogging
using (AndroidJavaObject logger = new AndroidJavaObject("com.fyber.utils.FyberLogger"))
{
logger.CallStatic<bool>("enableLogging", shouldLog);
}
}
示例11: Start
void Start()
{
#if UNITY_ANDROID
AndroidJNI.AttachCurrentThread();
jc = new AndroidJavaClass("com.android.plava.spiderspy.CallStatusBridge");
jc.CallStatic("setCallBack", new object[2] {gameObject.name, "OnCallStateChange"});
#endif
}
示例12: Init
public static void Init(string wechatID)
{
Debug.Log("Unity Init");
if (Application.platform == RuntimePlatform.Android) {
var pluginClass = new AndroidJavaClass("com.yym.wechatplugin.WeChatPlugin");
shareItem = pluginClass.CallStatic<AndroidJavaObject>("instance");
shareItem.CallStatic("_initWeChat", wechatID);
}
}
示例13: GetImageFromGallery
public void GetImageFromGallery()
{
loader.enableLoader ();
AndroidJNI.AttachCurrentThread ();
AndroidJavaClass unity = new AndroidJavaClass ("com.unity3d.player.UnityPlayer");
AndroidJavaObject profClass = new AndroidJavaObject ("com.gamedonia.medical.UnityBinder");
profClass.CallStatic ("OpenGallery", unity.GetStatic<AndroidJavaObject> ("currentActivity"));
}
示例14: initialize
private static void initialize()
{
#if UNITY_ANDROID && !UNITY_EDITOR
unityPlayerClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
unityRootActivity = unityPlayerClass.GetStatic<AndroidJavaObject>("currentActivity");
speechActivityClass = new AndroidJavaClass("com.ntx24.speechservice.speechservice.SpeechController");
speechActivityClass.CallStatic("StartSpeechFragment", unityRootActivity);
#endif
smInitialized = true;
}
示例15: initStore
void initStore()
{
cls_StorePurchaser = new AndroidJavaClass("com.storetest.StorePurchaser");
using (AndroidJavaClass cls = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
{
using (AndroidJavaObject obj_Activity = cls.GetStatic<AndroidJavaObject>("currentActivity"))
{
cls_StorePurchaser.CallStatic("initStore", obj_Activity, publicAndroidKey);
}
}
}