problem with sending mail after sending by GET

Hello. i've got such a problem-i can send a screenshot to the server by HTTP using the POST method like this:

          Bitmap _bitmap = new Bitmap(Display.getWidth(), Display.getHeight());
            Display.screenshot(_bitmap);

            JPEGEncodedImage _jpg = JPEGEncodedImage.encode(_bitmap, 20);
            DataBuffer _db = new DataBuffer();
            _db.write(_jpg.getData());

            _http = (HttpConnection)
                        Connector.open(_url, Connector.READ_WRITE);

            _http.setRequestMethod("POST");

            _http.openOutputStream().write(_db.toArray());

and it works well. but now i need, initially, send some parameters (such as the IMEI) using GET and then this screenshot using POST (the same as in this code I do this more or less like this:)

URLEncodedPostData _u = new URLEncodedPOstData(null, false);_u.append("imei", "123456789");   

    _http = (HttpConnection)
            Connector.open(_url+_u, Connector.READ_WRITE);
     DataInputStream _dis = _http.openDataInputStream(); 

     Bitmap _bitmap = new Bitmap(Display.getWidth(), Display.getHeight());
            Display.screenshot(_bitmap);

            JPEGEncodedImage _jpg = JPEGEncodedImage.encode(_bitmap, 20);
            DataBuffer _db = new DataBuffer();
            _db.write(_jpg.getData());

                    _http.setRequestMethod("POST");

            _http.openOutputStream().write(_db.toArray());

but this gives me an IOException! but still even with IOException I log and server gets the imei that was sent using GET. I noticed that the problem is caused by this line:

_HTTP.setRequestMethod ("post");

I put it right after the connection:

_httpConnection = (HttpConnection)Connector(_url+_u, Connector.READ_WRITE);_httpConnection.setRequestMethod("POST");

now, I only get an IOException, and always the server will not get my picture. only the imei...

Why is this? Why can I not use post after get? or what I am doing wrong?

thx for any suggestion...

Kind regards!

Hi, problem solved. I have new httpConnection each time so that I could not do that. now it's ok.

Kind regards

Tags: BlackBerry Developers

