Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7630247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:03:10+00:00 2026-05-31T06:03:10+00:00

I’m busy writing a Program that Transmits GPS Coordinates to a Server from a

  • 0

I’m busy writing a Program that Transmits GPS Coordinates to a Server from a mobile phone where the coordinates are then used for calculations. But I’m constantly hitting a wall with blackberry. I have built the Android App and it works great but can’t seem to contact the server on a real blackberry device. I have tested the application in a simulator and it works perfectly but when I install it on a real phone I get no request the phone.

I have read quite a bit about the secret strings to append at the end of the url so I adapted some demo code to get me the first available transport but still nothing …

The Application is Signed and I normally then either install it by debugging through eclipse or directly on the device from the .jad file and allow the application the required permissions.

The current code was adapted from the HTTP Connection Demo in the Blackberry SDK.

Could you have a look and give me some direction. I’m losing too much hair here …

The Backend Service that keeps running:

public void run() {

        System.out.println("Starting Loop");

        Criteria cr = new Criteria();
        cr.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
        cr.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
        cr.setCostAllowed(false);
        cr.setPreferredPowerConsumption(Criteria.NO_REQUIREMENT);
        cr.setPreferredResponseTime(1000);
        LocationProvider lp = null;
        try {
            lp = LocationProvider.getInstance(cr);
        } catch (LocationException e) {
            System.out.println("*****************Exception" + e);
        }
        if (lp == null) {
            UiApplication.getUiApplication().invokeLater(new Runnable() {
                public void run() {
                    Dialog.alert("GPS not supported!");
                    return;
                }
            });
        } else {

            System.out
                    .println(lp.getState() + "-" + LocationProvider.AVAILABLE);

            switch (lp.getState()) {
            case LocationProvider.AVAILABLE:
                // System.out.println("Provider is AVAILABLE");
                while (true) {
                    Location l = null;
                    int timeout = 120;
                    try {
                        l = lp.getLocation(timeout);
                        final Location fi = l;

                        System.out.println("Got a Coordinate "
                                + l.getQualifiedCoordinates().getLatitude()
                                + ", "
                                + l.getQualifiedCoordinates().getLongitude());

                        System.out.println("http://" + Constants.website_base
                                + "/apis/location?device_uid=" + Constants.uid
                                + "&lat="
                                + l.getQualifiedCoordinates().getLatitude()
                                + "&lng="
                                + l.getQualifiedCoordinates().getLongitude());

                        if (!_connectionThread.isStarted()) {
                            fetchPage("http://"
                                    + Constants.website_base
                                    + "/apis/location?device_uid="
                                    + Constants.uid
                                    + "&lat="
                                    + l.getQualifiedCoordinates().getLatitude()
                                    + "&lng="
                                    + l.getQualifiedCoordinates()
                                            .getLongitude());
                        } else {
                            createNewFetch("http://"
                                    + Constants.website_base
                                    + "/apis/location?device_uid="
                                    + Constants.uid
                                    + "&lat="
                                    + l.getQualifiedCoordinates().getLatitude()
                                    + "&lng="
                                    + l.getQualifiedCoordinates()
                                            .getLongitude());
                        }

                        Thread.sleep(1000 * 60);

                    } catch (LocationException e) {
                        System.out.println("Location timeout");
                    } catch (InterruptedException e) {
                        System.out.println("InterruptedException"
                                + e.getMessage());
                    } catch (Exception ex) {
                        System.err.println(ex.getMessage());
                        ex.printStackTrace();
                    }
                }
            }
    }

My Connection is Made with:

ConnectionFactory connFact = new ConnectionFactory();
ConnectionDescriptor connDesc = connFact.getConnection(getUrl());

// Open the connection and extract the data.
try {
    // StreamConnection s = null;
    // s = (StreamConnection) Connector.open(getUrl());
    HttpConnection httpConn = (HttpConnection) connDesc.getConnection();
    /* Data is Read here with a Input Stream */

Any Ideas ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:03:12+00:00Added an answer on May 31, 2026 at 6:03 am

    Figured it out!

    Using a function I found online to determine which ; extension to use when connecting by using numerous Try / Catch. Then had to set the Internet APN settings. I’m in South-Africa using Vodacom so the APN is “Internet” with no Password.

    Barely have hair left ….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.