BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 04-30-2008, 04:08 AM   #1
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default MDS Simulator?

Please Login to Remove!

Hi every body,

I am running BlackBerry JDE 4.3. Please tell me how can I start the MDS simulator.

Thanks
Kind regards
Offline  
Old 04-30-2008, 04:12 AM   #2
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

With your JDE you donwload the MDS.

So to start it go to "Start => All the Program => Research In Motion => BlackBerry JDE 4.3 " and just click on MDS.
Offline  
Old 04-30-2008, 04:16 AM   #3
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

since jde 4.0.2 it is in a separate package: "BlackBerry Email and MDS Services Simulators 4.1.4"

Get it from BlackBerry - BlackBerry | Wireless Handheld Devices, Software & Services from Research In Motion (RIM)
Offline  
Old 04-30-2008, 04:22 AM   #4
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

No.

If you download the JDE 4.3 , MDS is include.

BUt you can download just MDS from the BlackBerry site
Offline  
Old 04-30-2008, 04:24 AM   #5
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

sorry, never used 4.3... but good to know.
Offline  
Old 04-30-2008, 04:40 AM   #6
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

;)

But I download JDE 4.0 and 4.1 and I have the MDS with too.

Maybe it's because I took the full package.
Offline  
Old 04-30-2008, 04:50 AM   #7
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default Message on MDS Simulator

Thank you very much for help. I am trying to fetch the webpage contents. I got the following message in MDS simulator screen

CEST>:[44]:<MDS-CS_MDS>:<DEBUG>:<LAYER=SCM, EVENT=Expire records from device storage that are expired or older than 0 hours; 0>

CEST>:[45]:<MDS-CS_MDS>:<DEBUG>:<LAYER=SCM, EVENT=Expire records process ended;0>

CEST>:[46]:<MDS-CS_MDS>:<DEBUG>:<LAYER=SCM, EVENT=Statistics save task started>

CEST>:[47]:<MDS-CS_MDS>:<DEBUG>:<LAYER=SCM, EVENT=Statistics save task finished-- number of rows inserted:5>

On the Blackberry JDE IDE, i got the following error,
FocusHistory: Focus lost; App Home Screen; Component net.rim.device.apps.internal.ribbon.launcher.Ribbo nIconField

Thanks in advance
Kind kind regards,
Offline  
Old 04-30-2008, 07:52 AM   #8
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default

Quote:
Originally Posted by Ivanov View Post
since jde 4.0.2 it is in a separate package: "BlackBerry Email and MDS Services Simulators 4.1.4"

Get it from BlackBerry - BlackBerry | Wireless Handheld Devices, Software & Services from Research In Motion (RIM)
Thanks for your reply. MSD package is available in JDE 4.3..
But when I started it. I got the following message on the MSD screen. Can you tell me please

CEST>:[44]:<MDS-CS_MDS>:<DEBUG>:<LAYER=SCM, EVENT=Expire records from device storage that are expired or older than 0 hours; 0>

CEST>:[45]:<MDS-CS_MDS>:<DEBUG>:<LAYER=SCM, EVENT=Expire records process ended;0>

CEST>:[46]:<MDS-CS_MDS>:<DEBUG>:<LAYER=SCM, EVENT=Statistics save task started>

CEST>:[47]:<MDS-CS_MDS>:<DEBUG>:<LAYER=SCM, EVENT=Statistics save task finished-- number of rows inserted:5>

On the Blackberry JDE IDE, i got the following error,
FocusHistory: Focus lost; App Home Screen; Component net.rim.device.apps.internal.ribbon.launcher.Ribbo nIconField

Thanks in advance
Kind kind regards,
Offline  
Old 04-30-2008, 08:55 AM   #9
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Hum can you show some part of your code???

I'm sure that the pb is due to your code
Offline  
Old 04-30-2008, 09:03 AM   #10
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default

Quote:
Originally Posted by goulamass View Post
Hum can you show some part of your code???

I'm sure that the pb is due to your code
Thanks goulamass, my code is as

Code:
public class ReadWebpageContentsWorker extends Thread {
   
    private ReadWebpageContentsScreen readWebpageContentsScreen;     
    public ReadWebpageContentsWorker(ReadWebpageContentsScreen readWebpageContentsScreen){
        this.readWebpageContentsScreen=readWebpageContentsScreen;
    }  
    
       public void run() {
                               
         String response;
         HttpConnection conn = null;
         InputStream in = null;
         try {
              conn = (HttpConnection) Connector.open
                              ("http://www.cinq.net/bbtest.txt");
              
              in = conn.openInputStream();
              byte[] data = new byte[200];
              int numBytes = in.read(data);
              StringBuffer responseBuffer = new StringBuffer();
              in.close();
              conn.close();
              for (int i = 0; i < numBytes; i++) {
                   responseBuffer.append((char) data[i]);
              }
              response = responseBuffer.toString();
              this.readWebpageContentsScreen.setText(response);
                      
              } catch (IOException e) {
                      System.out.println("Here is exception" + e.getMessage());
          }
      }
  }