Similar Questions

  • Always the problem with e-mail after trying to repair it with uninstall

    When I try to delete e-mails, it is said: msg store was damaged by an external application to windows mail. Windows mail at recovered. error 0 x 0000000.

    I delete the emails and they do not appear in my file delete so I can remove them permanently. When I opened my email each day the same messages deleted come thru with exactly the same day as before and as a new email. I have the border in Arizona as my provider. I followed the instructions of a similar problem, I was alerted by going to programs, uninstall, repair, but no luck, same thing back on email. I get emails with the date of the day on them, so I'm able to send and receive. Exactly what remove file showing nothing as deleted, and when I click on an e-mail I deleted it says that it does not. I use the computer for email and internet, that's all. My computer is a windows vista Basic. Thanks for any further help.

    Hello

    You use Norton or McAfee av?  I suggest to uninstall these and select free software such as Microsoft Security Essentials, Avast or AVG.  These work properly with Windows Mail.

    How to fix most of the problems with Windows Mail

    http://www.Vistax64.com/tutorials/62560-Windows-Mail-problems.html

    Alternatively, you can consider the use of the Windows Live Essentials Mail instead of Windows Mail application.

  • Problem with Windows Mail after download IE9

    Since IE9 download, I had problems with Windows Mail.  Like others, I lost the box that says, "some pictures have been blocked to help prevent the sender from identifying your computer.  Click here to download the images. "With my mail, I'm able to get a preview of the e-mail for 60 seconds before it actually opens and this is where the above 'box' appeared.  Now when I preview the email, this box is not there and I don't see one of the photos.  If I open the electronic mail, the box is there and I can click on one to see all the pictures.  The problem/question for me is I don't want to open the email to see all the pictures: I want to display them in preview mode, so I know what I'm opening!  Help!

    Questions and options can be found here.

    Internet Explorer 9 breaks the Windows Mail feature
    http://www.oehelp.com/OETips.aspx#15

  • Problems with Windows mail and impossible to get an account to work...

    Account: "Of Su mail', server: 'mail.comcast.net', Protocol: POP3, server response: '-ERR CONNECTION failed ', Port: 110, secure (SSL): no, Server error: 0x800CCC90, error number: 0x800CCC92

    If windows can not access comcast due to the error mail is still on comcast I think.

    Yet only once they can answer these questions

    What do you mean by windows mail?

    To help you effectively, we need to know exactly which e-mail system you use.  You can see the differences here

    BTW, NONE of the providers of email back up their data.  If yours is important to you, save it.

    If you want to save your data, you must set up your account on a mail Client. Follow the steps in this wiki
  • have a problem with windows mail using vista, it won't send mail it's just continues to ask the user to verifery a password

    windows Vista mail problem

    have problems with windows mail with vista, it will not send an email he just keeps asking to verifery user, a password have checked all the settings a knowledge they are correct... can connect to the server an everything is ok... get this error msg... Account: 'att.net', server: 'pop.att.yahoo.com', Protocol: POP3, server response: '-ERR [AUTH] invalid username or password. (#YSH001)', port: 995, secure (SSL): Yes, Server error: 0x800CCC90, error number: 0x800CCC92... on this for 2 days may not understand... Please help?

    Hello

    I suggest you to follow the steps in this link and check if it helps:
    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-Windows-Mail

    For more information, see this link:
    http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-Windows-Mail

    It will be useful.

  • Problem with windows mail send not of pictures and attachments? Help, please!

    Hello, yesterday I continued to get an error code when you try to update some security updates, I've used the tutorial help and went and deleted some file deep into my system, as he ordered.  He has not yet fixed the error and now my windows mail will not send attachments and the police to the address info seem different?  I'm lost, please help!

    Hi Pishy,

    1. what was the error code that you received when you try updates security?

    2. what tutorial did you delete files?

    3. what happens when you try to send emails with attachments? You receive messages or error codes?

    You can try to perform a restore of the system to a prior restore point you have been affected by the issue.

    Note: When you perform the system restore to restore the computer to a previous state, programs and updates that you have installed are removed.

    To run the system restore, you can consult the following link:

    System restore

    System Restore: frequently asked questions

    For more information, you can also consult the following article:

    Solve problems with Windows Mail

    Hope this information is useful.

  • problem with windows mail (using Vista) after automatic updates installed

    After the installation of the automatic update of windows I can't receive or send email on windows Messaging.  Get the box asking username and password and when I did, he asked again.  Have checked all the settings and they are as before the problem started. Is there a problem of backward compatibility with one of the windows updates?  I can access my email on the site, so is not their problem but with my computer.

    Hello

    Try the following methods:

    Method 1:

    Try to download and reinstall Windows Mail using the link:

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

    In the link above, go to download and install the update.

    Method 2:

    Solve problems with Windows Mail

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-Windows-Mail

    Reference:

    Working with Windows Mail in Windows Vista

    http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-Windows-Mail

  • I installed AVG 9.0 and now I get the following MSN Explorer pop up of message.__You are unable to connect to your e-mail server. There may be a problem with your Internet connection, or a problem with the mail server. Pleas try again.

    I installed AVG 9.0 and now I get the MSN Explorer pop next message.
    You can not connect to your mail server. There may be a problem with your Internet connection, or a problem with the mail server. Pleas try again.

    Sure.  Analysis of your e-mail anti-virus program:

    • Can slow to receive and send messages, or even fail.
    • Can damage files of storage for messages that you've already sent and received, making it inaccessible messages.
    • Is not necessary.  If you receive an infected attachment and try to open it, the protective device in real time of your antivirus program will block the infection.

    Here are a few web pages accurately:

    Why you don't need your anti-virus program to scan your e-mail
    The other threat email: the Corruption of files in Outlook Express
    Why some antivirus software can change the settings in e-mail programs
    Email scanning - advantages and disadvantages

  • problems with sending/receiving messages

    For the last two weeks my iphone 6 s and my son 6 more have had problems with sending/receiving messages in the texts of the Group and regularly comes to a voicemail.  Messages are not at all or you may be able to receive them. Then last night on a group text between me and another user of iphone and a droid user messages were not all going through and an 'unknown' appeared on the screen of the droid users as if this person has attempted to send a message to our group text but nothing was there.  Iphone users could not see it.  This morning - messages still does not go through the text of the group or on one.  Any ideas?

    SMS texts are a function of carrier

    Control an upgrade of the carrier

    If the droid user used an iPhone before having them their registration number

    Also check with support carrier technique

  • I have problems with the mail (El Capitan)

    I have problems with the mail

    See writing an effective communities of Apple support question.

    Without knowing what are these problems there is no way we can really help you.

    Try this:

    Start the computer in Safe Mode, and then restart normally. It will be slower than a normal startup.

    MacIntel: Reset of the controller (SMC) system management

    Reset the PRAM and NVRAM on your Mac.

    Repair the hard drive and permissions - El Capitan

    HD recovery start:

    Restart the computer and after the buzzer, press on and hold down the COMMAND and R until the menu screen appears.

    Repair

    When the recovery menu appears, select disk utility and press the continue button. Disk utility charges and select Macintosh HD entry indented from the list on the left.  Click the first aid tab in the toolbar... If disk utility reports any errors that have been corrected, then re-run first aid until no errors are reported. Wait until the operation is complete, then quit disk utility and return to the main menu. Select restart from the Apple menu.

    Now, download and reinstall OS X El Capitan 10.11.3 Combo Update.

  • iOS 10 problems with the Mail application

    Dear Apple and community support,

    Here's my problem:

    I have upgraded to iOS 10 on my iPhone 5s this afternoon (September 13), and now I'm not able to open e-mail - Yahoo!, and Gmail. I can receive emails, I'm not able to view the body of these emails. When I press on them, all I see is a blank white page. I can't answer emails either. I can only their flag or remove them. However, I am able to compose new e-mail messages.

    Here are the steps that I've taken to try to solve my problem:

    1. Restarted my phone
    2. Remove and re-add my Mail accounts
    3. Made a backup and a restore full while that plugged into my laptop with the latest version of iTunes.

    I should be grateful if you would help or more information on this issue.

    Thank you

    Emily

    I also have problems with the Mail application.  On my iphone, ipad, and Mac Pro.  I have several addresses, a MSN, another on Go Daddy and Gmail.  I have various weird problems with threads and every day he re-charge my emails, like if I have never read before.  Something is really problematic with Mail.

    Can the people of APPLE, you help me?

  • I have a problem with my keyboard after the update using drivercanner

    Original title: my keyboard stopped working after the last updae

    OTEVA here

    Hi I have a problem with my keyboard after update using drivercanner I need help fixing this cause I tried looking for the installation of the upate that cause, but I don't have where to look.

    try a system restore to a date preceding the update.

  • Problem with Windows Update after the removal of Virus

    My operating system is Win Vista 32 bit, had some virus closed my windows updates, have a view of the white page. Checked that my services and win update is in automatic mode has started, so I don't know why my updater gives me a red x saying windows updater is turned off.  Any suggestions?

    [Original title: Windows Update]

    https://answers.Microsoft.com/en-us/protect/Forum/protect_other-protect_scanning/problem-with-Windows-Update-after-removing-virus/3a8dd279-2732-4693-88bf-f5cea4afca96>

    It makes more sense. How to reset the Windows Update components?

    Yet, as indicated in The ball , the search results links do not work. I also used several browsers and DuckDuckGo. Maybe it's because the Windows Update Agent was changed some time ago and the article is no longer valid.

    EDIT: If the OP is also struggling to access the link I suggest using repair Windows updates available from tweaking.com. I suggest also using the Registry backup of the same author before hand.

    Repair the Windows updates

    http://www.tweaking.com/content/page/repair_windows_updates.html

    Registry backup
    http://www.tweaking.com/content/page/registry_backup.html

    I hope this helps.

  • I saw the problem with Windows Live Mail gel but I have the same problem with Windows Mail.

    I saw the problem posted on Windows Live Mail gel but I have the same problem with Windows Mail. Sometimes, while mouse refuses I can scroll vertically with the keyboard, but not always... I changed to another wireless mouse, and this has not changed. I run Vista and can't find the update, that you reference. The reopening and closing program usually fixes it, but it's annoying. It happened for about 6 weeks or so.

    Can anyone help?

    I run Vista and can't find the update, that you reference.

    What update WHO refers to?

    Try to compact and repair the database.

    WMUtil
    http://www.oehelp.com/WMUtil/default.aspx

    And search for malware with the free version of this tool.

    Malwarebytes Anti-Malware
    http://www.Malwarebytes.org/MBAM.php

  • Problem with the rules after upgrade of the VM in foglight cartridge

    Hello

    There is a small problem with the rules after that I updated the VM cartridge level.

    In the default rules, I changed a few settings so that they will act as I need.

    However, each time I upgrade VM cartridge my rules are off and marked as backup.

    The question is: is there a way to upgrade the cartridge and keep my active rules after upgrading?

    Best regards

    Victor

    This is the normal behavior according to this KB article

    https://support.quest.com/SolutionDetail.aspx?ID=SOL105872&PR=Foglight

    105872 knowledge article

     
    • Title

      Backup rules fill in the dashboard management rule after Foglight upgraded
    • Description

      After that an upgrade of Foglight was conducted, several backup rules are created for rules that have been published before the upgrade. For example:

      Cluster VMW IO network
      Cluster VMW IO network (backup)

    • Resolution

      During the upgrade procedure, the FMS has detected that some of the original rules have been changed in some way. It copies the rules previously upgraded in backups, before trying to merge the contents of the update rule in the former.

      Assuming that the FMS works as expected, the rules of backup can be deleted. However, it is best to confirm this in the respect of the rules first before making deletions.

      When editing rules, particularly rules OOTB (out of the box), it is recommended to copy the original rule, disable the original rule and edit the copied rule. This should reduce the risk of the problem described in this Article.

    Golan

  • did someone had problems with lightroom 5 after installing Mac OS El Capitan?

    did someone had problems with lightroom 5 after installing Mac OS El Capitan? the images are well n the library but darken when I switch to develop fashion

    It's a shame that you did not check for problems before you can update your Mac

    First, see if the update to the fixed bug Mac 10.11.1 will help you

    -an exchange of views of 10.11.1 https://forums.adobe.com/thread/1986008

    -In ADDITION the need to update the drivers nVidia (links included in the message)

    -There is also 'a' mention of an another 10.11.2 bug fix tested by Apple

    He has problems with Mac 10.11 El Capitan... which is perhaps one of them

    See answer #5 in https://forums.adobe.com/thread/1965850 for several solution links

    -the first link that the answer is a possible solution to install problems

    -There is also a link on the video display problems in Premiere Pro

    - and many other programs... MORE Microsoft Office also has problems

    More official Adobe help pages listing problems Mac 10.11

    https://helpx.Adobe.com/Photoshop/KB/Photoshop-and-El-Capitan-Mac-OS-10-11.html

    http://blogs.Adobe.com/PremierePro/2015/10/Premiere-Pro-CC-and-Mac-OS-x-10-11-El-Capitan.h tml

    https://helpx.Adobe.com/Lightroom/KB/Lightroom-and-El-Capitan---Mac-OS-10-11.html

    http://blogs.Adobe.com/audition/2015/10/audition-CC-and-OSX-10-11-El-Capitan.html#.VjjYBtG raUk

Maybe you are looking for