Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
Accepted Solution

Alert display on building code of android in phonegap

I am getting a alert in starting in emulator using phone gap technology in android.

"Exception building coredova js globals: ReferenceError: can't find variable: org for key"exec".

actually i don't understand why this come.same code works on blackberry.

please help

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Alert display on building code of android in phonegap

Hi. Do you use the same Phonegap/Cordova for both platforms? You shouldn't since platforms might work different and that's why Phonegap/Cordova offers different files for all the supported platforms.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: Alert display on building code of android in phonegap

can you please give me a sample of scrollable list  fixed height in android .

 

 

?

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Alert display on building code of android in phonegap

Hi ravi1989,

 

using Phonegap/Cordova has nothing to do with creating a scrollable list on either Android or BlackBerry, Phonegap/Cordova is mainly providing an interface to the underlying hardware to use the same function calls for eg. accessing the fileSystem of the device. So you write the source code only once and do not need to write it for each platform.

 

For your scrollable list you asked again and again here you might need to let us know how it should look like. Have you tried bbUI.js, jQuery mobile or any other framework that might be helpful for mobile UIs?

 

Also have a closer look to iScroll for scrollable lists. I used it to build scrollable list with various heights on iOS, PlayBook and Android devices and it is working well for me. There are examples to get started with iScroll on the page too.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: Alert display on building code of android in phonegap

Actually I am a beginner i don't know how to make scrollable list but i make scrollable list which is working fine in blackberry touch device, but when i run same code in android list is not scrolling , i will share my code.

 

with simple example..

 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Departure Schedule</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="script/common.js"></script>
<script type="text/javascript" src="script/soapclient.js"></script>
<script type="text/javascript" src="script/jquery.min.js"></script>
<script type="text/javascript" src="iscroll.js"></script>
<script type="text/javascript">

 

function GetDepartureStationDashboard_callBack()
{
//document.getElementById('loadingImg').style.visibility = "hidden";
var tabledata = "";
tabledata += "<table>";
for (var i = 0; i < 20; i++)
{
tabledata += "<tr id="+i+">";
tabledata += "<td >"+ i+ "</td>";

tabledata += "</tr>";
}
tabledata += "</table>";
document.getElementById("mainBodyDiv").innerHTML = tabledata;
}


</script>
</head>
<body onload="GetDepartureStationDashboard_callBack()">
<div id="wrapper">
<div class="login_cont">
<div class="home_icon"><a href="index.html"><img src="images/back-icon.png" alt="Home" title="Home" /></a></div>
<h1 class="fr">Departures</h1>
<div class="cl"></div>
<div class="mid_cont">
<div class="grid_cont">
<div class="heading_bar">
<h1 class="fl" id="headingcontent"></h1>
<input name="" type="button" class="heading_btn fr" value="Change" onclick="location.href='index.html'"/>
<div class="cl"></div>
</div>
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30%">PLATFORM NO.</td><td width="30%">STD - ETD</td><td width="35%">NEXT STATION</td><td width="5%">STATUS</td>
</tr>
</table>
</div>

<div class="scroll-pane" id="mainBodyDiv">
</div>

<div class="grid_error"><img src="images/help-icon.png" /> Departure Schedule</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="hdnStationName" id="hdnStationName" value="" />
</body>
</html>

 

 

*************************************************************************************in css file************

.scroll-pane
{
width: 100%;
height: 150px;
z-index:1;
overflow: auto;
position: relative;

}

.scroll-pane table tr:hover
{
background:#dbe3ec;

}

 

can you do some change so that it will run on both platform android or blackberry touch device\

 

 

THANKS

NAVEEN

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Alert display on building code of android in phonegap

I attached a sample that has a scrollable list using your source code. I changed some lines of code but the scrollable list also should work like you expect to. The list on the BB SmartPhone looks like this for now and same on Android device. This is broken down from the examples provided on the iScroll website, so to change styles and position of the scrollbar have a closer look there.

 

ravi1989_iscroll.jpg


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: Alert display on building code of android in phonegap

[ Edited ]

thanks can you give me your ID <removed>, please add me

 

EDIT: Personal Information such as e-mail is prohibited for your security. Please review User Guidelines  under section "Be careful."

Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: Alert display on building code of android in phonegap

THANKS SIR
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Alert display on building code of android in phonegap

NP. Hope it is a solution for you.

 

BTW: there is a button to add source code to your posts for more readability :smileywink:


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: Alert display on building code of android in phonegap

 can you explain ..what is the use of this line

 

var myScroll = new iScroll('mainBodyDiv', {snap: 'tr', scrollbarClass: 'myScrollbar' });.

 

i know mainBodyDiv is Id of div

 

but what is scrollbarClass..?

and what is myScrollbar..?