E-Mail:
Get our new Windows 7 eBook (PDF) for $7 with 70+ Tips. Download Now!

Detecting Vibrators And Alarm LEDs Programmatically

  • No Related Post

Sometimes, you really need to know if the handheld that your app runs on has a vibrator or a alert LED. These routines can help you:

Boolean hasLED()
{
UInt32 capabilities;
FtrGet(kAttnFtrCreator, kAttnFtrCapabilities, &capabilities);
if (capabilities & kAttnFlagsHasLED)
{
return true;
}
else
{
return false;
}
}

Boolean hasVibration()
{
UInt32 capabilities;
FtrGet(kAttnFtrCreator, kAttnFtrCapabilities, &capabilities);
if (capabilities & kAttnFlagsHasVibrate)
{
return true;
}
else
{
return false;
}
}

These routines worked in both PODS 1.1 and OnBoardC. Feel free to use them in your own apps!

What do you think?

TamsPalm - The Palm OS Blog is a great source for reviews, exclusive screenshots, and updates on all the new, 21st Century mobile technology as soon as it’s news to us!

What Do You Think?

 

Posted Recently

41 queries / 0.793 seconds.