Domanda

I've made a tester class to test the vibration on an iPod Touch but the vibration doesn't work when tested on the device. I've imported all relevant extensions and linked to the relevant Adobe AIR library classes as per this question and answer. Am I using a wrong callback or something?

package  
{
    import flash.display.Sprite;
    import com.adobe.nativeExtensions.Vibration; 

    public class Test extends Sprite
    {
        public function Test()
        {
            run();
        }

        public function run(): void {
            var vibe:Vibration;
            if (Vibration.isSupported)
            {
                vibe = new Vibration();
                vibe.vibrate(25000);
            }
        }
    }
}

EDIT: Found out that iPod Touches don't have vibration sensor. After testing this on an iPhone 5, it still doesn't work. As soon as the app is launched, it crashes (and closes) without vibrating.

È stato utile?

Soluzione

iPod Touch do not support vibration. :)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top