×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Jul 2013
    Posts
    73

    Positioning by without cost (s60v3 like from cell id for s40)

    Hello, i am trying to get 'gps' location without using gps since my operator will 'eat' my money after 1 hour of finding positions.

    I found that s40 devices can use something like Cell ID positioning, (so it seems that we do not pay for anything, we don't even send data we just receive packets that are 'free')
    But it does not work for s60v3 fp2 so i searched over internet for a solution and found one this that i can make criteria to not to allow costs.
    Criteria criteria = new Criteria();
    criteria.setCostAllowed(false);

    But application still wants to receive Positioning data BUT it freezes whole midlet app i don't ge it why, maybe someone could help with it: (notice that i have at this time no money on the prepaid phone - this means you cant dial but you can receive calls) maybe thats the problem.

    its coded in JavaMe
    Code:
    public void UpdateLocNoGPS()
    {
        
    actstate = 1;
    repaint();  
        Criteria criteria = new Criteria();
    
    criteria.setCostAllowed(false);
    criteria.setPreferredPowerConsumption(Criteria.NO_REQUIREMENT);
    criteria.setSpeedAndCourseRequired(false);
    criteria.setAltitudeRequired(false);
    criteria.setAddressInfoRequired(false);
    
        try {
            actstate = 2;
            repaint();  
    	LocationProvider lp = LocationProvider.getInstance(criteria);
            repaint();  
            actstate = 3;
    	if (lp != null) { 
                actstate = 4;
                repaint();  
    		Location l = lp.getLocation(300);
    		if (l.isValid()) {
                        actstate = 5;
                        repaint();  
    			Coordinates c = l.getQualifiedCoordinates();
                            
    			if (c!=null) {
                                actstate =6;
                                repaint();  
    				latitude = c.getLatitude();
    				longitude = c.getLongitude();
    				// do something with the coordinates
    			}
    		}
    		else {
                        repaint();  
    		actstate =7;	longitude = -1; latitude = -1;
    		}
    	}
    	else {
                repaint();  
    	actstate= 77;	longitude = -1; latitude = -1;
    	}
    } catch (LocationException le) { // not able to retrieve location information
    	longitude = -1; latitude = -1;actstate =777;repaint();  
    } catch (InterruptedException ie) { 
    	longitude = -1; latitude = -1;actstate =7777;repaint();  
    }  
           repaint();  
     actstate =-100; 
    }

    the thing is when i call repaint it does not even repaint just choose context appears (allow positioniong data or not) when you hit yes whole app freezes [you are still on actstate = 0; even if you should be on actstate = 1], when you hit no you get to actstate 4 section
    sorry for this mess, i can't debug apps on the phone.


    After all that i found an application that openes google maps and sets the phone position marker and a comment under it: SOmething like this - google receives signal strength from cell towers and triangulates your position. [phone sends these values to google server] So now finally i can compose my question:

    "Is there any ability to get signal strength from 3 different tower cells at present?" (since i know their positions) if not i could use some help with this freezing code of mine.

    Cheers.
    Last edited by melepeta; 2013-09-05 at 02:14.

Similar Threads

  1. Replies: 3
    Last Post: 2009-06-09, 16:25
  2. Cell Id, cell information, cell string...
    By maclun123 in forum Symbian
    Replies: 1
    Last Post: 2009-03-12, 08:53
  3. How to positioning cell id with my own map
    By bagindraerix in forum Symbian
    Replies: 6
    Last Post: 2009-03-01, 11:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •