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

Java Development

Reply
New Developer
minija
Posts: 2
Registered: ‎12-07-2009
My Device: 9630

Re: 9630 Simulator NOT working with MDS Simulator !!!

Hi korylovre

 

Thanks a lot . It is working fine. I really appreciate the help provided.

 

Minija

Please use plain text.
New Developer
tailoredsolutions
Posts: 1
Registered: ‎12-28-2009
My Device: Not Specified

Re: 9630 Simulator NOT working with MDS Simulator !!!

Thanks for your help.

 

it was really nice solution from you guys.

 

Highly Appreciable

 

5/5 from my side

Please use plain text.
Developer
ssaidwho
Posts: 17
Registered: ‎12-31-2009
My Device: Not Specified

Re: 9630 Simulator NOT working with MDS Simulator !!!

[ Edited ]

Thank you Kory and Click,

 

This was very helpful.

 

I run the simulator from the command line (sure would like to know how to edit the eclipse command line parameters for simulator execution to avoid this), and I added the following to change to this network setting every time the simulator starts:

 

/network="EVDO"

 

 

(my Cygwin bash alias to run sim):

 

alias run_blackberry_simulator="cd /cygdrive/c/Users/Steve/Tools/eclipse-jee-galileo-SR1-win32/eclipse/plugins/net.rim.ejde.componentpack4.7.0_4.7.0.53/components/simulator;
fledge.exe /handheld=9530 /app-param=JvmAlxConfigFile:9530.xml /pin=0x2100000A /data-port=0x4d44 /data-port=0x4d4e /session=9530 /app-param=launch=<myApplication> /app=Jvm.dll /app-param=DisableRegistration  /app-param=JvmDebugFile:\"C:\Users\Steve\workspace32\storm.debug\" /network=\"EVDO\""

 

Steve

Please use plain text.
Developer
korylovre
Posts: 17
Registered: ‎08-05-2009
My Device: Not Specified

Re: 9630 Simulator NOT working with MDS Simulator !!!

ssaidwho,

 

No problem, thanks for the kudos.

 

Assuming you have a BlackBerry project already set up in Eclipse, it looks to me like you are looking for the 'Command Line' in the Simulator tab of the Edit Configuration window.

