Cari lettori,
sono felice di comunicarvi che ho finito la Maturità :)
Devo dire che è stata una bella esperienza, carica di agitazione e troppe aspettative. L'orale è stato l'esame più cruciale ma se siete sicuri di voi, niente può fermarvi. Insomma, ammetto che è stato un momento in cui un'ora cambia completamente la vostra personalità e in cui ci si sente davvero liberi.
Decido, quindi, di pubblicare la mia tesina, sperando che potrebbe servire a qualcuno in futuro.
La tesina tratta dell'Accelerometro e lo studio dei comportamenti che si potrebbe rivelare attraverso di esso. Premetto che l'idea iniziale non è mia. Però l'ho sviluppata completamente io. Tutto il resto lo potete leggere nella tesina, buona lettura.
Carico sia il pdf - per color che vogliono darci un'occhiata. Il .odt per gli studenti :)
Tesina - ODT (clicca qui) - PDF (clicca qui)
In bocca al lupo ai futuri maturandi :)
Shev
Nik Programming
Sunday, June 30, 2013
Tuesday, October 2, 2012
Android Vibration Support in Unity3D
Hi everyone,
today I want to talk about Android Vibration in Unity3D.
As I tested on Kindle, the SystemInfo.supportsVibration returned true even if there's no vibrator on it.
So, I decided to Call the native Android Java Class.
That was my code :
_____________________________________________________________________
AndroidJavaObject activity;
AndroidJavaObject mWindowManager;
bool result;
public void Start()
{
if (mWindowManager == null)
{
using (AndroidJavaObject activity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").
GetStatic<AndroidJavaObject>("currentActivity"))
{
mWindowManager = activity.Call<AndroidJavaObject>("getSystemService","sensor");
}
}
result = mWindowManager.Call<bool>("hasVibrator");
________________________________________________________________________
But all my tries were useless. In fact, as I saw on this link, the function I wanted to call, which is hasVibrator(), can only be used on API 11 ( Android 3.0 ) .
So in all Android Systems from 2.0 to 2.3.3 vibration support can't be checked !!!!!!!
So, if I'll find some different way to check that, it will be written on this blog :)
Cheers,
Nik
today I want to talk about Android Vibration in Unity3D.
As I tested on Kindle, the SystemInfo.supportsVibration returned true even if there's no vibrator on it.
So, I decided to Call the native Android Java Class.
That was my code :
_____________________________________________________________________
AndroidJavaObject activity;
AndroidJavaObject mWindowManager;
bool result;
public void Start()
{
if (mWindowManager == null)
{
using (AndroidJavaObject activity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").
GetStatic<AndroidJavaObject>("currentActivity"))
{
mWindowManager = activity.Call<AndroidJavaObject>("getSystemService","sensor");
}
}
result = mWindowManager.Call<bool>("hasVibrator");
________________________________________________________________________
But all my tries were useless. In fact, as I saw on this link, the function I wanted to call, which is hasVibrator(), can only be used on API 11 ( Android 3.0 ) .
So in all Android Systems from 2.0 to 2.3.3 vibration support can't be checked !!!!!!!
So, if I'll find some different way to check that, it will be written on this blog :)
Cheers,
Nik
Introduction
Hi Everyone :)
So,
this is my first post in my Blog! I don't know actually if I need a Blog. However, a friend here, told me I should write somewhere all my experiences in Programming. Yeah, that's why I'm here.
As you probably know, I'm a Game Developer.
So I'll post here all my experiences and difficult issues which I solved during my career :) trying to help you or... showing you how much Programming is cool :)
Cheers,
Nikolai
Subscribe to:
Posts (Atom)