| Author |
Message |
phannguyen Developer

Joined: 17 Jul 2008 Posts: 43
|
Posted: Fri Aug 01, 2008 7:51 am Post subject: |
|
|
thanks brijeshthakur for reply me,
I have opened logcat and run it with my app.
I got a error message from logcat like below picture.
so how can i solve this problem?are u over this problem?
thanks for help!
| Description: |
|
| Filesize: |
129.21 KB |
| Viewed: |
6382 Time(s) |

|
_________________ PhanNguyen |
|
| Back to top |
|
 |
|
|
 |
brijeshthakur Junior Developer

Joined: 23 Jul 2008 Posts: 12 Location: Banglore,India
|
Posted: Fri Aug 01, 2008 1:30 pm Post subject: |
|
|
Hi phannguyen,
I am also getting the same error. actually the problem i guess is because of this app uses hidden api. so luck by chance it will run in US locations. but for others i m not sure.
so wait for the reply from plusminus.
till then.....
Regards,
Brijesh
|
|
| Back to top |
|
 |
phannguyen Developer

Joined: 17 Jul 2008 Posts: 43
|
Posted: Mon Aug 04, 2008 4:41 am Post subject: |
|
|
it's really disappoint.i cant run any app related to map.
please help us,plusminus!
_________________ PhanNguyen |
|
| Back to top |
|
 |
paslatek Once Poster

Joined: 13 Feb 2009 Posts: 1
|
Posted: Fri Feb 13, 2009 9:27 am Post subject: Need help to use ggogle secret api |
|
|
Hi
Could you provide a view of the tcp packet sent to google api to retrieve the datas.
I'm trying to use this api with a .Net call, so I need to compare the packet you send and mine, because I got a 501 error code
I just need the hexadecimal packet of the request content.
Thks.
|
|
| Back to top |
|
 |
Sar Freshman

Joined: 17 Mar 2009 Posts: 2
|
Posted: Thu Apr 02, 2009 2:31 am Post subject: |
|
|
ok i get a bunch of unresolved errors =/
basically for my api, everything under apache.commons is unresolved. seems i only have apache.common.logging;
additionally i dont have android.telephony.PhoneStateIntentReceiver. so i used PhoneStateListener instead. hope that suffices.
i changed import android.net.ContentURI to net.uri seeing page 2's advice. so thats that. but the http's got me reeling.
urmmm haha why is it missing? what pre-requisites do i require to use these codes?
|
|
| Back to top |
|
 |
PI9 Junior Developer

Joined: 06 Apr 2009 Posts: 11
|
Posted: Mon May 25, 2009 2:10 pm Post subject: knowing wether there is a good reception |
|
|
Hello everyone,
I'd like to make an app which draws a picture when there is a normal/good reception and another picture when there is no reception.
I'im trying wih ServiceState but there is a problem and my app "stops unexpectely"...
| Java: | private ImageView reception;
ServiceState mservicestate = new ServiceState();
int state = mservicestate.getState();
if(state == android.telephony.ServiceState.STATE_OUT_OF_SERVICE)
reception.setImageResource(R.drawable.reseau);
else
reception.setImageResource(R.drawable.pas_reseau); |
Can you please hep me understand what's wrong in my program ?
Thanks in advance
|
|
| Back to top |
|
 |
|
|
 |
AniAnish Once Poster

Joined: 08 Jun 2009 Posts: 1
|
Posted: Mon Jun 08, 2009 1:03 pm Post subject: Good Tutorial |
|
|
Good Tutorial Thank you PlusMinus
|
|
| Back to top |
|
 |
jlamance Once Poster

Joined: 14 Jul 2009 Posts: 1
|
Posted: Tue Jul 14, 2009 2:08 pm Post subject: |
|
|
| plusminus wrote: | | quauhtlimtz wrote: | | It is not clear for me why use this way to locate people if you have the GPS option that is even more accurate. What are the advantages about using this way to locate people??? |
Hello quauhtlimtz,
there is exactly NO advantage, except the fact that perhaps not all phones come with a GPS-chip .
Regards,
olusminus |
Great example! I'll take exception to using GPS all the time though.
There are a few advantages to having something other than (or in addition to) GPS to provide location. First GPS doesn't work everywhere. Suburban residential is about as harsh an environment as GPS can really work in, even with new high sensitivity receivers. Second, the GPS takes a fair amount of battery life (which is why you can turn it off). So if you're running an application that only needs rough location (1-5 km, for example), then the cell location may be the preferred method. An example would be trying to recover local weather where the additional accuracy of the GPS (if available) does not add to the app.
|
|
| Back to top |
|
 |
lavans4u Once Poster

Joined: 01 Jul 2009 Posts: 1
|
Posted: Wed Jul 15, 2009 5:10 pm Post subject: |
|
|
hi pluas minus and aother friends
i want that software for a try.....am not able to caode and compile it because am a beginner in it...
so anybody please upload that software for me.....
http://people.apache.org/~dims/android/LocateMe-3.0.zip
i tried this link....but i can download it.....
please help me.....please
|
|
| Back to top |
|
 |
Hetal_Vora Once Poster