Just right click on your BlackBerry project in Eclipse in the Package Explorer window and select Properties (at bottom) then select the Run/Debug Settings options.  Choose (highlight) the simulator you have installed that you are wishing to add the /network="EVDO" command (note that as in your cygwin command line you need to use the \ to escape the quotes; also don't put it last unless you prefix it with a space character - better to add it after another that has the space character at the end of the line) and then click on the Edit... button.  The Edit Configuration window should appear - click on the Simulator tab and then click on the Advanced sub-tab.  The first line in this sub-window is the Command Line - click the Edit Command... button to add your desired parameter(s).

 

Let me know if this is what you were looking for (and solves what I was lamenting about earlier - having to choose the network each time I started up).

 

Note:  I wasn't going to test this idea out since I haven't been focusing on BlackBerry apps for a few months now but then I did and even though I was able to add the network parameter (either to the command directly or using the Network tab) after I'd Apply it then close the window it always reverted back to the original Command Line setting.   Let me know if you find a way around this issue.

 

Kory

Please use plain text.
New Contributor
swirlsolutions
Posts: 6
Registered: ‎09-06-2010
My Device: 9700

Re: 9630 Simulator NOT working with MDS Simulator !!!

Hi there

 

I have to start off letting you know that I am not a developer or programmer but I train users on BlackBerry using simulation the software.   I purchased a new laptop and had to reinstall software again and I cannot get this to work on my windows 7 PC.

 

Would anyone out there like to remote control and invoice me to fix.  I just can't spend more time on this and need for it to work for presentaions and webinars.

 

Thanks so much! Darci

 

Please use plain text.
Contributor
devendra
Posts: 14
Registered: ‎11-09-2011
My Device: 8830 4.5 o.s

Re: 9630 Simulator NOT working with MDS Simulator !

[ Edited ]

I HAVE A VERY BIG PROBLEM THAT I SEARCHED EVERY WHERE ON NET BUT CAN NOT GET THE ANSWER..

PLZZZZZZZZZZ HELP ME...

 

   WHEN I COME IN MORNING AND START MY SYSTEM AND START ECLIPSE PLUGIN BB ...OPEN MY PROJECT..

   SIGN IT WITH SIGN KEYS...AND DEBUG IT WITH LAUNCH MDS SIMULATOR IN DEBUG MODE...ITS RUNS FINE AND IT CONSUME THE WEB SERVICES AND DEBUG FINE...HERE EVERYTHING IS OK..

MY MDS RUN,BAT IS OPEN AND NOT CLOSES IMMEDIETLY..IT STAYS UNTIL I CLOSE IT...

JAVA_HOME IS ALSO FINE...

CLASS PATH ALSO FINE..

 

 

 

PROBLEM::::::::::

         

                  BUT WHEN I DEBUG AGAIN IT DOES NOT RUN GIVE SOME EXCEPTION..

                THREAD SUSPENDED...OR SOMETIME RUN..

       THEN I RUN MDS RUN.BAT AS ADMINISTRATOR  BUT NO EFFECTS....

            THE MAIN PROBLEM IS SOMETIMES IT RUN BUT SOMETIMES NOT...

 

 

EDIT:=======

     my code is..

   

                                 

public java.lang.String getDistrictList(java.lang.String stateID) throws java.rmi.RemoteException {
// Copy the incoming values into an Object array if needed.
Object[] inputObject = new Object[1];
inputObject[0] = stateID;
System.out.println("=================under the get disrict list=============1======");
Operation op = Operation.newInstance(_qname_GetDistrictList, _type_GetDistrictList, _type_GetDistrictListResponse);
_prepOperation(op);
System.out.println("=================under the get disrict list===========2========");
op.setProperty(Operation.SOAPACTION_URI_PROPERTY, "http://tempuri.org/GetDistrictList");
Object resultObj;
System.out.println("=================under the get disrict list===========3========");
try {
System.out.println("=================under the get disrict list========4===========");
resultObj = op.invoke(inputObject);

} catch (JAXRPCException e) {
Throwable cause = e.getLinkedCause();
System.out.println("=================under the get disrict list========5===========");
if (cause instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException) cause;

}
System.out.println("=================under the get disrict list=========6=========="+e);
throw e;    //-------------------HERE i get exception...jaxrpc exception suspended------
}
java.lang.String result;
// Convert the result into the right Java type.
// Unwrapped return value
System.out.println("=================under the get disrict list==========7=========");
Object getDistrictListResultObj = ((Object[])resultObj)[0];
System.out.println("=================under the get disrict list=======8============");
result = (java.lang.String)getDistrictListResultObj;
System.out.println("=================under the get disrict list=======9============");
return result;
}

 

 

 sir plz give solution..

  thanks in advance

.

 

 

Please use plain text.
Developer
simon_hain
Posts: 16,216
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: 9630 Simulator NOT working with MDS Simulator !

Please start your own thread, unlock your caps-lock key and use proper English (this makes it much easier for non-native speakers to decipher a post).
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
devendra
Posts: 14
Registered: ‎11-09-2011
My Device: 8830 4.5 o.s

Re: 9630 Simulator NOT working with MDS Simulator !

thanx for giving me sch a nice reply

Please use plain text.
Contributor
devendra
Posts: 14
Registered: ‎11-09-2011
My Device: 8830 4.5 o.s

Re: 9630 Simulator NOT working with MDS Simulator !

my code is not playing on my 8830 mobile..........

no error in my code......

i want to play the rtsp url on mobile

 

my code is:

 

CODE 1

 

 

package mypackage;

import net.rim.device.api.ui.UiApplication;


