Code works in the emulator, but not on the device?

I am attemping to connect to the Google Talk XMPP using JXA libraries. If I try to connect with this code on the emulator, everything connects and I can connect fine and send messages. When I try this on the physical device, nothing happens. Someone has an idea?  I try an SSL connection as follows

final SecureConnection sc = (SecureConnection)Connector.open("ssl://" + this.server + ":" + this.port, Connector.READ_WRITE);

Understand the problem. I had to add

deviceside=false

At the end of the SSL connection to force the physical device to connect through MDS. Here is the final code

final SecureConnection sc = (SecureConnection)Connector.open("ssl://" + this.server + ":" + this.port + ";deviceside=false", Connector.READ_WRITE);

See http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is... to explain why it was necessary. Thanks to MSohm for the answer of thread on http://supportforums.blackberry.com/t5/Java-Development/Https-doesnot-work-on-real-device/td-p/44465...

Tags: BlackBerry Developers

Similar Questions

  • Code works on an image, but not the other

    I have 2 images in my film, 2 buttons and a video.  On the first image, there is code button #1.  On the second picture, I code button #2, but I also want to appear on the first image. The problem is that when I put the code for the second button on the first image, the video will not play.  If I can have it only on the second image.  I can't understand why the code that works when its framework on 2, then will not work on frame 1.  When I put the code on frame 1, it breaks the functionality and the video will not play.

    This is the code on frame 1, button #1 (btn_skip):

    Stop();

    btn_skip.addEventListener (MouseEvent.CLICK, fl_ClickToGoToWebPage_2);

    function fl_ClickToGoToWebPage_2(event:MouseEvent):void

    {

    navigateToURL (new URLRequest ("http://www.brokerschoice.com/Black_Vault/innervault.html"), '_self');

    }

    Import fl.video.MetadataEvent;

    mymovie.addEventListener (MetadataEvent.CUE_POINT, fl_CuePointHandler_2);

    function fl_CuePointHandler_2(event:MetadataEvent):void

    nextFrame();

    This is the code on frame 2, for the key #2 (btn_skip): this code works if I put it on the frame 2, but breaks the video if I put it on frame 1. I need to have this code on frame 1 as well.

    btn_homePage.addEventListener (MouseEvent.CLICK, fl_ClickToGoToWebPage_3);

    function fl_ClickToGoToWebPage_3(event:MouseEvent):void

    {

    navigateToURL (new URLRequest ("http://www.brokerschoice.com"), '_blank');

    }

    Thank you

    If it were true you wouldn't have a double function error.  Alternatively, the error is not related to what I proposed.

    in any case, fix it if you don't have two names of the same functions.

  • Why my AS3 code working in 1 project, but not in another?

    I had a small project by working with simple buttons that worked very well. I had to restore my project and now it does not work. Ive cut all new code that I added and it did not work. I made a completely new project and copied the layers I'm testing and just the code that had the first working draft and it did not work either. any suggestions on why this might happen?

    This can be a bit of a twist when it comes to understand because this is what I consider an anomaly of the Flash.  If you have different instances of the same object in the adjacent images, then the object the latter will inherit properties of the thing seized.  Sometimes it works to your advantage and sometimes it will leave scratching you your head trying to solve a problem.

    You have shown just in case, you have an object in the frame of 30 and I guess it is the same object that is in frame 1.  Based on what I just explained as an anomaly, even if you were to remove the name of the instance of the object in the frame of 30, or call it something else, it will persist with the name of the instance assigned to it in box 1.  Try it and see - it should always work.

    However, if you interrupt (that ness adjacent) regarding placing a keyframe empty between frame 1 and 30, you will find that the button no longer works in the frame of 30.  He is most associated with the earlier proceedings.  To get back to work, you reassign Auditors properties.

  • OfficeJet 6600. Works as a printer, but not able to start the scanner.

    OfficeJet 6600. Works as a printer, but not able to start the scanner.

    I am facing a strange behaviour of my camera. I tried to find similar problems on the forum, but did not succeed.

    I started it 2 days (near my 5610 old which seems to have problems of aging). I use a Sony VAIO PC, OS Win7-Pro, updated.

    Running the appliance following the instructions of the poster. Presents the installation CD. Wireless net was successful and the screen of the device is to give the corresponding IP address.

    But this IP has realized the configuration SW is not recognized. I tried thousands of times, switching and on different devices (router, printer and pc) in the order required, uninstall and reinstall the device.

    However, despite the property intellectual not recognized the device functioning as a "printer".

    But I need to use it as a scanner.

    Procedure by selecting the "scan to PC" screen of the device (only available as an option) I get the message "to ensure that the feature is turned on" and I am prompted to 'open the printer HP SW,... '. ».

    Go to Windows and by clicking on "HP SCAN" in the HP/HP Officejet 6600 directory I get the a warning window stating "HP Officejet unidentified 6600.

    Can someone, please?

    Thank you in advance.

    Hey,.

    Try this document! A "no computer has detected" or "Connection error" message when scanning for HP Officejet 6600 e-all-in-one and 6700 Premium e-All-in-One Printer Series (H711)

    Have a great day!

  • Stand By worked in XP Home, but not XP Pro SP3 on the same machine

    Stand By worked in XP Home, but not XP Pro SP3 on the same machine.
    How can I get Stand By under XP Pro SP3?

    * title Moose - see http://stlcc.org/SYS/Standby.bmp for the issue.*

    Hi srfpala,

    I suggest that you manually download and install the latest drivers for the graphics card graphics card or computer manufacturer's website and check if it helps.

    How to manage devices in Windows XP

    http://support.Microsoft.com/kb/283658

    If fails it above step can refer to the article below and try the steps mentioned, check if it helps.

    How to solve the problems of hibernation and standby in Windows XP

    http://support.Microsoft.com/kb/907477

  • I installed the police of San Francisco system. his work in other applications, but not adobe, Ps and Pr

    I installed the police of San Francisco system. his work in other applications, but not adobe, Ps and Pr
    What... do not know any solution.

    Hello

    Please try to post your query in communities:

    General discussion of Photoshop

    Illustrator

    Premiere Pro

    Kind regards

    Sheena

  • Why the HDR toning work with some pictures, but not for others?  I have CS6.

    I have Photoshop CS6 and when I go to HDR toning, it is only highlighted for work with some photos, but not others, why?  Thank you.

    HDR toning does not work with CMYK images. Change the RGB color mode, and then you will be able to use HDR toning. It also works with the color to grayscale mode.

  • Execution of a procedure - work on Isql Plus but not SQL Developer?

    Hi people.

    I'm playing with some stuff and design the structure, mostly just passing values autour procedures. I have a (procedure1) procedure which takes a sysdate and then switches to another (procedure2) procedure that accepts the parameter and done a dbms_output.put_line.

    The two objects are valid and compile correctly. I use

    exec procedure1;

    with iSql more and it works perfectly. It prints the output and any dates.

    However if I use exactly the same command in SQL Developer it gives me the error "ORA-00900: invalid SQL statement.

    I do not understand why this is happening? The code runs perfectly in one but not the other...

    Remember that SQL * most orders do not work in the spreadsheet. So, that would be

    exec my_proc
    

    In the worksheet, you must declare an anonymous block...

    begin
        my_proc;
    end;
    /
    

    If you right-click on the procedure in the browser and select run, then SQL * Dev will throw up a harness for you. Very convenient if you want to get DBMS_OUTPUT, variables defined, etc..

    Cheers, APC

    http://radiofreetooting.blogspot.com

  • I changed my apple ID password. I restarted my computer and my iphone. My new password works with my laptop, but not my iphone.

    I changed my apple ID password. I restarted my laptop and my iphone. My new password works on my laptop but not on my iphone, I can't update my applications.

    iowaoma wrote:

    I changed my apple ID password. I restarted my laptop and my iphone. My new password works on my laptop but not on my iphone, I can't update my applications.

    Apps are tied to apple id and password that was used to download/purchase it.

    Try your old password and see if you can update or not.

  • Make HttpConnection work on the device

    Hello

    I have a java program that uses a HttpConnection (in the main thread). It works quite well on the Simulator, but when I run it on my device (8310 Curve), she just do nothing! Even after asking to allow the application to make http connections.

    I hear some APN settings to configure on the device. I did it too ("airtelgprs.com" with name of user and password blank for Airtel, India).

    Is there something else that does not leave my request to make http connections? Can someone please tell me what all I should do tomake my http connections work on the device?

    Thank you

    -Arun

    This means that you can perform a blocking i/o operation, as an HTTP connection, thread in your event management program. You must create a worker thread to manage the operations of HTTP connection.

  • I am trying to send my photos from my phone to my computer, but not properly installed device driver appears.

    I am trying to send my photos from my phone to my computer, but not properly installed device driver appears.  My question is what should I do to upload my pictures?

    Hello

    What brand / model of the phone?

    You try to connect the phone to the computer wired or wireless?

    Try the methods provided and see if it helps.

    Method 1:
    Check out the link and follow the steps.

    Connect to Bluetooth and other wireless or network devices
    http://Windows.Microsoft.com/en-us/Windows7/connect-to-Bluetooth-and-other-wireless-or-network-devices

    Method 2:
    Check out the link and follow the steps to install the drivers for the device.

    Update drivers: recommended links
    http://Windows.Microsoft.com/en-us/Windows7/update-drivers-recommended-links

    You can also check this link for more information.
     
    Method 3:
    You can also visit this link and follow the steps.
     
    What to do when a device is not installed correctly
     
  • What happens if I want to just pictures of my phone stored in icloud, but not my other devices?

    What happens if I want to just pictures of my phone stored in icloud, but not my other devices?

    Hello Lisa,.

    You can get more help if you posted in the forum to iCloud.

  • Adobe Premiere Elements doesn't recognize my camcorder - Canon GL-2.  Can I make it work?  The device worked very well with my old computer (just died) and an older version of Premiere Pro. Any suggestions?

    Adobe Premiere Elements doesn't recognize my camcorder - Canon GL-2.  Can I make it work?  The device worked very well with my old computer (just died) and an older version of Premiere Pro. Any suggestions?

    Version 13 capture is more than one camera to tape

    http://helpx.Adobe.com/premiere-elements/KB/removed-features-formats-elements.html

  • Suddenly, my sound card does not work - try the devices and add/install the old hardware on the Assistant Manager, he finds ADSInstant HTV PC1, but sending the message... Impossible to install correctly the code 10

    tried the Device Manager and add/install the old hardware on the wizard... he finds ADSInstant HTV PC1, but sending the message... Impossible to install correctly the code 10

    Restore the system to then it was working properly.

  • Code works in the timeline panel, but not in the class

    Hello, I have the following code which works in the timeline, but if I change it to the class I get this error.

    I will be very happy if someone can help me solve this problem.

    Error here:

    TypeError: Error #2007: Parameter child must be non-null.
              at flash.display::DisplayObjectContainer/addChild()
              at Function/Main/private:completeMenuLoad/goContent()
    

    Code scenario here:

    import flash.display.*;
    import com.greensock.*;
    import com.greensock.easing.*;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    
    
    var signUpUrl:URLRequest = new URLRequest("../swf/signUp.swf");
    var logInUrl:URLRequest = new URLRequest("../swf/logIn.swf");
    
    
    var content1Loader:Loader = new Loader();
    var content2Loader:Loader = new Loader();
    
    
    content1Loader.load(signUpUrl);
    content2Loader.load(logInUrl);
    
    
    var buttonA:Array = [signUp_btn, logIn_btn];
    
    var prevOnStageLoader:Loader;
    
    for(var i:int=0;i<buttonA.length;i++){
    buttonA[i].addEventListener(MouseEvent.CLICK, goContent);
    }
    function goContent(e:MouseEvent):void
    {
    if(prevOnStageLoader){
    TweenLite.to(prevOnStageLoader,1,{x:stage.stageWidth});
    }
    prevOnStageLoader=Loader(this["content"+(1+buttonA.indexOf(e.currentTarget))+"Loader"]);
          addChild(prevOnStageLoader);
          prevOnStageLoader.x = -1250;
          TweenLite.to(prevOnStageLoader, 1, {x:0, ease:Elastic.easeInOut});
    }
    

    Code of the class here:

    package 
    {
    
    
              import flash.display.*;
              import flash.net.*;
              import flash.events.*;
              import com.greensock.*;
              import com.greensock.easing.*;
    
    
    
              public class Main2 extends MovieClip
              {
                        private var signUpUrl:URLRequest = new URLRequest("../swf/signUp.swf");
                        private var logInUrl:URLRequest = new URLRequest("../swf/logIn.swf");
                        private var content1Loader:Loader = new Loader();
                        private var content2Loader:Loader = new Loader();
    
    
                        public function Main2()
                        {
                                  content1Loader.load(signUpUrl);
                                  content2Loader.load(logInUrl);
    
    
                                  var buttonA:Array = [signUp_btn,logIn_btn];
                                  var prevOnStageLoader:Loader;
    
    
                                  for (var i:int=0; i<buttonA.length; i++)
                                  {
                                            buttonA[i].addEventListener(MouseEvent.CLICK, goContent);
                                  }
                                  function goContent(e:MouseEvent):void
                                  {
                                         if (prevOnStageLoader)
                                         {
                                                   TweenLite.to(prevOnStageLoader,1,{x:stage.stageWidth});
                                         }
                                         prevOnStageLoader = Loader(this["content" + (1 + buttonA.indexOf(e.currentTarget)) + "Loader"]);
                                         addChild(prevOnStageLoader);
                                         prevOnStageLoader.x = -1250;
                                         TweenLite.to(prevOnStageLoader, 1, {x:0, ease:Elastic.easeInOut});
                                  }
                        }
                }
    }
    
    

    OK, so the problem is SOLVED. I don't know where the problem was because I solved as so much ' try & test - try & test...» ', but

    I think that the problem was a table that should look like this:

    in the Main() public class

    private var buttonA:Array = new Array();

    in constructor

    Button = [signUp, login];

    and the full code here:

    package

    {

    import flash.display. *;

    flash.net import. *;

    import flash.events. *;

    import com.greensock;

    com.greensock.easing import. *;

    SerializableAttribute public class extends MovieClip Main2

    {

    private var container: charger;

    private var content1Loader:Loader = new Loader();

    private var content2Loader:Loader = new Loader();

    private var signUpUrl:URLRequest = new URLRequest("..) ("/ swf/signUp.swf");

    private var logInUrl:URLRequest = new URLRequest("..) ("/ swf/logIn.swf");

    private var buttonA:Array = new Array();

    constructor function

    public void Main2()

    {

    content1Loader.load (signUpUrl);

    content2Loader.load (logInUrl);

    Button = [signUp, login];

    for (var i: int = 0; i

    {

    buttonA [i] .addEventListener (MouseEvent.CLICK, goContent);

    }

    }

    private void goContent(e:MouseEvent):void

    {

    If (container)

    {

    TweenLite.to (container, 0.8, {x: 1250, ease:Cubic.easeInOut});})

    }

    container Loader = (this ["happy" + (1 + buttonA.indexOf (e.currentTarget)) + "Loader"]);

    addChild (container);

    Container.x =-1250;

    TweenLite.to (container, 0.6, {x: 0, ease:Quart.easeInOut});})

    }

    }

    }

  • Code works on the new form not on the older form

    Hello

    I'm trying to modify an existing form (add the code). I tested the code in a new form, I have created on my computer but when I do the same thing on a form provided and created on another computer, the code does not work

    What I see is that the properties of the shape of a new form on my computer give Version 9. XXX and on the form that was created on another computer, the Version is listed as 8.XX

    Anyone know how I can convert Version 8. XX file Version 9.xx?

    Or does anyone know how to set up a group of EnclosedOption necessary in Version 8 as an option? "In the 9 version that I use Gender.validate.nullTest ="error"or Gender.validate.nullTest =" disabled "but it does not work on the older Version 8.xx PDF file.

    Help greatly appreciated!

    concerning

    Meir

    Reason for the difference in the behavior of the form is one static pdf where the other is dynamic pdf. The objects are drawn differently depending on how the form is saved and made.  When static red boxes will not appear when changed dynamically on the fly.  However, the feature does not work, it does not allow a shipment but is not as noticeable without the red border as to where to find the missing information.

    There was a tag http://www.xfa.org/schema/xfa-template/2.6/ LegacyEventModel:1 LegacyRendering:1? > when appropriate causes the form to behave differently.

Maybe you are looking for