J2ME App: Send HTTP post to webserver when phone is closed.

Posted on 2006-04-14
Last Modified: 2006-11-18
"Motorola i870"

My J2ME application sends HTTP post to the web server. It woks great when the phone is open. I need to send the HTTP message when the phone is closed. I would really appreciate if you could help me anyway.

Question by:velosumdev
    LVL 13

    Accepted Solution

    The phone is essentially in a paused or suspended state when the phone is closed. You will not be able to initiate an POST when the phone is in this state. Some devices give you this capability (basically running a daemon thread), but the vast majority do not. While the i870 is very feature rich, they also do not have the capability to create a constantly running background thread.

    Author Comment

    Thank you for your tips. I have an application for Motorola i870. Is there anyway I can run the networking when the phone is closed, so that I could send the POST.
    LVL 13

    Expert Comment

    Not without some type of background thread and, as far as I know and read, this device does not have that capability. If you look at the specification for the MIDlet lifecycle, you'll see the paused/suspended state. You *might* be able to trigger a POST when the lid closes, but not after that event has passed -- at least not with the i870

    Featured Post

    New My Cloud Pro Series - organize everything!

    With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

    Join & Write a Comment

    This article is a step by step guide on how to create a basic PTP link using Ubiquiti airOS devices. This guide can be used on the following Ubiquiti AirMAX devices. Nanostation, Bullets, AirBridge, Nanobeam, NanoBridge to name a few. Please review …
    Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
    This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now