Code:
public class ReadWebpageContents2 extends net.rim.device.api.ui.UiApplication{

public static void main(String[] args) {
    ReadWebpageContents2 theApp = new ReadWebpageContents2();
    theApp.enterEventDispatcher();
}

public ReadWebpageContents2(){   
    ReadWebpageContentsScreen readWebpageContentsScreen = new ReadWebpageContentsScreen();
    new ReadWebpageContentsWorker(readWebpageContentsScreen).start();
    new ReadWebpageContentsScreen();
    pushScreen(readWebpageContentsScreen);        
    }
}
Code:
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.i18n.*;
import net.rim.device.api.system.*;
import javax.microedition.io.*;
import java.io.*;

public class ReadWebpageContentsScreen extends MainScreen{

    private LabelField textField;
    public ReadWebpageContentsScreen(){        
        textField = new LabelField();
        add(textField);
    }

    public void setText(String text){
        textField.setText(text);
    }
}

Last edited by ahmadgee; 04-30-2008 at 09:08 AM..
Offline  
Old 04-30-2008, 09:44 AM   #11
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Hum take my code below :
Code:
/**
 * AppliA.java
 * Copyright (C) 2001-2003 Research In Motion Limited. All rights reserved.
 */
package com.rim.samples.AppliA;


import net.rim.blackberry.api.browser.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import java.io.*;
import javax.microedition.io.*;
import net.rim.device.api.io.*;
import net.rim.device.api.util.*;

/*
 * BlackBerry applications that provide a user interface
 * must extend UiApplication.
 */
public class AppliA extends UiApplication
{
        
    
        public static void main(String[] args)
        {
                //create a new instance of the application
                //and start the application on the event thread
                AppliA theApp = new AppliA();
                theApp.enterEventDispatcher();
                
                
                
        } 

        public AppliA()
        {
                //display a new screen
                pushScreen(new AppliAScreen());
        }
}

//create a new screen that extends MainScreen, which provides
//default standard behavior for BlackBerry applications
final class AppliAScreen extends MainScreen
{
        public AppliAScreen()
        {
                 
                //invoke the MainScreen constructor
                super();

                String URL = "http://www.google.com";
                DataBuffer dbuffer = new DataBuffer();

                try
                {
                    // Use a StringBuffer to piece together the URL.
                    StringBuffer sbuffer = new StringBuffer();
                    sbuffer.append(URL);

                    HttpConnection connection = (HttpConnection)Connector.open(sbuffer.toString());
                    InputStream input = connection.openInputStream();

                    // Read in the data from the InputStream
                    byte[] temp = new byte[1024];

                    for (; ; )
                    {
                        int bytesRead = input.read(temp);
                        if (bytesRead == -1)
                        {
                            break;
                        }
                        dbuffer.write(temp, 0, bytesRead);
                     }

                     input.close();
                     connection.close();
                   }
                   catch (IOException e)
                   {

                   }

                   try
                   {
                        // Create the ByteArrayOutputStream that will be used to
                        // capture the Base64 encoded data.
                        ByteArrayOutputStream output = new ByteArrayOutputStream();
                        Base64OutputStream boutput = new Base64OutputStream(output);

                        output.write("data:text/html;base64,".getBytes());
                        boutput.write(dbuffer.getArray());
                        boutput.flush();
                        boutput.close();

                        output.flush();
                        output.close();

                        // Launch the browser using the base64 encoded data above.
                        BrowserSession bSession = Browser.getDefaultSession();
                        String data = output.toString();
                        bSession.displayPage(data);
                    }
                    catch (IOException e)
                    {

                    }
        }

        //override the onClose() method to display a dialog box to the user
        //with "Goodbye!" when the application is closed
        public boolean onClose()
        {
            Dialog.alert("Au revoir!");
            System.exit(0);
            return true;
        }
}
But you can also simply launch the Browser with an URL with something like this :
Code:
 String URL = "http://www.google.fr/xhtml";
                DataBuffer dbuffer = new DataBuffer();

                   try
                   {
                        // Launch the browser using the base64 encoded data above.
                        BrowserSession bSession = Browser.getDefaultSession();
                        bSession.displayPage(URL);
                    }
                    catch (Exception e)
                    {

                    }
This do the same as above

Last edited by goulamass; 04-30-2008 at 09:48 AM..
Offline  
Old 04-30-2008, 10:19 AM   #12
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default Thanks

Thanks Goulamass for your nice cooperation,

I took the class AppliA and AppliAScreen and click on the build selected then I got the following warning

Warning!: Reference to class: net.rim.blackberry.api.browser.Browser requires signing with key: RIM Blackberry Apps API
Warning!: Reference to class: net.rim.blackberry.api.browser.BrowserSession requires signing with key: RIM Blackberry Apps API

I ignored this warning and ran this. On the Blackberry JDE simulator, when i clicked on this project icon. then it hang there and could not open this one.

Please help me because i doing effort for the last two day.

Kind kind regards,