Joined: 07 Aug 2009 Posts: 1
|
Posted: Mon Aug 10, 2009 9:39 am Post subject: |
|
|
Hi plusminus,
Good tutorial as always . I had a question...
Is it possible to implement network triangulation to locate the device position in Android. Your tutorial uses only a single cell tower to pin-point the location of the device. Is it possible to contact other cell towers (since a device would be communicating to more than 1 tower at any time), retrieve their position, plot their circle of coverage and get the device position as the intersection point.
I am unable to locate any API methods which would give me information of all the cell towers the device communicates with.
|
|
| Back to top |
|
 |
Ripityom Freshman

Joined: 07 Oct 2009 Posts: 4
|
Posted: Wed Oct 07, 2009 2:13 pm Post subject: problem with org.apache.commons.httpclient |
|
|
Hi plusminus!
I've got a problem while doing the tutorial.
Eclipse says that org.apache.commons.httpclient cannot be resolved.
I'm pretty new to android, I use 1.5 SDK and 1.5 firmware on the dev phone (well there's not mutch to do with it, i guess).
Any idea?
Thanx
Ripityom
|
|
| Back to top |
|
 |
delta_foxtrot Freshman

Joined: 01 Nov 2009 Posts: 2
|
Posted: Sun Nov 01, 2009 8:52 am Post subject: Re: problem with org.apache.commons.httpclient |
|
|
| Ripityom wrote: | | Any idea? |
The SDK has changed substantially:
| Java: | private void getGoogleCellID(int lac, int cid)
{
int shortcid = cid & 0xffff;
try
{
String surl = "http://www.google.com/glm/mmap";
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(surl);
httppost.setEntity(new MyCellIDRequestEntity(shortcid, lac));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
DataInputStream dis = new DataInputStream(entity.getContent());
// Read some prior data
dis.readShort();
dis.readByte();
// Read the error-code
int errorCode = dis.readInt();
if (errorCode == 0)
{
double lat = (double) dis.readInt() / 1000000D;
double lng = (double) dis.readInt() / 1000000D;
int range = dis.readInt(); // in metres
System.out.println("From google with love: lat="+lat+", lon="+lng+", range="+range);
}
} catch (Exception e) {}
} |
| Java: | class MyCellIDRequestEntity implements HttpEntity
{
protected int myCellID;
protected int myLAC;
public MyCellIDRequestEntity(int aCellID, int aLAC)
{
this.myCellID = aCellID;
this.myLAC = aLAC;
}
public Header getContentType()
{
return new BasicHeader("Content-Type", "application/binary");
}
@Override
public void consumeContent() throws IOException
{
}
@Override
public InputStream getContent() throws IOException, IllegalStateException
{
return null;
}
@Override
public Header getContentEncoding()
{
return null;
}
@Override
public boolean isChunked()
{
return false;
}
@Override
public boolean isStreaming()
{
return false;
}
/** Pretend to be a French Sony_Ericsson-K750 that
* wants to receive its lat/long-values =)
* The data written is highly proprietary !!! */
@Override
public void writeTo(OutputStream outputStream) throws IOException
{
DataOutputStream os = new DataOutputStream(outputStream);
os.writeShort(21);
os.writeLong(0);
os.writeUTF("fr");
os.writeUTF("Sony_Ericsson-K750");
os.writeUTF("1.3.1");
os.writeUTF("Web");
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();
}
@Override
public long getContentLength()
{
return -1;
}
@Override
public boolean isRepeatable()
{
return true;
}
} |
|
|
| Back to top |
|
 |
estebanuri Freshman

Joined: 20 Nov 2009 Posts: 2
|
Posted: Fri Nov 20, 2009 8:46 am Post subject: |
|
|
Does anyone know how to get ALL IDs Cell Tower in range of the device?
If we could have all the Cell Ids, we could calculate the position much more accurately, for example if we had several antennas we could average their latitudes and longitudes. The problem is that at a time we can get a single antenna.
Will there be any way to get them all?
|
|
| Back to top |
|
 |
delta_foxtrot Freshman

Joined: 01 Nov 2009 Posts: 2
|
Posted: Fri Nov 20, 2009 5:09 pm Post subject: |
|
|
| estebanuri wrote: | Does anyone know how to get ALL IDs Cell Tower in range of the device?
If we could have all the Cell Ids, we could calculate the position much more accurately, for example if we had several antennas we could average their latitudes and longitudes. The problem is that at a time we can get a single antenna.
Will there be any way to get them all? |
Yes you can get the neighbouring Cell IDs, and even the signal strength.
|
|
| Back to top |
|
 |
estebanuri Freshman

Joined: 20 Nov 2009 Posts: 2
|
Posted: Fri Nov 20, 2009 5:42 pm Post subject: |
|
|
That's right, I didn't see the right class API.
http://developer.android.com/reference/android/telephony/TelephonyManager.html
public List<NeighboringCellInfo> getNeighboringCellInfo ()
Since: API Level 3
Returns the neighboring cell information of the device.
Returns
List of NeighboringCellInfo or null if info unavailable.
Requires Permission: (@link android.Manifest.permission#ACCESS_COARSE_UPDATES}
Thank you delta_foxtrot!
PS: It is remarkable that implements it, other platforms such as Blackberry does not include it in their API.
|
|
| Back to top |
|
 |
|