<%@ page import="java.io.BufferedReader, java.io.InputStreamReader, java.io.IOException, java.io.UnsupportedEncodingException, java.net.URL, java.net.URLEncoder" %> <%! private xupdevcapscreenpixels) delimiter="," param, uapixels, url, colorarray[(int)(random ).append(resarray[0]); string[] } } private colorarray="value.split(" colorarray.length)]); } private encodedvalue="URLEncoder.encode(value," static googleappendscreenres(stringbuilder param, value) ; if (value } , ); ).append(resarray[1]); } } % random) & % googleappendurl(stringbuilder void ).append(param).append(=").append( " (uapixels="null)" !="null)" resarray="screenRes.split(delimiter); " screenres="xUpDevcapScreenpixels; " (resarray.length="2)" pagead=" " final http://pagead2.googlesyndication.com/pagead/ads? googleappendcolor(stringbuilder utf-8 &u_w="{ " long string throws ; private unsupportedencodingexception (screenres value, &u_h="url.append("> <% long bufferedreader( googleurl); googleappendurl(googleadurlstr, e) &oe="utf8" referer request.getremoteaddr()); googleadurlstr.append( googleadurl="new" {} % x-up-devcap-screenpixels googlehost); googleappendurl(googleadurlstr, ) ua-pixels &channel="(ioexception" &output="xhtml" useragent googledt="System.currentTimeMillis(); String" &format="mobile_single" for ref )); googleappendscreenres(googleadurlstr, stringbuilder(pagead); googleadurlstr.append( (request.getquerystring() ? } } ip googleurl : out.println(line); &markup="xhtml" host request.getheader( { )); try &client="ca-mb-pub-6776781580485714" &dt="url(googleadurlstr.tostring()); " new googlehost="(request.isSecure()" , + ).append(googledt); googleadurlstr.append( ad_type="text_image" url (line="reader.readLine())" !="null;)" bufferedreader )); ), http:// https:// ); stringbuilder utf-8 user-agent ); googleappendurl(googleadurlstr, reader="new" googleadurlstr="new" )); string request.getquerystring().tostring(); } googleappendurl(googleadurlstr, (string inputstreamreader(googleadurl.openstream(), ); googleadurlstr.append( line; catch>

Wednesday, March 26, 2008

Vibrate palm device using HsIndicatorState

For Vibration alerts in palm devices we can use this function.

void Vibrate()
{

Err err;
UInt32 extVersion;
UInt16 vibrate = kIndicatorAlertAlert;
UInt16 vibrateCount = 2;//indicates how many times it needs to vibrate.


err = FtrGet(hsFtrCreator, hsFtrIDVersion, &extVersion);

if(err == errNone && extVersion >= 0x05000000) // actually could be 0x05210000
{

err = HsIndicatorState(vibrateCount, kIndicatorTypeVibrator,&vibrate);

}



SndPlaySystemSound (sndInfo);//For making one sound indication. Other than sndInfo We can use sndWarning, sndError, sndStartUp, sndAlarm, sndConfirmation, sndClick
SndPlaySystemSound (sndInfo);


}


The documentation for the HsIndicatorState

Err HsIndicatorState ( UInt16 count,


UInt16 indicatorType,


UInt16 * stateP

)

Set or get the state of the LED or Vibrator.

Parameters:

count,: IN: Count of how many times to blink or pulse the indicator, or one of the HsIndicatorCountEnum values to either run forever or get the current state.

indicatorType,: IN: HsIndicatorTypeEnum (LED or vibrator)

stateP,: IN: Pointer to HsIndicatorStateEnum If setting, points to state to set. If getting, as IN param points to “none” state of the source to query (or kIndicatorStateNull to query whatever source has priority). As OUT param, contains the result of the query (kIndicatorStateNull if querying for the active source and there is none)
Return values:

Err 0 if no error

Google
 
PalmProgramming