Last edited by ahmadgee; 04-30-2008 at 10:20 AM..
Offline  
Old 04-30-2008, 10:28 AM   #13
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Hum be sure that your MDS is running before launching your program.

And after check if you have access to the web from the MDS.

I can't remember what are the port used by the MDS

For the warning it's just that you have to sign your code for deployment.
But you can use it without pb in a simulator

You pay 100$ and you can sign more than 2 000 000 000 code

Last edited by goulamass; 04-30-2008 at 10:29 AM..
Offline  
Old 04-30-2008, 10:42 AM   #14
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default Thanks

Quote:
Originally Posted by goulamass View Post
Hum be sure that your MDS is running before launching your program.

And after check if you have access to the web from the MDS.

I can't remember what are the port used by the MDS

For the warning it's just that you have to sign your code for deployment.
But you can use it without pb in a simulator

You pay 100$ and you can sign more than 2 000 000 000 code
Thanks once again for information.
I am just using the MDS package provided by the JDE 4.3.
Before launching the programme, I just clicked on MDS and it started with the messages that I posted previously.
Please can you tell me please that how can i check port of MDS. This MDS was installed autmatically when I installed JDE 4.3.
I am using simulator provided by the JDE4.3 just for testing first. Should I need to pay 100$ to access the web by the MDS installed by JDE 4.3?

Bundle of thanks,
Offline  
Old 04-30-2008, 11:12 AM   #15
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

No, you just have to pay when you want to use it on a real terminal.

For the problem of your MDS search wath are the port use by it and check your firewall settings if the ports are open.
Offline  
Old 05-02-2008, 02:15 AM   #16
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

I think : try to launch the browser of your simulator and navigate.

If it's works check the application permission to allow the program to access the browser application.
Offline  
Old 05-02-2008, 02:44 AM   #17
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default

Quote:
Originally Posted by goulamass View Post
I think : try to launch the browser of your simulator and navigate.

If it's works check the application permission to allow the program to access the browser application.
Quote:
Originally Posted by goulamass View Post
No, you just have to pay when you want to use it on a real terminal.

For the problem of your MDS search wath are the port use by it and check your firewall settings if the ports are open.
Thank you very much for your help.

I have check the port of MDS package and it is not blocked.

Can you tell me please that How can I launch the browser of simulator?


Thanks
Kind kind regards
Offline  
Old 05-02-2008, 04:54 AM   #18
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Just go on the application menu and click on the Browser.

The icon is a planet.

Try to navigate on the web. For example try to access google.com
Offline  
Old 05-02-2008, 05:23 AM   #19
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Lightbulb Thanks for indication of problem

Quote:
Originally Posted by goulamass View Post
Just go on the application menu and click on the Browser.

The icon is a planet.

Try to navigate on the web. For example try to access google.com
Thanks again for the indication of the error. I wrote the goole.com and got the following message

"The radio on the device is currently turned off or the battery too low for the radio to be used. As a result the browser can not retrieve any webpages.
Please turn the radio on or recharge the battery and try again.
Contact your service provider if this problem persisits."

Please tell me how can the radio on.

Thanks
lovely regards
Offline  
Old 05-02-2008, 06:23 AM   #20
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default unable to connect the selected Moble data service

Quote:
Originally Posted by ahmadgee View Post
Thanks again for the indication of the error. I wrote the goole.com and got the following message

"The radio on the device is currently turned off or the battery too low for the radio to be used. As a result the browser can not retrieve any webpages.
Please turn the radio on or recharge the battery and try again.
Contact your service provider if this problem persisits."

Please tell me how can the radio on.

Thanks
lovely regards
I have selected the mobile network option on after going into the Manage Connection properties.

After this one when I tried to browse the google.com then it displayed the follwing message
"unable to connect the selected Mobile Data Service, please try again later.If problem persists, please contact your administrator."
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Unifi Talk UVP Touch VOIP IP Phone Unlocked picture

Unifi Talk UVP Touch VOIP IP Phone Unlocked

$139.99



Vtech ErisTerminal VSP861 Touchscreen Color Desktop - Voice-Over-IP VOIP Phone picture

Vtech ErisTerminal VSP861 Touchscreen Color Desktop - Voice-Over-IP VOIP Phone

$14.99



"NEW" RingCentral Polycom VVX 311 6-Line VoIP IP SIP Business Media Phone

$12.95



Cisco CP-8811-K9 Unified Office IP VoIP PoE Business Phone w/ Stand & Handset picture

Cisco CP-8811-K9 Unified Office IP VoIP PoE Business Phone w/ Stand & Handset

$14.99



Polycom Vvx 601 VoIP 16 Line Business Phone 4.3

Polycom Vvx 601 VoIP 16 Line Business Phone 4.3" HD Touchscreen PoE With Stand

$28.95



Allworx Verge 9312 Voip IP Color Display Phone 8113120 Gigabit & Backlit picture

Allworx Verge 9312 Voip IP Color Display Phone 8113120 Gigabit & Backlit

$199.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.