andbook!.pdf - Learning Android Get an anddev.org - Android-Shirt Back to index
anddev.org Header Logo
FAQ Search Top rated articles Browse Feeds anddev.org - Authors Contact Details Register Log in

Poor mans GPS - Cell(Tower)ID / Location Area Code -Lookup

Goto page Previous  1, 2, 3, 4  Next
 
       anddev.org - Android Development Community | Android Tutorials | Index -> Map Tutorials
Author Message
E.Jyothsna
Junior Developer
Junior Developer


Joined: 28 Feb 2008
Posts: 22
Location: chennai

PostPosted: Tue Apr 08, 2008 8:51 am    Post subject: Reply with quote

i saw ur tutorial.Its very nice.Here we have to give the cell id and LAC.My question is how to findout cell id and LAC sothat it will find out location in map?can u plz reply me
Back to top
View user's profile Send private message Visit poster's website
Senthil
Freshman
Freshman


Joined: 18 Apr 2008
Posts: 5
Location: Kanpur

PostPosted: Mon May 19, 2008 5:38 pm    Post subject: Why map application doesn't working "behind the proxy& Reply with quote

Hi plusminus,
Am working behind the proxy, not getting map tiles in android map application.what would be the reason?
if you come to know please let it me know.

Thanks & Regards,
Senthil Arjunan

_________________
Senthil Arjunan
Back to top
View user's profile Send private message
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2660
Location: College Park, MD

PostPosted: Mon May 19, 2008 6:57 pm    Post subject: Re: Why map application doesn't working "behind the pr Reply with quote

Senthil wrote:
Hi plusminus,
Am working behind the proxy, not getting map tiles in android map application.what would be the reason?
if you come to know please let it me know.

Thanks & Regards,
Senthil Arjunan


The reason is being behind the proxy.
As I'm not in the same position (no proxy), its really hard to help here.

Regards,
plusminus

_________________
Download my apps Idea
Please remember, that this board is give & take Smile


| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
oktapris
Once Poster
Once Poster


Joined: 07 Jun 2008
Posts: 1
Location: Jakarta, Indonesia

PostPosted: Sat Jun 07, 2008 9:32 am    Post subject: Reply with quote

rock_win wrote:
Hi

can someone please explain the different values written in writeRequest Method:

Java:
public void writeRequest(OutputStream outputStream) throws IOException {
          DataOutputStream os = new DataOutputStream(outputStream);
          os.writeShort(21);
          os.writeLong(0);
          os.writeUTF("fr");//country code
          os.writeUTF("Sony_Ericsson-K750");//phone make
          os.writeUTF("1.3.1");//software version
          os.writeUTF("Web");//type
          os.writeByte(27);

          os.writeInt(0); os.writeInt(0); os.writeInt(3);
          os.writeUTF("");
          os.writeInt(myCellID); // CELL-ID
          os.writeInt(myLAC); // LAC
          os.writeInt(0); os.writeInt(0);
          os.writeInt(0); os.writeInt(0);
          os.flush();
     }


Just trying this piece of code (only HTTP protocol part) to verify this "hidden" API.
I'm using value got from CellTrack application in my phone, and substitute above parameters.
It's working in my country (ID).
The two parameters after LAC is MNC and MCC according to this site: http://maps.alphadex.de/datafiles/fct0e1b117823ccc1a.txt .
It's locating my position with quite acceptable accuracy (I don't know how accurate it is, seems showing 1km radius of my position if it's checked using Google Map).
--
okta
Back to top
View user's profile Send private message Yahoo Messenger
roleme
Once Poster
Once Poster


Joined: 18 Jul 2008
Posts: 1
Location: Ukraine

PostPosted: Fri Jul 18, 2008 3:26 pm    Post subject: Reply with quote

how can resolve my geolocation if i have such information
My Location (mcc, mnc, lac, cell) is: (255, 2, 1799, 307)
Back to top
View user's profile Send private message MSN Messenger
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2660
Location: College Park, MD

PostPosted: Sat Jul 19, 2008 9:22 am    Post subject: Reply with quote

roleme wrote:
how can resolve my geolocation if i have such information
My Location (mcc, mnc, lac, cell) is: (255, 2, 1799, 307)


The method above does not work Question

_________________
Download my apps Idea
Please remember, that this board is give & take Smile


| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
phannguyen
Developer
Developer


Joined: 17 Jul 2008
Posts: 43

PostPosted: Tue Jul 22, 2008 10:43 am    Post subject: Reply with quote

hi plusminus,
i use full your source code. when i run this app, a error message occur like below pic.

what wrong here?
please help me!
thanks a lot.



android_err.JPG
 Description:
Error Message
 Filesize:  39.07 KB
 Viewed:  7696 Time(s)

android_err.JPG



_________________
PhanNguyen
Back to top
View user's profile Send private message Yahoo Messenger
brijeshthakur
Junior Developer
Junior Developer


Joined: 23 Jul 2008
Posts: 12
Location: Banglore,India

PostPosted: Wed Jul 23, 2008 1:57 pm    Post subject: is there any issue with proxy. Reply with quote

Hi.
I am getting an error while running the application with different values i.e Cell-Id & LAC.
error says :-
ERROR/LocateMe(748): org.apache.commons.httpclient.NoHttpResponseException: The server www.google.com failed to respond
ERROR/LocateMe(748): org.apache.commons.httpclient.NoHttpResponseException: The server www.google.com failed to respond
ERROR/LocateMe(748): at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1835)
ERROR/LocateMe(748): at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
ERROR/LocateMe(748): at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
ERROR/LocateMe(748): at com.mindtree.gps.CellIDToLatLong.tryToLoate(CellIDToLatLong.java:178)
ERROR/LocateMe(748): at com.mindtree.gps.CellIDToLatLong$1$1.run(CellIDToLatLong.java:83)

