cannot reduce the application on end key click on the http connection.

Hi all

I use version eclipse3.4 for Blackberry development. In my application, I need to extract data from a Web service via a servlet created by me. I've implemented it using a wire and it works fine.

But the problem is, after the http connection, when control passes to servlet I can't minimize my application using events end key as a normal application. This fine event key only works when the control back on the side of the unit... My entire application got stuck when he tries to retrieve the data from webservice... Please help me on this.

Please guide me how to implement the reduction feature in my application when it attempts to retrieve data from the server using the http connection.

I used this package for connecting

 

javax.microedition.io.Connector; javax.microedition.io.HttpConnection;

Please help me on this...

Advanced thanks and greetings,

Michel Philippe.

You will need to run the web service code in a separate thread...

Tags: BlackBerry Developers

Similar Questions

  • Cannot reduce the size of photos for emailing - no email partner program

    I click on the photo folder, click send to, click on the message, reduce the size, fix and POP UP APPEARS says there is no e-mail program associate, if please install or go to the default program and create an association.  I can send an original email size 4 MB, but can not send too much of. I have Windows 7. What should I do. ?

    Moved from feedback

    Original title: cannot reduce the size of photos for emailing.

    Hello

    Windows 7 came with a pre-installed email program.

    If you have installed one?
    Windows Live Mail is popular
    http://explore.live.com/Windows-Live-Essentials?OS=other
    Is Thunderbird http://www.mozilla.org/en-US/thunderbird/

    After installing an e-mail program, make sure you have a default e-mail together program control panel > Default programs > set access and computer program defaults > Custom > click the caret down.

    The default e-mail program must be installed on the computer - e.g.Outlook Express, Windows Mail (Vista), Windows Live Mail, Thunderbird, etc.

    Web-based e-mail services cannot be made except by default e-mail program:
    * Yahoo, with the Yahoo tool bar
    http://help.Yahoo.com/l/us/Yahoo/mail/YAHOOMAIL/settings/settings-10.html
    * Gmail with gmail warning system installed
    http://mail.Google.com/support/bin/answer.py?answer=10966

    Hope this helps,
    Don

  • Cannot start the network connection: invalid access to memory location

    Hi team,

    Windows 2003 SP2 cannot start the network connection. Error connections network service terminated with the following error: invalid access to memory location.  Can you help me on this issue?

    Thank you

    Sangaré

    Hello

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Windows Server 2003 Forum. You can follow the link to your question:

    http://social.technet.Microsoft.com/forums/en-us/winserverPN/threads

  • How to get the gif file hosted by using the Http connection?

    Hello

    I have an application that downloads animation gif from a server by using the http connection. Here is the code I use to download the image.

    try {
    
                httpConnection = (HttpConnection) Connector.open(url, Connector.READ_WRITE);            httpConnection.setRequestMethod(HttpConnection.GET);
    
                if (httpConnection.getResponseCode() == HttpConnection.HTTP_OK) {                DataInputStream dS = httpConnection.openDataInputStream();
    
                    byte[] data = new byte[dS.available()];                dS.read(data);
    
                    gifImage = (GIFEncodedImage) EncodedImage.createEncodedImage(data, 0,data.length);
    
                } else {                throw new Exception("ResponseCode:" + httpConnection.getResponseCode());            }        } catch (Exception e) {                        gifImage = null;            e.printStackTrace();        }
    

    the problem with this code is, when the gif file is 1175 bytes above, it does not load the gif.

    example:-If the gif on the server is 1500 bytes, this code retrieves only 1175 bytes.

    I think that the rest of the bytes are sent in a different package. But how to get them.

    can someone please provide a code for buffering the inputstream?

    any help is appreciated.

    Dieye

    Hmm, nobody seems to know how to do, it seems. Here's how I did it.

                httpConnection = (HttpConnection) Connector.open(url, Connector.READ_WRITE);
                httpConnection.setRequestMethod(HttpConnection.GET);
    
                int responseCode = httpConnection.getResponseCode();
                if (responseCode == HttpConnection.HTTP_OK) {
                    inputStream = httpConnection.openInputStream();
                    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    
                    byte[] buffer = new byte[256];
                    int len = 0, imageSize = 0;
    
                    while (-1 != (len = inputStream.read(buffer))) {
                        byteArrayOutputStream.write(buffer);
                        imageSize += len;
                    }
    
                    byteArrayOutputStream.flush();
                    byte[] imageData = byteArrayOutputStream.toByteArray();
                    byteArrayOutputStream.close();
    
                    gifImage = (GIFEncodedImage) EncodedImage.createEncodedImage(imageData, 0, imageSize);
    
  • Problem in the http connection. (simulators 5.0 os blackberry 9000 smartphone)

    Hello friends,

    I am doing my project in Eclipse Platform Version: 3.4.1 4.5 os and I'm using the 8300 Simulator. I use the http connection. When I debug my project, I work correctly. I'm download 8300 same Simulator to test the object. It worked correctly in Simulator 8300.

    but when I try 4.7 and 5.0 for Simulator that I download this Simulator my project does not work correctly the problem of http connection. Someone tell where I'm wrong?

    Thank you

    Ajay.

    also to install BlackBerry JDE 5.0.

  • Cannot reduce the width of the window of Bluetooth File Exchange

    The width of the window of the Bluetooth File Exchange application can not narrowed, has increased. How can I reduce the width of the window or reset default window width?

    I use the Bluetooth File Exchange to browse files on a device (in my case, a Windows laptop). The application works normally, but I can't reduce the width of the window. The resizing handles only the increase in bandwidth. The height can be increased or decreased as you would expect.

    This image shows the width handles can only increase the width. Now, after playing with resizing, the window is wider than my iMac 27 "screen. I see no way to reduce the width of the window. Any help would be greatly appreciated.

    Wow, good question...

  • Cannot reduce the size of previews.lrdata

    Hi all

    My Previews.lrdata folder is 45 GB. On a 500 GB SSD (end 2013 15 "MacBook Pro retina), it is a reasonable piece.

    So I went through and used the menu option "ignore surveys 1:1..." in all the pictures that I do not expect to change again. Somewhat to my surprise, the Previews.lrdata folder did not file size of 1 byte. I used the option "optimize catalog", but that doesn't seem to do anything either.

    I prefer not to empty the cache of the preview while suppressing the Previews.lrdata, regarding the last pictures I've not edited and yet I enjoyed having to previews pre-rendered 1:1.

    I don't expect too much here? Should not be a relationship between throw me 1:1 previews and a reduction in the size of the Previews.lrdata folder?

    Thank you


    Nick

    ntompson wrote:

    So if I reduce the size of the standard preview for the screen resolution below, then Lightroom uses only brief (down-scales) 1:1...

    That is right.

    ntompson wrote:

    What are the downsides to this?

    No - your standard previews have been set too high before.

    ntompson wrote:

    Why have a standard preview at all?

    For reasons of performance - faster to enter/resize some smaller if he wants to.

    ntompson wrote:

    Would I better off put the standard preview to the smallest possible size?

    Lol if you do this, then Lr re - will make a brief 1:1 for fit view, even if a standard preview was already available (because it would be too small). Certainly, if the 1:1 Preview is already available, it wouldn't need the re - make, but if you are when they expire, it may not be available, and despite this, it takes more time to load/resize a larger and a smaller preview.

    ntompson wrote:

    When I do the standard preview size change in Lightroom, then does invalidate all standard previews in my catalog? Does crank through and to regenerate all the standard previews to the new size?

    No and no (but in my opinion, the user should be prompted to see if he/she would like to rebuild so size or quality changes).

    In many cases, the difference over having a frame is too small or too large a framework, will be almost (or totally) without consequence. To be honest, I'm surprised that adobe exposed this option to the user, since most users have any idea what optimum setting should be. If I were Adobe, I suppose that Lr/hand-UI would be on the bigger screen and automatically size previews accordingly. Often when I mention this, people point out that the same catalog can also be used on a laptop, review how would be more optimal, and there are other considerations double monitor.., but hey - whatever...

    PS - Lightroom creates different preview (up to) 7 sizes: from 1:1 to little thumb. When he creates a large preview (1:1 or standard), he created all the smaller previews also, in halfening size. It is very fast, and no doubt explains the reason why it will not throw a 1:1 if next (standard) would be more than half it's size (it's actually only create 6 previews in this case: 1:1 through thumb, there is no big standard preview size you specified in this case) (, or if you prefer another way of seeing things: the preview of 1:1 is your largest standard preview).

    If you want to better understand what is stored for previews, you can play with the PreviewExporter plugin I wrote (free) - it allows you to specify at what level (1-7) to preview you want to export, and if you enable verbose logging will provide info on what was available, and what level of preview has been exported. Here is an excerpt of "post-process action" (export filter) UI:

    See you soon,.

    Rob

  • Cannot reduce the size of the VMDK file

    OK, here's my story:

    I started with the growable virtual 40 GB HD default mapped as C:\ on my virtual machine. The HD received complete and had poor performance and I converted it to a prealloue 100 GB HD. It worked OK for a while, but then I created a new virtual HD mapped as D:\ to store data.

    So my problem was C:\ was too big which made backup of the virtual machine of your time, and I thought I have to resize C:\ 30 GB. My first test was to convert it to a HD growable. This remains a 100 GB on the host vmdk file.

    Then, I used the two compacts from the GUI and stop at the command prompt on the convert HD Nope, still 100 GB vmdk file on the host.

    Then I used a disk management program to reduce the size of the c:\ partition with 30 GB and run both shrink and compact again. Guess what, the vmdk file is always 100 GB.

    I'm running out of ideas on what to do to reduce the size of the vmdk file. Any ideas?

    Yes, I did, but I used compact from the GUI and stop at the command line (vmware - vmdiskmanager.exe). At that time I didn't there's a shrink option in VMWare tools.

    In this case try to diminish with the extra partition (temporary).

    Which converter you were referring to in your previous post?

    VMware Converter Standalone 4.3

    André

  • Cap 7: Cannot reduce the size of the caption text in the very small

    Hello

    Cape 7.0.1.237.

    I can't reduce the caption text to make them very small. for example to include just the word "cell".

    The smallest, I can do it is the 152 H 62.

    When I try to reduce it more small that a red line appears on the top and sides of the legend of text on the slide.

    Updated text style legend - Arial 14 regular points. Left and top alignment.

    'Constraint properties' are NOT selected. The spacing is '1', the margins are all "0".

    Donal.

    One of the many limitations of these old text legends, there is a minimum size, as far as I KNOW.

    Another reason why I chose mainly to use shapes and text containers. Is not an option for you? They can be reduced to much smaller sizes.

    Lilybiri

  • cannot complete the new connection Wizard message a connection with the specified name already exists please provide a unique connection name arrives and prevents the connection how can I solve this problem

    Cannot complete the connection to the internet, message name specified already exists, provide a continuous appear unique login name

    Hello

     
    • What operating system is installed on the computer?
    • Have you tried with another name?
    Go to network and sharing settings and check the name of the previously defined network.
     
    Try the following steps to do the same thing:
    a. right click on the Network icon located on the bar spots.
    b. click on open network and sharing Center.
    c. under view your information network base and installation connections check information (network name).
    d. try another name in order to set up a network.
     
    Reference:
     
     
    I hope this helps!
     
  • Workstation 7.0.1 cannot create the bridged connection.

    I have trouble getting VMnet0 network map to be on deck.

    While the 'Publisher virtual network' entry in the dialog box the VMnet0 is listed with a "Custom" Type and has the 'Host-only' selected option button.

    Selection of the "VMnet0" adapter and then by clicking on the option button "Bridged" immediately translates into an error with the text dialog box:

    ' Cannot change the full network: there is no host not bridged network adapters. »

    After clicking 'OK' the error dialog is disabled and the 'Host-only' option button is automatically selected.

    Some install information, VMWare Workstation 7.0.1 installed on a quad core AMD Opteron with a single network adapter running MS Windows Server 2003 Enterprise Edition Service Pack 2

    I found the following threads with similar problems

    http://communities.VMware.com/thread/244109

    http://communities.VMware.com/message/1405636

    Unfortunately solutions in these discussions do not seem to work in my situation.

    By clicking the "Restore Default" button in the dialog box "Virtual Network Editor" recreates the VMWare network adapters but does not solve the issue of 'no host not bridged network adapters'.

    I can't change the "automatic settings" and turn off the "automatic gateways" because the button is disabled.

    I've attached a screen of the "Virtual Network Editor" dialog box Cap

    Any ideas?

    Thank you

    help the docs about this?

    nothing VMware - but you can look at my site - see http://sanbarrow.com/network/cmdguide2workstation.html

    What I would do then is to uninstall the vmnetbridge and reinstall it.

    To do this log as Administrator - open a cmd as administrator

    CD for the installation of workstation directory

    type

    vnetlib.exe -- uninstall bridge
    

    reset

    Log in as an administrator and change the cd in the Directory Setup again

    type

    vnetlib.exe -- install bridge
    

    all by running the command thios - do not have any other open - Windows Setup can popup a question that can be hidden if not

    can't see your original post while responding to...

    If you have a 32-bit host - use vnetlib.exe

    If you have a 64-bit host - use the 64 bit version of the tool itself

    Ulli

    ___________________________________

    VMX-settings- Workstation FAQ -[MOA-liveCD | http://sanbarrow.com/moa241.html]- VM-infirmary

  • Satellite L50-B-2CP - cannot set the wireless connection

    Hello

    I have an out of the box of Toshiba Satellite L50-B-2CP portable wihtout os because I had a free w7 license and the wireless connection is turned off. I downloaded the broadcom drivers both atheros from the toshiba site, but also the intel wireless lan driver but nothing works when I go into Control Panel, wireless network card is not visible, I don't see Bluetooth.

    Any ideas?

    The Device Manager has no intel listed lan card wi...

    Are you sure?!
    Have you checked it properly?
    LAN and WiFi should appear in the Device Manager in the network adapters box.
    Please check this!

  • ConnectionFactory cannot create the WiFi connection

    I tried this code example, and it returns null ConnectionDescriptor when I only have the wifi connection:

    cf = new ConnectionFactory();
    cf.setPreferredTransportTypes(new int[]{
        TransportInfo.TRANSPORT_TCP_WIFI,
        TransportInfo.TRANSPORT_TCP_CELLULAR,
        TransportInfo.TRANSPORT_WAP,
        TransportInfo.TRANSPORT_WAP2,
        TransportInfo.TRANSPORT_MDS,
        TransportInfo.TRANSPORT_BIS_B
    });
    cf.setAttemptsLimit(2);
    cf.setConnectionTimeout(10000);
    ConnectionDescriptor descr = cf.getConnection("http://www.google.com");
    StringBuffer buff = new StringBuffer();
    if(descr == null){
        buff.append("no descriptor");
    }else{
        buff.append(descr.getTransportDescriptor().getTransportType() + ";" + descr.getUrl());
        try {
        descr.getConnection().close();
        } catch (Exception e) {
            System.out.println("===>conn close error:" + e.getMessage() + ";" + e.getClass().getName());
        }
    }
    

    I tested with the mobile network and it works well and returns the connection descriptor non-zero but when I try with the wifi only and always returns null.

    I tried to access Google.com on the bb browser and it opens.

    However, the connection is slow and it loads for a while before opening google. Is this the reason why I get null handle or its something else?

    Well I solved it.

    It turned out that I had activated the VPN profile to the wifi network. When I disable the code works ok.

    But this raises the question why can't make a connection http via wifi with active VPN profile. I can always open google.com in the browser.

    I'll make a new thread for this question.

  • GetResponseCode of the HTTP connection failed? :(

    Hey all,.

    I am fairly new to the development of BB.  I'm trying to get my application to connect to the web and pull down some data.  I think I'm close, but after using the debugger and stepping through my code, I noticed it stops at the ' rc = c.getResponseCode (); "subscribed line.  (Stops, I mean it running... it doesn't give any errors, but he never stepped on the next line... everythign is right there...)

    What Miss me?

    System.out.println(">>> in new threads run");
                    try {
                        HttpConnection c = null;
                        InputStream is = null;
                        int rc;
    
                        try {
                            System.out.println(">>> in new threads try");
                            c = (HttpConnection)Connector.open("http://www.google.ca");
                            System.out.println(">>> c : "+c);
                            // Getting the response code will open the connection,
                            // send the request, and read the HTTP response headers.
                            // The headers are stored until requested.
                            rc = c.getResponseCode();
                            System.out.println(">>> rc : "+rc);
                            //testing(rc);
                            //String ryan = Integer.toString(rc);
                            //Bitmap icon = Bitmap.getBitmapResource("img/download.png");
                            //statusDlg = new Dialog(ryan,null,null,0,icon);
                            //statusDlg.show();
                            if (rc != HttpConnection.HTTP_OK) {
                                throw new IOException("HTTP response code: " + rc);
                            }
    
                            is = c.openInputStream();
                            System.out.println(">>> is : "+is);
    
                            // Get the ContentType
                            String type = c.getType();
                            System.out.println(">>> type : "+type);
    
                            // Get the length and process the data
                            int len = (int)c.getLength();
                            System.out.println(">>> len : "+len);
                            if (len > 0) {
                                int actual = 0;
                                int bytesread = 0 ;
                                byte[] data = new byte[len];
                                while ((bytesread != len) && (actual != -1)) {
                                    actual = is.read(data, bytesread, len - bytesread);
                                    bytesread += actual;
                                }
                            } else {
                                int ch;
                                while ((ch = is.read()) != -1) {
    
                                }
                            }
                        } catch (ClassCastException e) {
                            System.out.println(">>> WTF : "+e);
                            throw new IllegalArgumentException("Not an HTTP URL");
                        } finally {
                            System.out.println(">>> WTF2");
                            if (is != null)
                                is.close();
                            if (c != null)
                                c.close();
                        }
                    } catch (IOException e) {
                    } catch (Exception e)
                    {
                        e.printStackTrace();
                    }
    

    He may be waiting the connection end. Network connection attempts take awhile to timeout - the order of minutes. If you are debugging in the Simulator, you shot above the MDS Simulator? If a device is connected?

    You can also take a look at the CoverageInfo class as a way to check the availability of connection before you actually start a connection.

  • How to check if the device is configured for the HTTP connection data plan?

    Is it possible to check if the device has data during http connection (regular data plan just not bes or bis)?

    I don't want my app to make connections if it leads to an additional burden for the user by the carrier.

    lol but you can provide it as an option to the user, he should know.

Maybe you are looking for

  • Cannot restore backup iOS 10 iCloud

    Hi, I have updated my iPhone to iOS 10 6 yesterday making a new installation (with IPSW restore via iTunes) then I could restore from my last backup (I backup with iTunes). After the update, while completing the initial installation of the phone, I c

  • want to transfer only a single photo from computer to iPhone rather than a whole album

    Hi, I am new user of iPhone and so confused about data transfer it seems so complicated. I want to transfer photos selected for PC to the iPhone, but it shows an entire album to be transferred. Can someone help me please. On the other Note: I also wa

  • T420s BIOS update failed. Black screen

    Hi all I tried updating the BIOS with the tool provided by lenovo Web site. He failed, and at the next reboot, my laptop remains in a black screen. I tried the tool wincrisis without success. Maybe I am doing something wrong because others say use fn

  • How to run Lotus 16-bit on 32 bit XP Professional spreadsheets

    Lotus spreadsheets worked fine on XP Pro until I reinstalled XP Pro in a recovery facility.  Now, I get an error message that is not a 32-bit file.

  • How to change

    Hello Please, I have a presario cq57-426sa with a processor AMD-300. I think to upgrade, but don't know if the processor is removable from the boaed, or if there is no other way to go about it. Thank you