Using Vibrator & Camera on ET1


My customer has query on using "Vibrator" notification and "Camera".

The below is commented by the customer, and requesting assistance on the same.

I tired few sample application for notification and imager, but I couldn’t get it right. Both notification.enumerate(); and imager.enumerate(); is not responding and the system hangs on executing these lines. Is there any configuration/reference file I’m missing ?



Pietro Francesc...
Hi Ram,Attached below you can

Hi Ram,

Attached below you can find a small sample that enumerates Imagers and notification elements on the ET1.

It works on my ET1 DV unit with BSP 112811 with RhoElements v1.0.1.1.

Hope this helps.



-- Follows "enumerate.html"


<script type="text/javascript" src="../../Android/data/com.motorolasolutions.rhoelements/JSobjects.js"></script><!-- For Android Beta -->


<meta HTTP-Equiv="imager" Content="imagerEnumEvent:url('Javascript:fnEnumImagers(%s);')">

<META HTTP-Equiv="notification" content="EnumNotificationsEvent:url('Javascript:fnEnumNtfy(%s)');">



#cmdBar {






<body BGCOLOR="#FFFFEA" TEXT="#0000A0" LINK="#FF0000" VLINK="#808080" ALINK="#008040" onLoad="fnSetEnumTimer();">



<header onclick="history.back()">

    Back to Menu



<div ID="msgImager"></div>

<div ID="msgNtfy"></div>




<div id="cmdBar"/>



var g_nImageCounter = 1;


function fnEnumImagers(imagerArray)


      var imagerInfo = "Imagers On Device: " + imagerArray.length + "<BR><select id='imagers_menu'>"


    for (i=0; i < imagerArray.length; i++) {

        imagerInfo = imagerInfo + '<option value="' + imagerArray[i][1] + '">' + imagerArray[i][0] + '</option>';


    imagerInfo = imagerInfo + '</select><BR>'


    msgImager.innerHTML = imagerInfo;   


function fnEnumNtfy(ntfyArray)


    var ntfyInfo = "Notification On Device: " + ntfyArray.length + "<BR><select id='notification_menu'>"


    for (i=0; i < ntfyArray.length; i++) {

        ntfyInfo = ntfyInfo + '<option value="' + ntfyArray[i][1] + '">' + ntfyArray[i][2] + '</option>';


    ntfyInfo = ntfyInfo + '</select><BR>'


    msgNtfy.innerHTML = ntfyInfo;   


//  We can not call Scanner:Enumerate during page load on WM so give the page 3 seconds to finish loading

function fnSetEnumTimer()


    msgImager.innerHTML = "getting Imager data...";

    msgNtfy.innerHTML = "getting Notification data...";

    setTimeout("fnOnImagerEnable()", 3000);

    setTimeout("fnOnNtfyEnable()", 3000);


function fnOnImagerEnable()


    var Generic = new ActiveXObject("PocketBrowser.Generic");

    Generic.InvokeMETAFunction('imager', 'Enumerate');


function fnOnNtfyEnable()


    var Generic = new ActiveXObject("PocketBrowser.Generic");

    Generic.InvokeMETAFunction('notification', 'Enumerate');



Vote up!
Vote down!

Points: 0

You voted ‘up’

Log in to post comments