public class MyApp extends UiApplication
{

public static void main(String[] args)
{
// Create a new instance of the application and make the currently
// running thread the application's event dispatch thread.
MyApp theApp = new MyApp();
theApp.enterEventDispatcher();
}


public MyApp()
{
// Push a screen onto the UI stack for rendering.
// pushScreen(new playHTTPVideo());
BrdcstMessage brd = new BrdcstMessage();
brd.setMsg1("rtsp://www.emstv.in/contents/video/MO_Video/Madhya_Pradesh/Madhya_Pradesh_MP_Nagar_Zone_1_318671288.3gp");

pushScreen(new VideoView(brd));

System.out.println("===============================control is in my app class main====================");

}
}CODE 2

 

 

package mypackage;

public class BrdcstMessage {

String msg1;

public void setMsg1(String msg) {
System.out.println("***************************** set msg1 broadcast class************************");
this.msg1= msg;
}
public String getMsg1() {
return msg1;
}


}CODE 3

 

package mypackage;

import java.io.IOException;

import javax.microedition.media.MediaException;
import javax.microedition.media.Player;
import javax.microedition.media.control.VideoControl;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.container.MainScreen;

public class VideoView extends MainScreen
{
private Player _player;
private Field _videoField;
private VideoControl _vc;

// Constructor
public VideoView(BrdcstMessage msg)
{
super(net.rim.device.api.ui.Manager.NO_VERTICAL_SCROLL);

System.out.println("****************************************************initVideo over*");


initVideo(msg.msg1);//msg._MsgUrl = rtsp://website addess/some.3gp;
System.out.println("********************************************* the msg is means Rtsp is*********************************=="+msg.msg1);

if(_videoField != null)
{
System.out.println("*******************************_videoField***************************"+_videoField );
displayVideo();
System.out.println("*******************************displayVideo over**************");
}
}


private void setVideoSize(int width, int height)
{
try
{
if (_vc != null)
{
System.out.println("************************set video size");
_vc.setDisplaySize(width, height);
System.out.println("************************set video size---------");
}
}
catch(MediaException pe)
{
System.out.println(pe.toString());
}
}

/**
* Creates and initializes a video player
* @param url The URL of the video file to play
*/
private void initVideo(String url)
{
try
{
_player = javax.microedition.media.Manager.createPlayer(url) ;
_player.realize();
System.out.println("*****************************_player * "+_player);
_vc = (VideoControl) _player.getControl("VideoControl");
System.out.println("*****************************_vc *************************"+_vc);
if (_vc != null)
{
_videoField = (Field) _vc.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
System.out.println("*****_videoField *"+_videoField);
_vc.setVisible(true);
}
}
catch(MediaException pe)
{
System.out.println("----************************----initVideo-----MediaException="+pe.getMessage());
}
catch (IOException ioe)
{
System.out.println("----************************----initVideo-----MediaException="+ioe.getMessage());
}
}

private void displayVideo()
{
// setTitle("Send Media Demo");
add(_videoField);
System.out.println("*****************************displayVideo-----------_videoField added*");

try
{
// Start media player
_player.start();
System.out.println("*****************************displayVideo-------------_player started*");
}
catch(MediaException pe)
{
System.out.println("--------displayVideo-----MediaException="+pe.getMessage());
}
}

protected void sublayout(int width, int height)
{
System.out.println("----************************----sublayout");
//setVideoSize(Display.getWidth(), Display.getHeight());

super.sublayout(width, height);
}


public boolean onClose()
{
System.out.println("----************************----onClose");
_player.close();
System.out.println("onClose");
return super.onClose();
}
}

 

 

plzzzzzzzzzzzzz help me...

thanks in advance.......

 

Please use plain text.
Contributor
devendra
Posts: 14
Registered: ‎11-09-2011
My Device: 8830 4.5 o.s

Re: 9630 Simulator NOT working with MDS Simulator !

hii to all............

plz somebody giove me the answer of my post...

my rtsp video is not playing in 8830...

my device is hanged when i try to run on device........

its very important for me to run this code..

plz any one help me for my post..

i am very thankful to u....

 

 

 

any help is appriciated...

regards devendra

Please use plain text.