I am behind proxy.Is there any issue with that???

Thanks in advance
Back to top
View user's profile Send private message
stilwalli
Developer
Developer


Joined: 21 Jul 2008
Posts: 35

PostPosted: Tue Jul 29, 2008 12:01 pm    Post subject: A-gps Reply with quote

Is this example for A-GPS.

Is A-GPS related to this example in anyway. I want to know if there is any special API for A-GPS?
Back to top
View user's profile Send private message
phannguyen
Developer
Developer


Joined: 17 Jul 2008
Posts: 43

PostPosted: Wed Jul 30, 2008 5:26 am    Post subject: Reply with quote

hi plusminus,
please help me explaining why findViewById() function return null:

cellidtolatlong.java
Java:

 public void onCreate(Bundle icicle) {
          super.onCreate(icicle);
          this.setContentView(R.layout.main);
         ................
         this.myCmdUpdate = (Button) findViewById(R.id.cmd_update);//why it return null?
         this.myCmdUpdate.setOnClickListener(this.cmdUpdateListener);
         .................


main.xml
XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
        >

     <!-- Input-Stuff -->
     <TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="CELL-ID"
          />

     <EditText id="@+id/edit_cellid"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:singleLine="true"
          />

     <!-- The Buttons next to each other -->
     <TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="LAC"
          />

     <EditText id="@+id/edit_lac"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:singleLine="true"
          />

                 
     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:orientation="horizontal"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content"
            >

        <Button id="@+id/cmd_update"
               android:layout_width="wrap_content"
               android:layout_height="fill_parent"
               android:text="Update"
               />

        <Button id="@+id/cmd_locateme"
               android:layout_width="wrap_content"
               android:layout_height="fill_parent"
               android:text="Locate Me!">

            <requestFocus/>
        </Button>
    </LinearLayout>
</LinearLayout>


R.java
Java:

package org.anddev.android.cellidtolatlong;

public final class R {
    public static final class attr {
    }
    public static final class drawable {
        public static final int icon=0x7f020000;
    }
    public static final class id {
        public static final int cmd_locateme=0x7f050003;
        public static final int cmd_update=0x7f050002;
        public static final int edit_cellid=0x7f050000;
        public static final int edit_lac=0x7f050001;
    }
    public static final class layout {
        public static final int main=0x7f030000;
    }
    public static final class string {
        public static final int app_name=0x7f040000;
    }
}


thanks and best regards,

_________________
PhanNguyen
Back to top
View user's profile Send private message Yahoo Messenger
brijeshthakur
Junior Developer
Junior Developer


Joined: 23 Jul 2008
Posts: 12
Location: Banglore,India

PostPosted: Wed Jul 30, 2008 12:44 pm    Post subject: Reply with quote

Hi phannguyen,

if you are working on android-sdk_m5-rc15 then change it to.


<Button id="@+id/cmd_update"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="Update"
/>


<Button android:id="@+id/cmd_update"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="Update"
/>

and also replace id with android:id everywhere in main.xml

May be it will resolve your issue.

Regards,
Brijesh
Back to top
View user's profile Send private message
phannguyen
Developer
Developer


Joined: 17 Jul 2008
Posts: 43

PostPosted: Thu Jul 31, 2008 8:51 am    Post subject: Reply with quote

Thanks brijeshthakur, now it's ok.

But my app is not work.I use (cellid,lac) is (52,12547) like plusminus's example.
I wait for a long time but it's not load map.
so what i must do more in order to it's load map?

please show me!
thanks a lot.

_________________
PhanNguyen
Back to top
View user's profile Send private message Yahoo Messenger
brijeshthakur
Junior Developer
Junior Developer


Joined: 23 Jul 2008
Posts: 12
Location: Banglore,India

PostPosted: Thu Jul 31, 2008 1:10 pm    Post subject: Reply with quote

Hi phannguyen,

I also cant able to run this application.In my case it is showing the operation time-out error. I am behind proxy.and this application uses hidden api.

Check the error in LogCat.
May be that is the problem.

sorry for this time Sad

Regards,
Brijesh
Back to top
View user's profile Send private message
phannguyen
Developer
Developer


Joined: 17 Jul 2008
Posts: 43

PostPosted: Fri Aug 01, 2008 4:48 am    Post subject: Reply with quote

brijeshthakur write:
Quote:

Hi phannguyen,

I also cant able to run this application.In my case it is showing the operation time-out error. I am behind proxy.and this application uses hidden api.

Check the error in LogCat.
May be that is the problem.

sorry for this time

Regards,
Brijesh


hi brijeshthakur,
my network is ok and browse work well. So what's cause make this app not work?
Can u talk clearly more about "Check the error in LogCat".

thanks and best regards.

_________________
PhanNguyen
Back to top
View user's profile Send private message Yahoo Messenger
brijeshthakur
Junior Developer
Junior Developer


Joined: 23 Jul 2008
Posts: 12
Location: Banglore,India

PostPosted: Fri Aug 01, 2008 5:49 am    Post subject: Reply with quote

Hi phannguyen,

LogCat is just like console.Its a console for Android.

If you are using eclipse.Click on Window Menu--->Show View-->Others-->Android--->LogCat.

After running the application.Check the Log Cat.It will show the the Application's Error.

The Problem is not in network.If you run this application with Direct Internet Connection may be it will run fine.But if you are Behind proxy it causes error.

Check the LogCat & post the error. You can get more details of LogCat from Android website.


Regards,
Brijesh
Back to top
View user's profile Send private message
Display posts from previous:   
       anddev.org - Android Development Community | Android Tutorials | Index -> Map Tutorials All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


© 2007, Android Development Community
All rights reserved.
Powered by phpBB.