Unity 사용법 / AndroidJavaObject (안드로이드 진동 기능, 네트워크 상태 확인, 위치정보 확인, 앱 버전 확인, SMS 보내기, 파일 다운로드, 앱 실행)

The code that runs on Android devices may have been written in Java, Kotlin.Therefore, in order for Unity to use the Android feature, it is necessary to call the Android native code from the C# code.# Use Android Vibration// // AndroidJavaObject = AndroidJavaObject バイブレータ new 新しい AndroidJavaClass(“com.unity3d.player”).UnityPlayer」).GetStatic<AndroidJavaObject>(“currentActivity”).Call<AndroidJavaObject>(“getSystemService”,”administrator”);// 동작long[] pattern = newlong[] { 0, 100, 1000};administrator.Call(“vibrate”, pattern, -1);# Network Status Verification# Network Status Verification# Verifying Location Information# Verifying Location Information# Checking the App Version# Checking the App Version# SMS transmission// // AndroidJavaObject =AndroidJavaClass smsManagerClass new新しいAndroidJavaClass(“Android”)。テレフォニー.Sms Manager”;Android Java オブジェクトの smsManager = smsManagerClass.CallStatic<AndroidJavaObject>(“getDefault”);// SMS “string phoneNumber = “01012345678”; string メッセージ = “Hello, World!”; smsManager.Call(“sendTextMessage”, phoneNumber, null, message, null, null);# download a file# download a file# Running an Application// 텐성인 “st string url = “https://www.example.com “; AndroidJavaObject Intention = New AndroidJavaObject(“android.content.Intent”, AndroidJavaObject.GetStatic<string>(“android.intention.VIEW(“); Intentional. Call <AndroidJavaObject>(“setData”, AndroidJavaObject”).CallStatic<AndroidJavaObject>(“parse”, url);// Activity.Call(“startActivity”, intent);// 텐성인 “st string url = “https://www.example.com “; AndroidJavaObject Intention = New AndroidJavaObject(“android.content.Intent”, AndroidJavaObject.GetStatic<string>(“android.intention.VIEW(“); Intentional. Call <AndroidJavaObject>(“setData”, AndroidJavaObject”).CallStatic<AndroidJavaObject>(“parse”, url);// Activity.Call(“startActivity”, intent);// 텐성인 “st string url = “https://www.example.com “; AndroidJavaObject Intention = New AndroidJavaObject(“android.content.Intent”, AndroidJavaObject.GetStatic<string>(“android.intention.VIEW(“); Intentional. Call <AndroidJavaObject>(“setData”, AndroidJavaObject”).CallStatic<AndroidJavaObject>(“parse”, url);// Activity.Call(“startActivity”, intent);

error: Content is protected !!