// Use this for initialization void Start() { //get the instance of pedometer plugin pedometerPlugin = PedometerPlugin.GetInstance(); //set to zero to hide debug toast messages pedometerPlugin.SetDebug(0); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); //check if step detector is supported bool hasStepDetector = utilsPlugin.HasStepDetector(); if (hasStepDetector) { UpdateStepDetectorStatus("available"); //initialze pedometer pedometerPlugin.Init(); //set this to true to always starts at zero steps, else set to false to continue steps pedometerPlugin.SetAlwaysStartAtZero(true); //set call back listener for pedometer events pedometerPlugin.SetCallbackListener(OnStepCount, OnStepDetect); //register sensor event listener and pass sensor delay that you want pedometerPlugin.RegisterSensorListener(SensorDelay.SENSOR_DELAY_FASTEST); } else { UpdateStepDetectorStatus("not available"); } }
// Use this for initialization void Start() { if (AndroidRuntimePermissions.CheckPermission("android.permission.RECORD_AUDIO") != AndroidRuntimePermissions.Permission.Granted) { AndroidRuntimePermissions.RequestPermission("android.permission.RECORD_AUDIO"); } if (AndroidRuntimePermissions.CheckPermission("android.permission.ACCESS_FINE_LOCATION") != AndroidRuntimePermissions.Permission.Granted) { AndroidRuntimePermissions.RequestPermission("android.permission.ACCESS_FINE_LOCATION"); } dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); // set the calling package this is optional // you can use this if your app is for children or kids speechPlugin.SetCallingPackage("com.mycoolcompany.mygame"); AddSpeechPluginListener(); }
// Use this for initialization void Start() { demoController = GameObject.FindObjectOfType<DemoController>(); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); }
// Use this for initialization void Start() { //get the instance of pedometer plugin pedometerPlugin = PedometerPlugin.GetInstance(); //set to zero to hide debug toast messages pedometerPlugin.SetDebug(0); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); //check if step detector is supported bool hasStepDetector = utilsPlugin.HasStepDetector(); bool hasStepCounter = utilsPlugin.HasStepCounter(); //if (hasStepDetector) { if (hasStepCounter) { UpdateStepDetectorStatus("available"); // event listeners AddEventListeners(); //initialze pedometer pedometerPlugin.Init(); } else { UpdateStepDetectorStatus("not available"); } }
// Use this for initialization void Start() { demoController = GameObject.FindObjectOfType <DemoController>(); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); }
private void Awake() { #if UNITY_ANDROID if (Application.platform != RuntimePlatform.Android) { return; } dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); textToSpeechPlugin.OnInit += OnInit; textToSpeechPlugin.OnChangeLocale += OnSetLocale; textToSpeechPlugin.OnStartSpeech += OnStartSpeech; textToSpeechPlugin.OnEndSpeech += OnEndSpeech; textToSpeechPlugin.OnErrorSpeech += OnErrorSpeech; #endif }
void Start() { if (AndroidRuntimePermissions.CheckPermission("android.permission.RECORD_AUDIO") != AndroidRuntimePermissions.Permission.Granted) { AndroidRuntimePermissions.RequestPermission("android.permission.RECORD_AUDIO"); } if (AndroidRuntimePermissions.CheckPermission("android.permission.WRITE_EXTERNAL_STORAGE") != AndroidRuntimePermissions.Permission.Granted) { AndroidRuntimePermissions.RequestPermission("android.permission.WRITE_EXTERNAL_STORAGE"); } if (GameObject.FindGameObjectsWithTag("SceneThemeAudio").Length > 0) { sceneTheme = GameObject.FindGameObjectsWithTag("SceneThemeAudio")[0]; } Bihou = GameObject.FindGameObjectWithTag("Bihou"); dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); // set the calling package this is optional // you can use this if your app is for children or kids speechPlugin.SetCallingPackage("com.mycoolcompany.mygame"); AddSpeechPluginListener(); }
// Use this for initialization void Start() { //get the instance of pedometer plugin pedometerPlugin = PedometerPlugin.GetInstance(); //set to zero to hide debug toast messages pedometerPlugin.SetDebug(0); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); //check if step detector is supported on the current android mobile device bool hasStepDetector = utilsPlugin.HasStepDetector(); bool hasStepCounter = utilsPlugin.HasStepCounter(); //if (hasStepDetector) { if (hasStepCounter) { // yehey your android mobile device support pedometer UpdateStepDetectorStatus("available"); // event listeners AddEventListeners(); //initialze pedometer pedometerPlugin.Init(); } else { // if you get this meaning // pedometer is not available on your android mobile device sorry! UpdateStepDetectorStatus("not available"); } }
// Use this for initialization void Start() { timePlugin = TimePlugin.GetInstance(); timePlugin.SetDebug(0); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); }
// Use this for initialization void Start() { utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); sharePlugin = SharePlugin.GetInstance(); sharePlugin.SetDebug(0); }
// Use this for initialization void Start() { appIndexingPlugin = AppIndexingPlugin.GetInstance(); appIndexingPlugin.SetDebug(0); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); InitGoogleIndexing(); }
// Use this for initialization void Start() { utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); utilsPlugin.UnLockScreen(); // dont sleep Screen.sleepTimeout = SleepTimeout.NeverSleep; ShowDemo(currentPage); }
private void Awake() { dispatcher = Dispatcher.GetInstance(); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); imagePickerPlugin = ImagePickerPlugin.GetInstance(); imagePickerPlugin.SetDebug(0); // init image picker instance imagePickerPlugin.Init(); }
private void Awake() { dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); }
// Use this for initialization void Start() { dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); AddSpeechPluginListener(); }
private void Awake() { // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); //textToSpeechPlugin.OnInit += this.OnInit; //textToSpeechPlugin.OnEndSpeech += this.OnEndSpeech; }
// Use this for initialization void Start() { dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); // set the calling package this is optional // you can use this if your app is for children or kids speechPlugin.SetCallingPackage("com.mycoolcompany.mygame"); AddSpeechPluginListener(); }
// Use this for initialization void Start() { dispatcher = Dispatcher.GetInstance(); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); sharePlugin = SharePlugin.GetInstance(); sharePlugin.SetDebug(0); imagePickerPlugin = ImagePickerPlugin.GetInstance(); imagePickerPlugin.SetDebug(0); // init image picker instance imagePickerPlugin.Init(); // add eventlisteners AddEventListener(); EnableDisableShareButton(false); }
private void Awake() { dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); textToSpeechPlugin.OnInit += OnInit; textToSpeechPlugin.OnChangeLocale += OnSetLocale; textToSpeechPlugin.OnStartSpeech += OnStartSpeech; textToSpeechPlugin.OnEndSpeech += OnEndSpeech; textToSpeechPlugin.OnErrorSpeech += OnErrorSpeech; }
void Start() { dispatcher = Dispatcher.GetInstance(); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); AddSpeechPluginListener(); AddTextToSpeechListener(); apiaiClient = new ApiAiUnity(); apiaiClient.Initialize(new AIConfiguration("a984bc306ae24d11b4105e251f892a21", SupportedLanguage.English)); }